tcladdressbook-commits Mailing List for TclAddressBook (Page 7)
Status: Alpha
Brought to you by:
bdesgraupes
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(114) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(37) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(52) |
Aug
(70) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
|
Mar
(2) |
Apr
(9) |
May
|
Jun
(8) |
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Bernard D. <bde...@us...> - 2004-07-29 09:12:27
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31373/Source Modified Files: TclAddressBookUtils.c Log Message: TclAB_CheckItem() function Index: TclAddressBookUtils.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBookUtils.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- TclAddressBookUtils.c 28 Dec 2003 07:49:56 -0000 1.13 +++ TclAddressBookUtils.c 29 Jul 2004 09:12:14 -0000 1.14 @@ -1,13 +1,13 @@ /* * File : "TclAddressBookUtils.c" * Created: 2003-12-05 10:08:03 - * Last modification: 2003-12-28 07:45:12 + * Last modification: 2004-07-29 11:07:23 * Author: Bernard Desgraupes * e-mail: <bde...@ea...> * * Utility functions called by the TclABCmd command functions * - * (c) Copyright : Bernard Desgraupes, 2003 + * (c) Copyright : Bernard Desgraupes, 2003-2004 * All rights reserved. * This software is free software with BSD licence. * Versions history: see the Changes.Log file. @@ -637,10 +637,11 @@ /* *---------------------------------------------------------------------- * - * TclAB_CheckGroup -- + * TclAB_CheckItem -- * - * This function is invoked to check the validity of an -ingroup/-fromgroup - * optional argument and return the corresponding record reference. + * This function is invoked to check the validity of an item's UID + * (person or group) and returns the corresponding record reference in + * the outItemRef argument. * * Results: * None. @@ -652,28 +653,32 @@ */ Boolean -TclAB_CheckGroup(Tcl_Interp *interp, ABAddressBookRef ab, CONST84 char * inGroupUID, - CONST84 char * option, ABRecordRef * outGroupRef) +TclAB_CheckItem(Tcl_Interp *interp, ABAddressBookRef ab, CONST84 char * inUID, + CONST84 char * option, ABRecordRef * outItemRef, int inRecordType) + { - CFStringRef groupCFStr; + CFStringRef theCFStr; int kind; Boolean result = true; - groupCFStr = CFStringCreateWithCString(NULL, inGroupUID, NULL); + theCFStr = CFStringCreateWithCString(NULL, inUID, NULL); + // Find the record corresponding to the UID - *outGroupRef = ABCopyRecordForUniqueId(ab, groupCFStr); - CFRelease(groupCFStr); - if (!*outGroupRef) { + *outItemRef = ABCopyRecordForUniqueId(ab, theCFStr); + CFRelease(theCFStr); + + if (!*outItemRef) { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Unrecognized record ID in ", option, " argument", (char *) NULL); result = false; } else { - // Is it really a group? - kind = TclAB_TypeFromRecord(ab, *outGroupRef); - if (kind != rec_group) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Not a group ID in ", option, - " argument", (char *) NULL); - CFRelease(groupCFStr); + // Is it the expected type (person or group)? + kind = TclAB_TypeFromRecord(ab, *outItemRef); + + if (kind != inRecordType) { + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Not a ", + inRecordType == rec_person ? "person":"group", + " ID in ", option, " argument", (char *) NULL); result = false; } } @@ -759,7 +764,7 @@ ab = ABGetSharedAddressBook(); if(lookingInGroup) { - if ( !TclAB_CheckGroup(interp, ab, inGroupUID, "-ingroup", &inGroup) ) { + if ( !TclAB_CheckItem(interp, ab, inGroupUID, "-ingroup", &inGroup, rec_group) ) { return TCL_ERROR; } if (inRecordType == rec_group) { @@ -964,7 +969,7 @@ // Handle the -ingroup optional argument if (result && addingToGroup) { - if ( !TclAB_CheckGroup(interp, ab, inGroupUID, "-ingroup", &inGroup) ) { + if ( !TclAB_CheckItem(interp, ab, inGroupUID, "-ingroup", &inGroup, rec_group) ) { result = TCL_ERROR; goto DONE; } |
|
From: Bernard D. <bde...@us...> - 2004-07-29 09:11:58
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31310/Source Modified Files: TclAddressBook.c Log Message: New [identifier] subcommand Index: TclAddressBook.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- TclAddressBook.c 28 Jul 2004 23:24:34 -0000 1.25 +++ TclAddressBook.c 29 Jul 2004 09:11:34 -0000 1.26 @@ -1,7 +1,7 @@ /* * File : "TclAddressBook.c" * Created: 2003-11-26 12:54:15 - * Last modification: 2004-07-29 00:55:10 + * Last modification: 2004-07-29 11:06:58 * Author: Bernard Desgraupes * e-mail: <bde...@ea...> * @@ -34,6 +34,7 @@ static int TclABCmd_Export(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_GetMe(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Groups(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); +static int TclABCmd_Identifier(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Image(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Import(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Parents(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); @@ -144,16 +145,16 @@ static CONST char *switches[] = { "add", "changed", "count", "create", "delete", "export", - "getme", "groups", "image", "import", "parents", "persons", - "property", "record", "remove", "save", "search", "set", - "type", (char *) NULL + "getme", "groups", "identifier", "image", "import", "parents", + "persons", "property", "record", "remove", "save", "search", + "set", "type", (char *) NULL }; enum { TCLAB_ADD, TCLAB_CHANGED, TCLAB_COUNT, TCLAB_CREATE, TCLAB_DELETE, TCLAB_EXPORT, - TCLAB_GETME, TCLAB_GROUPS, TCLAB_IMAGE, TCLAB_IMPORT, TCLAB_PARENTS, TCLAB_PERSONS, - TCLAB_PROPERTY, TCLAB_RECORD, TCLAB_REMOVE, TCLAB_SAVE, TCLAB_SEARCH, TCLAB_SET, - TCLAB_TYPE + TCLAB_GETME, TCLAB_GROUPS, TCLAB_IDENTIFIER, TCLAB_IMAGE, TCLAB_IMPORT, TCLAB_PARENTS, + TCLAB_PERSONS, TCLAB_PROPERTY, TCLAB_RECORD, TCLAB_REMOVE, TCLAB_SAVE, TCLAB_SEARCH, + TCLAB_SET, TCLAB_TYPE }; resultPtr = Tcl_GetObjResult(interp); @@ -201,6 +202,10 @@ result = TclABCmd_Groups(clientData, interp, objc, objv, resultPtr); break; + case TCLAB_IDENTIFIER: + result = TclABCmd_Identifier(clientData, interp, objc, objv, resultPtr); + break; + case TCLAB_IMAGE: result = TclABCmd_Image(clientData, interp, objc, objv, resultPtr); break; @@ -305,7 +310,7 @@ // Third argument is a group ID groupID = Tcl_GetStringFromObj(objv[3], &length); // Check if it is a group and get the corresponding record - if ( !TclAB_CheckGroup(interp, ab, groupID, "third", &groupRecord) ) { + if ( !TclAB_CheckItem(interp, ab, groupID, "third", &groupRecord, rec_group) ) { result = TCL_ERROR; goto DONE; } @@ -455,7 +460,7 @@ ab = ABGetSharedAddressBook(); if(lookingInGroup) { - if ( !TclAB_CheckGroup(interp, ab, inGroupUID, "-ingroup", &inGroupRef) ) { + if ( !TclAB_CheckItem(interp, ab, inGroupUID, "-ingroup", &inGroupRef, rec_group) ) { return TCL_ERROR; } if (rectype == TCLAB_COUNT_GROUPS) { @@ -754,6 +759,139 @@ /* *---------------------------------------------------------------------- * + * TclABCmd_Identifier -- + * + * This procedure is invoked to process the [addressbook identifier] Tcl command. + * See the user documentation for details on what it does. + * + * Syntax: + * addressbook identifier personID groupID property ?label? + * + * If the ?label? argument is specified, the command tries to set the + * distribution identifier of the property to that value, otherwise it returns + * the current value of the distribution identifier. It concerns + * multi-value list properties and applies to a particular person belonging to + * a particular group. If ?label? is empty, the primary default value is + * reset. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + +int +TclABCmd_Identifier( + ClientData clientData, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *CONST objv[], /* Argument values. */ + Tcl_Obj *resultPtr) /* Pointer to store the result. */ +{ + ABAddressBookRef ab; + CONST84 char * theProperty, * thePersonUID, * theGroupUID, * theNewVal; + CFStringRef propertyRef, valueRef; + ABRecordRef personRecord, groupRecord; + ABPropertyType thePropType; + int length, result; + Boolean setIt = false; + + if (objc != 5 && objc != 6) { + Tcl_WrongNumArgs(interp, 2, objv, "recordID groupID property ?label?"); + return TCL_ERROR; + } + + Tcl_ResetResult(interp); + + thePersonUID = Tcl_GetStringFromObj(objv[2], &length); + theGroupUID = Tcl_GetStringFromObj(objv[3], &length); + theProperty = Tcl_GetStringFromObj(objv[4], &length); + + if (objc == 6) { + theNewVal = Tcl_GetStringFromObj(objv[5], &length); + if (length == 0) { + valueRef = NULL; + } else { + valueRef = CFStringCreateWithCString(NULL, theNewVal, kCFStringEncodingUTF8); + } + setIt = true; + } + + // Make CFString object for property + propertyRef = CFStringCreateWithCString(NULL, theProperty, kCFStringEncodingUTF8); + if (!propertyRef) { + Tcl_AppendStringsToObj(resultPtr, "Problem getting CFString for property", (char *) NULL); + return TCL_ERROR; + } + + // Get the address book + ab = ABGetSharedAddressBook(); + + // Check if second argument is a person and get the corresponding record + if ( !TclAB_CheckItem(interp, ab, thePersonUID, "second", &personRecord, rec_person) ) { + return TCL_ERROR; + } + + // Check if third argument is a group and get the corresponding record + if ( !TclAB_CheckItem(interp, ab, theGroupUID, "third", &groupRecord, rec_group) ) { + result = TCL_ERROR; + goto DONE; + } + + // Find the property type (string, date, multivalue...) + thePropType = ABTypeOfProperty(ab, kABPersonRecordType, propertyRef); + if (thePropType == kABErrorInProperty) { + Tcl_AppendStringsToObj(resultPtr, "Unknown property '", theProperty, + "' for Person records", (char *) NULL); + CFRelease(propertyRef); + result = TCL_ERROR; + goto DONE; + } + + if (setIt) { +// ABGroupSetDistributionIdentifier(groupRecord, personRecord, propertyRef, valueRef) +// ABGroupSetDistributionIdentifier(groupRecord, personRecord, kABAddressProperty, kABAddressHomeLabel) + if (!ABGroupSetDistributionIdentifier(groupRecord, personRecord, propertyRef, valueRef)) { + Tcl_AppendStringsToObj(resultPtr, "Couldn't set distribution identifier for '", + theProperty, "' property", (char *) NULL); + CFRelease(propertyRef); + if (valueRef != NULL) CFRelease(valueRef); + result = TCL_ERROR; + goto DONE; + } + } else { + char theString[256]; + Tcl_DString ds; + + valueRef = ABGroupCopyDistributionIdentifier(groupRecord, personRecord, propertyRef); + if (!valueRef) { + Tcl_AppendStringsToObj(resultPtr, "Couldn't get distribution identifier of '", + theProperty, "' property for this record", (char *) NULL); + CFRelease(propertyRef); + result = TCL_ERROR; + goto DONE; + } + CFStringGetCString(valueRef, theString, sizeof(theString), NULL); + Tcl_ExternalToUtfDString(gMacRomanEnc, theString, strlen(theString), &ds); + Tcl_DStringResult(interp, &ds); + Tcl_DStringFree(&ds); + CFRelease(valueRef); + } + CFRelease(propertyRef); + +DONE: + CFRelease(groupRecord); + CFRelease(personRecord); + return result; +} + + +/* + *---------------------------------------------------------------------- + * * TclABCmd_Image -- * * This procedure is invoked to process the [addressbook image] Tcl command. @@ -1280,7 +1418,7 @@ // Third argument is a group ID groupID = Tcl_GetStringFromObj(objv[3], &length); // Check if it is a group and get the corresponding record - if ( !TclAB_CheckGroup(interp, ab, groupID, "third", &groupRecord) ) { + if ( !TclAB_CheckItem(interp, ab, groupID, "third", &groupRecord, rec_group) ) { result = TCL_ERROR; goto DONE; } |
|
From: Bernard D. <bde...@us...> - 2004-07-28 23:25:46
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22058/Source Modified Files: TclAddressBook.xml Log Message: Version 1.1 project Index: TclAddressBook.xml =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TclAddressBook.xml 5 Dec 2003 20:23:34 -0000 1.2 +++ TclAddressBook.xml 28 Jul 2004 23:25:36 -0000 1.3 @@ -79,16 +79,6 @@ <SETTING><NAME>SystemSearchPaths</NAME> <SETTING> <SETTING><NAME>SearchPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>Library/Frameworks</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>Unix</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>OS X Volume</VALUE></SETTING> - </SETTING> - <SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>FrameworkPath</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>SearchPath</NAME> <SETTING><NAME>Path</NAME><VALUE>:usr:include:</VALUE></SETTING> <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> <SETTING><NAME>PathRoot</NAME><VALUE>OS X Volume</VALUE></SETTING> @@ -157,6 +147,16 @@ <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>Library/Frameworks</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Unix</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>OS X Volume</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> </SETTING> <!-- Settings for "Debugger Runtime" panel --> @@ -175,7 +175,7 @@ <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> <SETTING><NAME>Targetname</NAME><VALUE>TclAddressBook Dylib</VALUE></SETTING> <SETTING><NAME>OutputDirectory</NAME> - <SETTING><NAME>Path</NAME><VALUE>/Library/Tcl/Tcladdressbook1.0</VALUE></SETTING> + <SETTING><NAME>Path</NAME><VALUE>/Library/Tcl/Tcladdressbook1.1</VALUE></SETTING> <SETTING><NAME>PathFormat</NAME><VALUE>Unix</VALUE></SETTING> <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> </SETTING> @@ -747,7 +747,7 @@ <!-- Settings for "FTP Panel" panel --> <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING> <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ`~ݐ)¤Ô</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ`j`)\</VALUE></SETTING> <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING> <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING> <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING> @@ -1014,7 +1014,7 @@ <!-- Settings for "PPC Mac OS X Project" panel --> <SETTING><NAME>MWProject_MacOSX_type</NAME><VALUE>SharedLibrary</VALUE></SETTING> - <SETTING><NAME>MWProject_MacOSX_outfile</NAME><VALUE>addressbook1.0.dylib</VALUE></SETTING> + <SETTING><NAME>MWProject_MacOSX_outfile</NAME><VALUE>addressbook1.1.dylib</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_filecreator</NAME><VALUE>????</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_filetype</NAME><VALUE>MDYL</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_vmaddress</NAME><VALUE>0</VALUE></SETTING> @@ -1332,14 +1332,6 @@ <FRAMEWORK> <FILEREF> <PATHTYPE>Name</PATHTYPE> - <PATH>Tcl.framework</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> - <DYNAMICLIBRARY>Tcl</DYNAMICLIBRARY> - </FRAMEWORK> - <FRAMEWORK> - <FILEREF> - <PATHTYPE>Name</PATHTYPE> <PATH>System.framework</PATH> <PATHFORMAT>Unix</PATHFORMAT> </FILEREF> @@ -1369,6 +1361,14 @@ </FILEREF> <DYNAMICLIBRARY>AddressBook</DYNAMICLIBRARY> </FRAMEWORK> + <FRAMEWORK> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>Tcl.framework</PATH> + <PATHFORMAT>Unix</PATHFORMAT> + </FILEREF> + <DYNAMICLIBRARY>Tcl</DYNAMICLIBRARY> + </FRAMEWORK> </FRAMEWORKLIST> </TARGET> <TARGET> @@ -1397,16 +1397,6 @@ <SETTING><NAME>SystemSearchPaths</NAME> <SETTING> <SETTING><NAME>SearchPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>Library/Frameworks</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>Unix</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>OS X Volume</VALUE></SETTING> - </SETTING> - <SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>FrameworkPath</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>SearchPath</NAME> <SETTING><NAME>Path</NAME><VALUE>:usr:include:</VALUE></SETTING> <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> <SETTING><NAME>PathRoot</NAME><VALUE>OS X Volume</VALUE></SETTING> @@ -1475,6 +1465,16 @@ <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>Library/Frameworks</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Unix</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>OS X Volume</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> </SETTING> <!-- Settings for "Debugger Runtime" panel --> @@ -1493,7 +1493,7 @@ <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> <SETTING><NAME>Targetname</NAME><VALUE>Release</VALUE></SETTING> <SETTING><NAME>OutputDirectory</NAME> - <SETTING><NAME>Path</NAME><VALUE>Output/Tcladdressbook1.0</VALUE></SETTING> + <SETTING><NAME>Path</NAME><VALUE>Output/Tcladdressbook1.1</VALUE></SETTING> <SETTING><NAME>PathFormat</NAME><VALUE>Unix</VALUE></SETTING> <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> </SETTING> @@ -2065,7 +2065,7 @@ <!-- Settings for "FTP Panel" panel --> <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING> <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ`~ݐ)¤Ô</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ`j`)\</VALUE></SETTING> <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING> <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING> <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING> @@ -2332,7 +2332,7 @@ <!-- Settings for "PPC Mac OS X Project" panel --> <SETTING><NAME>MWProject_MacOSX_type</NAME><VALUE>SharedLibrary</VALUE></SETTING> - <SETTING><NAME>MWProject_MacOSX_outfile</NAME><VALUE>addressbook1.0.dylib</VALUE></SETTING> + <SETTING><NAME>MWProject_MacOSX_outfile</NAME><VALUE>addressbook1.1.dylib</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_filecreator</NAME><VALUE>????</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_filetype</NAME><VALUE>MDYL</VALUE></SETTING> <SETTING><NAME>MWProject_MacOSX_vmaddress</NAME><VALUE>0</VALUE></SETTING> @@ -2650,14 +2650,6 @@ <FRAMEWORK> <FILEREF> <PATHTYPE>Name</PATHTYPE> - <PATH>Tcl.framework</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> - <DYNAMICLIBRARY>Tcl</DYNAMICLIBRARY> - </FRAMEWORK> - <FRAMEWORK> - <FILEREF> - <PATHTYPE>Name</PATHTYPE> <PATH>System.framework</PATH> <PATHFORMAT>Unix</PATHFORMAT> </FILEREF> @@ -2687,6 +2679,14 @@ </FILEREF> <DYNAMICLIBRARY>AddressBook</DYNAMICLIBRARY> </FRAMEWORK> + <FRAMEWORK> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>Tcl.framework</PATH> + <PATHFORMAT>Unix</PATHFORMAT> + </FILEREF> + <DYNAMICLIBRARY>Tcl</DYNAMICLIBRARY> + </FRAMEWORK> </FRAMEWORKLIST> </TARGET> </TARGETLIST> |
|
From: Bernard D. <bde...@us...> - 2004-07-28 23:25:12
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21930/Source Modified Files: TclAddressBook_version.h Log Message: 1.1b1 Index: TclAddressBook_version.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook_version.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- TclAddressBook_version.h 5 Jan 2004 05:36:04 -0000 1.7 +++ TclAddressBook_version.h 28 Jul 2004 23:25:03 -0000 1.8 @@ -1,11 +1,11 @@ // File: "TclAddressBook_version.h" // Created: 2003-09-24 07:28:22 -// Last modification: 2004-01-05 06:27:41 +// Last modification: 2004-07-28 23:52:01 // Author: Bernard Desgraupes // Description: version numbering for Tcladdressbook #define TCLADDRESSBOOK_MAJOR 1 -#define TCLADDRESSBOOK_MINOR 0 +#define TCLADDRESSBOOK_MINOR 1 #define TCLADDRESSBOOK_SUBMINOR 1 #define TCLADDRESSBOOK_STAGE 'b' // 'd' for developStage |
|
From: Bernard D. <bde...@us...> - 2004-07-28 23:24:43
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21810/Source Modified Files: TclAddressBook.c Log Message: New add and remove commands Index: TclAddressBook.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- TclAddressBook.c 5 Jan 2004 05:35:50 -0000 1.24 +++ TclAddressBook.c 28 Jul 2004 23:24:34 -0000 1.25 @@ -1,14 +1,14 @@ /* * File : "TclAddressBook.c" * Created: 2003-11-26 12:54:15 - * Last modification: 2003-12-28 06:15:58 + * Last modification: 2004-07-29 00:55:10 * Author: Bernard Desgraupes * e-mail: <bde...@ea...> * * Load this extension in the Tcl interpreter with the following instruction: * package require addressbook * - * (c) Copyright : Bernard Desgraupes, 2003 + * (c) Copyright : Bernard Desgraupes, 2003-2004 * All rights reserved. * This software is free software with BSD licence. * Versions history: see the Changes.Log file. @@ -26,6 +26,7 @@ */ static int TclABCmd_AddressBook(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); +static int TclABCmd_Add(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Changed(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Count(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Create(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); @@ -39,6 +40,7 @@ static int TclABCmd_Persons(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Property(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Record(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); +static int TclABCmd_Remove(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Save(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Search(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); static int TclABCmd_Set(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Tcl_Obj *resultPtr); @@ -141,15 +143,17 @@ int index, result; static CONST char *switches[] = { - "changed", "count", "create", "delete", "export", "getme", - "groups", "image", "import", "parents", "persons", - "property", "record", "save", "search", "set", "type", (char *) NULL + "add", "changed", "count", "create", "delete", "export", + "getme", "groups", "image", "import", "parents", "persons", + "property", "record", "remove", "save", "search", "set", + "type", (char *) NULL }; enum { - TCLAB_CHANGED, TCLAB_COUNT, TCLAB_CREATE, TCLAB_DELETE, TCLAB_EXPORT, TCLAB_GETME, - TCLAB_GROUPS, TCLAB_IMAGE, TCLAB_IMPORT, TCLAB_PARENTS, TCLAB_PERSONS, - TCLAB_PROPERTY, TCLAB_RECORD, TCLAB_SAVE, TCLAB_SEARCH, TCLAB_SET, TCLAB_TYPE + TCLAB_ADD, TCLAB_CHANGED, TCLAB_COUNT, TCLAB_CREATE, TCLAB_DELETE, TCLAB_EXPORT, + TCLAB_GETME, TCLAB_GROUPS, TCLAB_IMAGE, TCLAB_IMPORT, TCLAB_PARENTS, TCLAB_PERSONS, + TCLAB_PROPERTY, TCLAB_RECORD, TCLAB_REMOVE, TCLAB_SAVE, TCLAB_SEARCH, TCLAB_SET, + TCLAB_TYPE }; resultPtr = Tcl_GetObjResult(interp); @@ -165,6 +169,10 @@ } switch (index) { + case TCLAB_ADD: + result = TclABCmd_Add(clientData, interp, objc, objv, resultPtr); + break; + case TCLAB_CHANGED: result = TclABCmd_Changed(clientData, interp, objc, objv, resultPtr); break; @@ -217,6 +225,10 @@ result = TclABCmd_Record(clientData, interp, objc, objv, resultPtr); break; + case TCLAB_REMOVE: + result = TclABCmd_Remove(clientData, interp, objc, objv, resultPtr); + break; + case TCLAB_SAVE: result = TclABCmd_Save(clientData, interp, objc, objv, resultPtr); break; @@ -244,6 +256,94 @@ /* *---------------------------------------------------------------------- * + * TclABCmd_Add -- + * + * This procedure is invoked to process the [addressbook add] Tcl command. + * See the user documentation for details on what it does. + * + * Syntax: + * addressbook add recordID groupID + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + +int +TclABCmd_Add( + ClientData clientData, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *CONST objv[], /* Argument values. */ + Tcl_Obj *resultPtr) /* Pointer to store the result. */ +{ + int kind, length, result; + CONST84 char * groupID; + CFStringRef strRef; + ABAddressBookRef ab; + ABRecordRef objRecord, groupRecord; + + if (objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, "recordID groupID"); + return TCL_ERROR; + } + + // Get the address book + ab = ABGetSharedAddressBook(); + + // Second argument is a person or a group ID + strRef = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(objv[2], &length), NULL); + // Find the record corresponding to the UID + result = TclAB_RecordFromUID(ab, strRef, resultPtr, &objRecord); + CFRelease(strRef); + if (!result) {return TCL_ERROR;} + + // Third argument is a group ID + groupID = Tcl_GetStringFromObj(objv[3], &length); + // Check if it is a group and get the corresponding record + if ( !TclAB_CheckGroup(interp, ab, groupID, "third", &groupRecord) ) { + result = TCL_ERROR; + goto DONE; + } + + // Is objRecord a person or a group? + kind = TclAB_TypeFromRecord(ab, objRecord); + switch (kind) { + case rec_person: + if (!ABGroupAddMember(groupRecord, objRecord)) { + Tcl_AppendStringsToObj(resultPtr, "Couldn't add member to group", (char *) NULL); + result = TCL_ERROR; + } + break; + + case rec_group: + if (!ABGroupAddGroup(groupRecord, objRecord)) { + Tcl_AppendStringsToObj(resultPtr, "Couldn't add subgroup to group", (char *) NULL); + result = TCL_ERROR; + } + break; + + default: + Tcl_AppendStringsToObj(resultPtr, "Unknown type for recordID argument", (char *) NULL); + result = TCL_ERROR; + break; + } + + CFRelease(groupRecord); + +DONE: + CFRelease(objRecord); + return result; +} + + +/* + *---------------------------------------------------------------------- + * * TclABCmd_Changed -- * * This procedure is invoked to process the [addressbook changed] Tcl command. @@ -445,13 +545,10 @@ * * This procedure is invoked to process the [addressbook delete] Tcl command. * See the user documentation for details on what it does. - * - if -fromgroup is specified, remove recordID from the group: recordID can be - * either a person (remove it as a member of the group) or a group (remove it as - * a subgroup of the group) - * - otherwise, remove recordID from the database. + * Remove recordID from the database. * * Syntax: - * addressbook delete recordID ?-fromgroup groupID? + * addressbook delete recordID * * Results: * A standard Tcl result. @@ -470,82 +567,33 @@ Tcl_Obj *CONST objv[], /* Argument values. */ Tcl_Obj *resultPtr) /* Pointer to store the result. */ { - ABAddressBookRef ab; - ABRecordRef theRecord, fromGroup; - CONST84 char * directUID; - CONST84 char * fromUID; - CFStringRef directCFStr; - int index, length, kind, result; - Boolean removingFromGroup = false; - - static CONST char *rmRecSwitches[] = { - "-fromgroup", (char *) NULL - }; - - if (objc != 3 && objc != 5) { - Tcl_WrongNumArgs(interp, 2, objv, "recordID ?-fromgroup groupID?"); + ABRecordRef theRecord; + CONST84 char * theUID; + CFStringRef strRef; + int length, result; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "recordID"); return TCL_ERROR; } - - if (objc == 5) { - if (Tcl_GetIndexFromObj(interp, objv[3], rmRecSwitches, "option", 0, &index) != TCL_OK) { - return TCL_ERROR; - } else { - fromUID = Tcl_GetStringFromObj(objv[4], &length); - removingFromGroup = true; - } - } - - result = TCL_OK; - directUID = Tcl_GetStringFromObj(objv[2], &length); - directCFStr = CFStringCreateWithCString(NULL, directUID, NULL); + + theUID = Tcl_GetStringFromObj(objv[2], &length); + strRef = CFStringCreateWithCString(NULL, theUID, NULL); // Get the address book ab = ABGetSharedAddressBook(); // Find the record corresponding to the UID - result = TclAB_RecordFromUID(ab, directCFStr, resultPtr, &theRecord); - CFRelease(directCFStr); + result = TclAB_RecordFromUID(ab, strRef, resultPtr, &theRecord); + CFRelease(strRef); if (!result) {return TCL_ERROR;} - - if (removingFromGroup) { - if ( !TclAB_CheckGroup(interp, ab, fromUID, "-fromgroup", &fromGroup) ) { - result = TCL_ERROR; - goto DONE; - } - - // Is recordID a person or a group? - kind = TclAB_TypeFromRecord(ab, theRecord); - switch (kind) { - case rec_person: - if (!ABGroupRemoveMember(fromGroup, theRecord)) { - Tcl_AppendStringsToObj(resultPtr, "Couldn't remove member from group", (char *) NULL); - result = TCL_ERROR; - } - break; - - case rec_group: - if (!ABGroupRemoveGroup(fromGroup, theRecord)) { - Tcl_AppendStringsToObj(resultPtr, "Couldn't remove subgroup from group", (char *) NULL); - result = TCL_ERROR; - } - break; - - default: - Tcl_AppendStringsToObj(resultPtr, "Unknown type for recordID argument", (char *) NULL); - result = TCL_ERROR; - break; - } - CFRelease(fromGroup); - } else { - if (!ABRemoveRecord(ab, theRecord)) { - Tcl_AppendStringsToObj(resultPtr, "Couldn't remove record from database", (char *) NULL); - result = TCL_ERROR; - } - } -DONE: + if (!ABRemoveRecord(ab, theRecord)) { + Tcl_AppendStringsToObj(resultPtr, "Couldn't remove record from database", (char *) NULL); + result = TCL_ERROR; + } + CFRelease(theRecord); return result; } @@ -1183,6 +1231,94 @@ /* *---------------------------------------------------------------------- * + * TclABCmd_Remove -- + * + * This procedure is invoked to process the [addressbook remove] Tcl command. + * See the user documentation for details on what it does. + * + * Syntax: + * addressbook remove personID groupID + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + +int +TclABCmd_Remove( + ClientData clientData, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *CONST objv[], /* Argument values. */ + Tcl_Obj *resultPtr) /* Pointer to store the result. */ +{ + int kind, length, result; + CONST84 char * groupID; + CFStringRef strRef; + ABAddressBookRef ab; + ABRecordRef objRecord, groupRecord; + + if (objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, "recordID groupID"); + return TCL_ERROR; + } + + // Get the address book + ab = ABGetSharedAddressBook(); + + // Second argument is a person or a group ID + strRef = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(objv[2], &length), NULL); + // Find the record corresponding to the UID + result = TclAB_RecordFromUID(ab, strRef, resultPtr, &objRecord); + CFRelease(strRef); + if (!result) {return TCL_ERROR;} + + // Third argument is a group ID + groupID = Tcl_GetStringFromObj(objv[3], &length); + // Check if it is a group and get the corresponding record + if ( !TclAB_CheckGroup(interp, ab, groupID, "third", &groupRecord) ) { + result = TCL_ERROR; + goto DONE; + } + + // Is objRecord a person or a group? + kind = TclAB_TypeFromRecord(ab, objRecord); + switch (kind) { + case rec_person: + if (!ABGroupRemoveMember(groupRecord, objRecord)) { + Tcl_AppendStringsToObj(resultPtr, "Couldn't remove member from group", (char *) NULL); + result = TCL_ERROR; + } + break; + + case rec_group: + if (!ABGroupRemoveGroup(groupRecord, objRecord)) { + Tcl_AppendStringsToObj(resultPtr, "Couldn't remove subgroup from group", (char *) NULL); + result = TCL_ERROR; + } + break; + + default: + Tcl_AppendStringsToObj(resultPtr, "Unknown type for recordID argument", (char *) NULL); + result = TCL_ERROR; + break; + } + + CFRelease(groupRecord); + +DONE: + CFRelease(objRecord); + return result; +} + + +/* + *---------------------------------------------------------------------- + * * TclABCmd_Save -- * * This procedure is invoked to process the [addressbook save] Tcl command. |
|
From: Bernard D. <bde...@us...> - 2004-07-28 23:24:08
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21653/Source Modified Files: pkgIndex.tcl Log Message: Version 1.1 Index: pkgIndex.tcl =================================================================== RCS file: /cvsroot/tcladdressbook/Source/pkgIndex.tcl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- pkgIndex.tcl 1 Dec 2003 16:46:05 -0000 1.1.1.1 +++ pkgIndex.tcl 28 Jul 2004 23:23:59 -0000 1.2 @@ -1,3 +1,3 @@ if {[catch {package require Tcl 8.2}]} return -package ifneeded addressbook 1.0 [list load [file join $dir addressbook1.0.dylib] addressbook] +package ifneeded addressbook 1.1 [list load [file join $dir addressbook1.1.dylib] addressbook] |
|
From: Bernard D. <bde...@us...> - 2004-07-28 23:23:49
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21586/Source Modified Files: Changes.Log Log Message: Bumped to 1.1b Index: Changes.Log =================================================================== RCS file: /cvsroot/tcladdressbook/Source/Changes.Log,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Changes.Log 5 Jan 2004 08:13:49 -0000 1.12 +++ Changes.Log 28 Jul 2004 23:23:40 -0000 1.13 @@ -28,6 +28,15 @@ Last modification: $Date$ ================================================================================ += 1.1b1 last update: +================================================================================ + Added an [addressbook add] and an [addressbook remove] command to add +or remove an item (person or group) to or from a group. + Modified the [addressbook delete] command. It does not have an +optional argument anymore (this is replaced by [addressbook remove]). + + +================================================================================ = 1.0b1 released last update: 2004-01-05 09:00:50 ================================================================================ Added a "Contribs" directory to the project on SourceForge for code |
|
From: Bernard D. <bde...@us...> - 2004-07-28 23:11:51
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19445/Help Modified Files: TclAddressBookHelp.html Log Message: New "add" and "remove" subcommands Index: TclAddressBookHelp.html =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.html,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- TclAddressBookHelp.html 26 Jan 2004 23:09:14 -0000 1.15 +++ TclAddressBookHelp.html 28 Jul 2004 23:11:40 -0000 1.16 @@ -1,6 +1,6 @@ <HTML> <HEAD> -<TITLE>Tcladdressbook Help</TITLE> +<TITLE>TcladdressbookHelp</TITLE> <META NAME=GENERATOR CONTENT="Aida Mode"> </HEAD> <BODY> @@ -8,111 +8,118 @@ <P><IMG SRC="Images/TclAB_logo.gif " ALT="TclAB Logo" ALIGN=bottom></P> <P> <A HREF="TclAB.html"> Home Page</A> | <A HREF="http://sourceforge.net/projects/tcladdressbook"> Project Page at SourceForge</A><P><HR><BLOCKQUOTE><P><I> This is a manual page for the Tcladdressbook extension for Tcl. It -documents version 1.0b1. +documents version 1.1b1. </I></P></BLOCKQUOTE><HR> <UL> <LI><A HREF="#M1">NAME</A> <LI><A HREF="#M2">SYNOPSIS</A> <LI><A HREF="#M3">INTRODUCTION</A> <LI><A HREF="#M4">SUBCOMMANDS</A> -<UL><UL><LI><A HREF="#M5">addressbook changed</A></UL></UL> -<UL><UL><LI><A HREF="#M6">addressbook count (-groups | -persons) ?-ingroup <I>groupID</I>?</A></UL></UL> -<UL><UL><LI><A HREF="#M7">addressbook create (group | person) <I>name</I> ?-ingroup <I>groupID</I>?</A></UL></UL> -<UL><UL><LI><A HREF="#M8">addressbook delete <I>recordID</I> ?-fromgroup <I>groupID</I>?</A></UL></UL> -<UL><UL><LI><A HREF="#M9">addressbook export <I>personID</I></A></UL></UL> -<UL><UL><LI><A HREF="#M10">addressbook getme</A></UL></UL> -<UL><UL><LI><A HREF="#M11">addressbook groups ?-ids? ?-ingroup <I>groupID</I>?</A></UL></UL> -<UL><UL><LI><A HREF="#M12">addressbook image <I>personID</I> ?<I>imageData</I>?</A></UL></UL> -<UL><UL><LI><A HREF="#M13">addressbook import <I>vCardData</I></A></UL></UL> -<UL><UL><LI><A HREF="#M14">addressbook parents ?-ids? <I>recordID</I></A></UL></UL> -<UL><UL><LI><A HREF="#M15">addressbook persons ?-ids? ?-ingroup <I>groupID</I>?</A></UL></UL> -<UL><UL><LI><A HREF="#M16">addressbook property names (-groups | -persons)</A></UL></UL> -<UL><UL><LI><A HREF="#M17">addressbook property type (-groups | -persons) <I>propName</I></A></UL></UL> -<UL><UL><LI><A HREF="#M18">addressbook property add (-groups | -persons) <I>propName</I> <I>propType</I></A></UL></UL> -<UL><UL><LI><A HREF="#M19">addressbook property remove (-groups | -persons) <I>propName</I></A></UL></UL> -<UL><UL><LI><A HREF="#M20">addressbook record <I>recordID</I></A></UL></UL> -<UL><UL><LI><A HREF="#M21">addressbook save</A></UL></UL> -<UL><UL><LI><A HREF="#M22">addressbook search ?(-groups | -persons)? ?-ids? ?-nocase? <I>property op value</I></A></UL></UL> -<UL><UL><LI><A HREF="#M23">addressbook set <I>recordID propertyName</I> ?<I>value</I>?</A></UL></UL> -<UL><UL><LI><A HREF="#M24">addressbook type <I>recordID</I></A></UL></UL> -<LI><A HREF="#M25">INSTALLATION</A> -<LI><A HREF="#M26">VERSION HISTORY</A> -<LI><A HREF="#M27">REQUIREMENTS AND PORTABILITY</A> -<LI><A HREF="#M28">KNOW ISSUES</A> -<LI><A HREF="#M29">SOURCE CODE</A> -<LI><A HREF="#M30">CONTRIBUTIONS</A> -<LI><A HREF="#M31">LICENSE AND DISCLAIMER</A> -<LI><A HREF="#M32">SEE ALSO</A> -<LI><A HREF="#M33">KEYWORDS</A> +<UL><UL><LI><A HREF="#M5">addressbook add <I>recordID</I> <I>groupID</I></A></UL></UL> +<UL><UL><LI><A HREF="#M6">addressbook changed</A></UL></UL> +<UL><UL><LI><A HREF="#M7">addressbook count (-groups | -persons) ?-ingroup <I>groupID</I>?</A></UL></UL> +<UL><UL><LI><A HREF="#M8">addressbook create (group | person) <I>name</I> ?-ingroup <I>groupID</I>?</A></UL></UL> +<UL><UL><LI><A HREF="#M9">addressbook delete <I>recordID</I></A></UL></UL> +<UL><UL><LI><A HREF="#M10">addressbook export <I>personID</I></A></UL></UL> +<UL><UL><LI><A HREF="#M11">addressbook getme</A></UL></UL> +<UL><UL><LI><A HREF="#M12">addressbook groups ?-ids? ?-ingroup <I>groupID</I>?</A></UL></UL> +<UL><UL><LI><A HREF="#M13">addressbook image <I>personID</I> ?<I>imageData</I>?</A></UL></UL> +<UL><UL><LI><A HREF="#M14">addressbook import <I>vCardData</I></A></UL></UL> +<UL><UL><LI><A HREF="#M15">addressbook parents ?-ids? <I>recordID</I></A></UL></UL> +<UL><UL><LI><A HREF="#M16">addressbook persons ?-ids? ?-ingroup <I>groupID</I>?</A></UL></UL> +<UL><UL><LI><A HREF="#M17">addressbook property names (-groups | -persons)</A></UL></UL> +<UL><UL><LI><A HREF="#M18">addressbook property type (-groups | -persons) <I>propName</I></A></UL></UL> +<UL><UL><LI><A HREF="#M19">addressbook property add (-groups | -persons) <I>propName</I> <I>propType</I></A></UL></UL> +<UL><UL><LI><A HREF="#M20">addressbook property remove (-groups | -persons) <I>propName</I></A></UL></UL> +<UL><UL><LI><A HREF="#M21">addressbook record <I>recordID</I></A></UL></UL> +<UL><UL><LI><A HREF="#M22">addressbook remove <I>recordID</I> <I>groupID</I></A></UL></UL> +<UL><UL><LI><A HREF="#M23">addressbook save</A></UL></UL> +<UL><UL><LI><A HREF="#M24">addressbook search ?(-groups | -persons)? ?-ids? ?-nocase? <I>property op value</I></A></UL></UL> +<UL><UL><LI><A HREF="#M25">addressbook set <I>recordID propertyName</I> ?<I>value</I>?</A></UL></UL> +<UL><UL><LI><A HREF="#M26">addressbook type <I>recordID</I></A></UL></UL> +<LI><A HREF="#M27">INSTALLATION</A> +<LI><A HREF="#M28">VERSION HISTORY</A> +<LI><A HREF="#M29">REQUIREMENTS AND PORTABILITY</A> +<LI><A HREF="#M30">KNOW ISSUES</A> +<LI><A HREF="#M31">SOURCE CODE</A> +<LI><A HREF="#M32">CONTRIBUTIONS</A> +<LI><A HREF="#M33">LICENSE AND DISCLAIMER</A> +<LI><A HREF="#M34">SEE ALSO</A> +<LI><A HREF="#M35">KEYWORDS</A> </UL> <P><H2><A NAME="M1"></A>NAME</H2> addressbook - manipulate the Macintosh OSX Address Book database<P><H2><A NAME="M2"></A>SYNOPSIS</H2> <B>package require addressbook</B> <P> <B>addressbook subcommand</B> ?<I>arg arg</I>...?<P><H2><A NAME="M3"></A>INTRODUCTION</H2><P>The argument <I>subcommand</I> indicates what operation to perform. Any unique abbreviation for each subcommand is acceptable. The valid -subcommands are explained in the next sections.<P><H2><A NAME="M4"></A>SUBCOMMANDS</H2><P><H4><A NAME="M5"></A>addressbook changed</H4> +subcommands are explained in the next sections.<P><H2><A NAME="M4"></A>SUBCOMMANDS</H2><P><H4><A NAME="M5"></A>addressbook add <I>recordID</I> <I>groupID</I></H4> +This command lets you add an already existing item (person or group) +designated by its unique ID <I>recordID</I> to the group with ID +<I>groupID</I>.<P><H4><A NAME="M6"></A>addressbook changed</H4> This command returns 1 if there has been changes made to the database, 0 otherwise. Changes are made in memory with commands such as <B>addressbook set</B>, <B>addressbook create</B>, <B>addressbook delete</B>. To make these changes permanent, one must call the <B>addressbook save</B> -command. <P><H4><A NAME="M6"></A>addressbook count (-groups | -persons) ?-ingroup <I>groupID</I>?</H4> +command. <P><H4><A NAME="M7"></A>addressbook count (-groups | -persons) ?-ingroup <I>groupID</I>?</H4> This command returns the count of existing groups or persons in the database. One can specify a particular group with the -ingroup option -to count only the subgroups or members in this group.<P><H4><A NAME="M7"></A>addressbook create (group | person) <I>name</I> ?-ingroup <I>groupID</I>?</H4> +to count only the subgroups or members in this group.<P><H4><A NAME="M8"></A>addressbook create (group | person) <I>name</I> ?-ingroup <I>groupID</I>?</H4> This command lets you create a new group or a new person record. The <I>name</I> argument is the name to give to the new group or the last name of the person for which a new record is created. With the <I>-ingroup</I> option one can make the newly created record a subgroup or a member of the particular group with unique ID <I>groupID</I>. If no error occurs, the -command returns the unique ID of the created record.<P><H4><A NAME="M8"></A>addressbook delete <I>recordID</I> ?-fromgroup <I>groupID</I>?</H4> +command returns the unique ID of the created record.<P><H4><A NAME="M9"></A>addressbook delete <I>recordID</I></H4> This command removes the record with unique ID <I>recordID</I> from the -database or from a particular subgroup specified by its unique ID with the -<I>-fromgroup</I> option. Note that any changes made to the database won't -be definitive until you invoke the <B>addressbook save</B> command.<P><H4><A NAME="M9"></A>addressbook export <I>personID</I></H4> +database. Note that any changes made to the database won't be definitive +until you invoke the <B>addressbook save</B> command. +<P> In version 1.0 of the extension, this command used to accept an option +called <I>-fromgroup</I> in order to remove the record from a particular +subgroup. This is achieved now by the <B>addressbook remove</B> command.<P><H4><A NAME="M10"></A>addressbook export <I>personID</I></H4> This command lets you export the record with unique ID <I>personID</I> as a VCard. The result should be considered as binary data since it can -contain an image associated to the record.<P><H4><A NAME="M10"></A>addressbook getme</H4> +contain an image associated to the record.<P><H4><A NAME="M11"></A>addressbook getme</H4> This command returns all the data available in the database concerning the logged-in user ("Me"). The returned value takes the form of a keyed list: see the <B>addressbook record</B> command for a description of this format. Keyed lists can be easily manipulated with the -<B>keylget</B> and <B>keylset</B> commands defined in the TclX extension.<P><H4><A NAME="M11"></A>addressbook groups ?-ids? ?-ingroup <I>groupID</I>?</H4> +<B>keylget</B> and <B>keylset</B> commands defined in the TclX extension.<P><H4><A NAME="M12"></A>addressbook groups ?-ids? ?-ingroup <I>groupID</I>?</H4> This command returns a list of all the existing group records: if no option is specified, it is a list whose elements are sublists made of two elements. The first element is the unique ID associated with the group and the second is its name. If the <I>-ids</I> argument is specified, the returned list will contain only the unique IDs of the groups. If the <I>-ingroup</I> option is specified, only the subgroups contained in the group -with ID <I>groupID</I> will be returned.<P><H4><A NAME="M12"></A>addressbook image <I>personID</I> ?<I>imageData</I>?</H4> +with ID <I>groupID</I> will be returned.<P><H4><A NAME="M13"></A>addressbook image <I>personID</I> ?<I>imageData</I>?</H4> If no <I>imageData</I> argument is specified, this command returns the custom image associated with the record corresponding to the unique ID <I>personID</I>. The returned bytes are binary data. If no image exists, it raises an error. If an <I>imageData</I> argument is specified, it should contain valid binary data defining an image which will be associated the -record with unique ID <I>personID</I>.<P><H4><A NAME="M13"></A>addressbook import <I>vCardData</I></H4> +record with unique ID <I>personID</I>.<P><H4><A NAME="M14"></A>addressbook import <I>vCardData</I></H4> This command imports data in VCard format. The data specified by the <I>vCardData</I> argument must be valid data in VCard format: a new record is created in the database corresponding to the information contained in the -VCard. Note that the data can be binary if the VCard contains an image.<P><H4><A NAME="M14"></A>addressbook parents ?-ids? <I>recordID</I></H4> +VCard. Note that the data can be binary if the VCard contains an image.<P><H4><A NAME="M15"></A>addressbook parents ?-ids? <I>recordID</I></H4> This command returns a list of all the groups the record with unique ID <I>recordID</I> belongs to. The elements of this list are sublists made of one or two items: the unique ID and, possibly, the name of the record if this field exists. If the <I>-ids</I> option is specified, only IDs are -returned. <P><H4><A NAME="M15"></A>addressbook persons ?-ids? ?-ingroup <I>groupID</I>?</H4> +returned. <P><H4><A NAME="M16"></A>addressbook persons ?-ids? ?-ingroup <I>groupID</I>?</H4> This command returns a list of all the existing person records: if no option is specified, it is a list whose elements are sublists made of one or two items: the unique ID and, possibly, the name of the record if this field exists. If the <I>-ids</I> argument is specified, the returned list will contain only the unique IDs. If the <I>-ingroup</I> option is specified, only the members belonging to the group with ID <I>groupID</I> -will be returned.<P><H4><A NAME="M16"></A>addressbook property names (-groups | -persons)</H4> +will be returned.<P><H4><A NAME="M17"></A>addressbook property names (-groups | -persons)</H4> This command returns a list of all the properties defined in the database for group or person records. New properties can be created or removed with -the <B>addressbook property add</B> and <B>addressbook property remove</B> commands.<P><H4><A NAME="M17"></A>addressbook property type (-groups | -persons) <I>propName</I></H4> +the <B>addressbook property add</B> and <B>addressbook property remove</B> commands.<P><H4><A NAME="M18"></A>addressbook property type (-groups | -persons) <I>propName</I></H4> This command returns the type of the property specified by the <I>propName</I> argument. The returned type is one of the values listed with the <B>addressbook property add</B> command below -or <I>Unknown</I>. <P><H4><A NAME="M18"></A>addressbook property add (-groups | -persons) <I>propName</I> <I>propType</I></H4> +or <I>Unknown</I>. <P><H4><A NAME="M19"></A>addressbook property add (-groups | -persons) <I>propName</I> <I>propType</I></H4> This command lets you add a new property to the database, either for person or for group records. The name of the new property is specified by the <I>propName</I> argument: it must be unique. One can get the list of all the @@ -120,11 +127,11 @@ The type of the property is specified by the <I>propType</I> argument. This argument can have one of the following values: <I>Array, Data, Date, Dictionary, Integer, Real, String, MultiArray, MultiData, MultiDate, -MultiDictionary, MultiInteger, MultiReal, MultiString.</I><P><H4><A NAME="M19"></A>addressbook property remove (-groups | -persons) <I>propName</I></H4> +MultiDictionary, MultiInteger, MultiReal, MultiString.</I><P><H4><A NAME="M20"></A>addressbook property remove (-groups | -persons) <I>propName</I></H4> This command lets you remove a property from the database, either for person or for group records. The name of the property is specified in the <I>propName</I> argument. One can get the list of all the existing -properties with the <B>addressbook property names</B> command.<P><H4><A NAME="M20"></A>addressbook record <I>recordID</I></H4> +properties with the <B>addressbook property names</B> command.<P><H4><A NAME="M21"></A>addressbook record <I>recordID</I></H4> This command returns all the data available in the database concerning the record with unique ID <I>recordID</I>. The returned value takes the form of a keyed list. @@ -154,13 +161,16 @@ 00:00:00 CET 1970". <P> Note that keyed lists can be easily manipulated using the <B>keylget</B> and <B>keylset</B> commands defined in the TclX -extension.<P><H4><A NAME="M21"></A>addressbook save</H4> +extension.<P><H4><A NAME="M22"></A>addressbook remove <I>recordID</I> <I>groupID</I></H4> +This command lets you remove an already existing item (person or group) +designated by its unique ID <I>recordID</I> from the group with ID +<I>groupID</I>.<P><H4><A NAME="M23"></A>addressbook save</H4> This command lets you save the changes made in the database. Commands such as <B>addressbook set</B>, <B>addressbook create</B> or <B>addressbook delete</B> modify the data in memory: to make the changes definitive in the database, one must call explicitely the <B>addressbook save</B> command. To check whether there has been changes in the database, use the -<B>addressbook changed</B> command.<P><H4><A NAME="M22"></A>addressbook search ?(-groups | -persons)? ?-ids? ?-nocase? <I>property op value</I></H4> +<B>addressbook changed</B> command.<P><H4><A NAME="M24"></A>addressbook search ?(-groups | -persons)? ?-ids? ?-nocase? <I>property op value</I></H4> This command returns all the records corresponding to the criterion described by the last three arguments: <UL> @@ -197,7 +207,7 @@ a simple property, <I>value</I> will be a simple string. In the case of a MultiString, MultiInteger or MultiDate property, <I>value</I> will be a two-elements list representing a label/value pair. In the case of a -MultiDictionary property, <I> value </I> will be a two-elements list +MultiDictionary property, <I>value</I> will be a two-elements list representing a label/dictionary pair, the dictionary itself being a two-elements list representing a single key/value pair. For instance: <PRE> @@ -216,16 +226,16 @@ that no distinction be made between uppercase and lowercase letters. <P> To get a list of all possible properties, use the <B>addressbook property names</B> command. To know the type of a particular property, use -the <B>addressbook property type</B> command.<P><H4><A NAME="M23"></A>addressbook set <I>recordID propertyName</I> ?<I>value</I>?</H4> +the <B>addressbook property type</B> command.<P><H4><A NAME="M25"></A>addressbook set <I>recordID propertyName</I> ?<I>value</I>?</H4> This command lets you get or set the value of a particular property for the record with unique ID <I>recordID</I>. If the <I>value</I> argument is not specified, it returns the current value of the property specified in the <I>propertyName</I> argument. If <I>value</I> is specified, the property <I>propertyName</I> will be set to this value. See the <B>addressbook record</B> command for a description of the format used for the -various kinds of properties.<P><H4><A NAME="M24"></A>addressbook type <I>recordID</I></H4> +various kinds of properties.<P><H4><A NAME="M26"></A>addressbook type <I>recordID</I></H4> This command returns the type (<I>ABPerson</I> or <I>ABGroup</I>) of the record with -unique ID <I>recordID</I>.<P><H2><A NAME="M25"></A>INSTALLATION</H2> +unique ID <I>recordID</I>.<P><H2><A NAME="M27"></A>INSTALLATION</H2> The extension is made of two files: the dynamic library (called addressbook1.0.dylib in version 1.0) and a file pkgIndex.tcl necessary for Tcl to be able to locate the extension upon request. Both files are @@ -235,16 +245,18 @@ <B>auto_path</B> Tcl variable. If you use the extension within the AlphaX editor (version 8.0b11 or greater), you can also install it in the <I>Tclextensions</I> folder which is located at the same level as the -application. <P><H2><A NAME="M26"></A>VERSION HISTORY</H2> +application. <P><H2><A NAME="M28"></A>VERSION HISTORY</H2> <UL> <LI> 1.0b1 -- 2004/01/25 -- First public release. -</UL><P><H2><A NAME="M27"></A>REQUIREMENTS AND PORTABILITY</H2> + <LI> 1.1b1 -- 2004/08/01 -- New commands "add" and "remove". Modified +"delete" command. +</UL><P><H2><A NAME="M29"></A>REQUIREMENTS AND PORTABILITY</H2> This extension is only useful on Macintosh platforms. Version 10.2 or greater of the system is required: the AddressBook framework was introduced -in version 10.2 of the System (aka Jaguar).<P><H2><A NAME="M28"></A>KNOW ISSUES</H2> +in version 10.2 of the System (aka Jaguar).<P><H2><A NAME="M30"></A>KNOW ISSUES</H2> Tcladdressbook was written by Bernard Desgraupes. Please e-mail any bug or problem you encounter: -<A HREF="mailto:bde...@us...">bde...@us...</A><P><H2><A NAME="M29"></A>SOURCE CODE</H2> +<A HREF="mailto:bde...@us...">bde...@us...</A><P><H2><A NAME="M31"></A>SOURCE CODE</H2> Tcladdressbook is an Open Source Project. Its source code is public and can be found on the SourceForge site at the following address: <P> <A HREF="http://sourceforge.net/projects/tcladdressbook">http://sourceforge.net/projects/tcladdressbook</A><P><P> Tcladdressbook binary releases are available at @@ -253,17 +265,17 @@ <P> <A HREF="http://webperso.easyconnect.fr/bdesgraupes/tcl.html">http://webperso.easyconnect.fr/bdesgraupes/tcl.html</A><P><P> The code is under CVS control. You can retrieve the latest stage of development using any CVS client. See instructions at: <P> <A HREF="http://sourceforge.net/cvs/?group_id=96169">http://sourceforge.net/cvs/?group_id=96169</A><P><P> You can also browse the cvs repository online at -<P> <A HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook">http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook</A> <P><H2><A NAME="M30"></A>CONTRIBUTIONS</H2> +<P> <A HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook">http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook</A> <P><H2><A NAME="M32"></A>CONTRIBUTIONS</H2> Code contributions (Tcl scripts making use of the Tcladdressbook extension) are very welcome. There is a "Contribs" directory in the Tcladdressbook project on SourceForge for code contributions. They must be free software, distributed under an Open Source license acceptable by the SourceForge site -(for instance, the same licensing terms as the Tcl language itself).<P><H2><A NAME="M31"></A>LICENSE AND DISCLAIMER</H2> +(for instance, the same licensing terms as the Tcl language itself).<P><H2><A NAME="M33"></A>LICENSE AND DISCLAIMER</H2> This software is free software and distributed under the same licensing terms -as the Tcl language itself. See license.terms in the Tcl distribution.<P><P> © Copyright Bernard Desgraupes 2003-2004<P><H2><A NAME="M32"></A>SEE ALSO</H2> +as the Tcl language itself. See license.terms in the Tcl distribution.<P><P> © Copyright Bernard Desgraupes 2003-2004<P><H2><A NAME="M34"></A>SEE ALSO</H2> See the TclX extension for keyed lists: TclX(n). See the Mk4Tcl extension for -commands to open directly the database file.<P><H2><A NAME="M33"></A>KEYWORDS</H2> +commands to open directly the database file.<P><H2><A NAME="M35"></A>KEYWORDS</H2> Address book, data base.<P><HR> -<P> Last updated 2004-01-24 13:24:29<P> +<P> Last updated 2004-07-29 01:08:28<P> </BODY> </HTML> \ No newline at end of file |
|
From: Bernard D. <bde...@us...> - 2004-07-28 23:11:41
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19423/Help Modified Files: TclAddressBookHelp.aida Log Message: New "add" and "remove" subcommands Index: TclAddressBookHelp.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.aida,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- TclAddressBookHelp.aida 26 Jan 2004 23:08:43 -0000 1.12 +++ TclAddressBookHelp.aida 28 Jul 2004 23:11:30 -0000 1.13 @@ -1,11 +1,11 @@ -:Title: Tcladdressbook Help +:Title: TcladdressbookHelp :Project: addressbook extension for Tcl :Version: $Revision$ :CVSDate: $Date$ :Author: Bernard Desgraupes <bde...@ea...> :Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> :Created: 2003-11-26 14:30:03 -:Modified: 2004-01-23 22:26:20 +:Modified: 2004-07-29 01:05:03 :Keywords: Address book, data base ((if $aida_params(target) eq "Pdf" @@ -45,6 +45,11 @@ ((s1 SUBCOMMANDS +((s3 addressbook add ((i recordID i)) ((i groupID i)) +This command lets you add an already existing item (person or group) +designated by its unique ID ((i recordID i)) to the group with ID +((i groupID i)). + ((s3 addressbook changed This command returns 1 if there has been changes made to the database, 0 otherwise. Changes are made in memory with commands such as ((b addressbook @@ -65,11 +70,13 @@ particular group with unique ID ((i groupID i)). If no error occurs, the command returns the unique ID of the created record. -((s3 addressbook delete ((i recordID i)) ?-fromgroup ((i groupID i))? +((s3 addressbook delete ((i recordID i)) This command removes the record with unique ID ((i recordID i)) from the -database or from a particular subgroup specified by its unique ID with the -((i -fromgroup i)) option. Note that any changes made to the database won't -be definitive until you invoke the ((b addressbook save b)) command. +database. Note that any changes made to the database won't be definitive +until you invoke the ((b addressbook save b)) command. +((nl In version 1.0 of the extension, this command used to accept an option +called ((i -fromgroup i)) in order to remove the record from a particular +subgroup. This is achieved now by the ((b addressbook remove b)) command. ((s3 addressbook export ((i personID i)) This command lets you export the record with unique ID ((i personID i)) as @@ -181,6 +188,11 @@ using the ((b keylget b)) and ((b keylset b)) commands defined in the TclX extension. +((s3 addressbook remove ((i recordID i)) ((i groupID i)) +This command lets you remove an already existing item (person or group) +designated by its unique ID ((i recordID i)) from the group with ID +((i groupID i)). + ((s3 addressbook save This command lets you save the changes made in the database. Commands such as ((b addressbook set b)), ((b addressbook create b)) or ((b addressbook @@ -253,7 +265,6 @@ property names b)) command. To know the type of a particular property, use the ((b addressbook property type b)) command. - ((s3 addressbook set ((i recordID propertyName i)) ?((i value i))? This command lets you get or set the value of a particular property for the record with unique ID ((i recordID i)). If the ((i value i)) argument is @@ -284,6 +295,8 @@ ((s1 VERSION HISTORY ((lu ((li 1.0b1 -- 2004/01/25 -- First public release. +((li 1.1b1 -- 2004/08/01 -- New commands "add" and "remove". Modified +"delete" command. lu)) |
|
From: Bernard D. <bde...@us...> - 2004-07-28 23:11:30
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19366/Help Modified Files: TclAddressBookHelp Log Message: New "add" and "remove" subcommands Index: TclAddressBookHelp =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- TclAddressBookHelp 26 Jan 2004 23:08:17 -0000 1.13 +++ TclAddressBookHelp 28 Jul 2004 23:11:06 -0000 1.14 @@ -5,17 +5,18 @@ Abstract This is a manual page for the Tcladdressbook extension for Tcl. It -documents version 1.0b1. +documents version 1.1b1. 1. NAME 2. SYNOPSIS 3. INTRODUCTION 4. SUBCOMMANDS + addressbook add recordID groupID addressbook changed addressbook count (-groups | -persons) ?-ingroup groupID? addressbook create (group | person) name ?-ingroup groupID? - addressbook delete recordID ?-fromgroup groupID? + addressbook delete recordID addressbook export personID addressbook getme addressbook groups ?-ids? ?-ingroup groupID? @@ -28,6 +29,7 @@ addressbook property add (-groups | -persons) propName propType addressbook property remove (-groups | -persons) propName addressbook record recordID + addressbook remove recordID groupID addressbook save addressbook search ?(-groups | -persons)? ?-ids? ?-nocase? property op value addressbook set recordID propertyName ?value? @@ -50,7 +52,7 @@ 2. SYNOPSIS package require addressbook -addressbook subcommand ?arg arg...? + addressbook subcommand ?arg arg...? 3. INTRODUCTION @@ -61,6 +63,11 @@ 4. SUBCOMMANDS + addressbook add recordID groupID +This command lets you add an already existing item (person or group) +designated by its unique ID recordID to the group with ID +groupID. + addressbook changed This command returns 1 if there has been changes made to the database, 0 otherwise. Changes are made in memory with commands such as addressbook @@ -81,11 +88,13 @@ particular group with unique ID groupID. If no error occurs, the command returns the unique ID of the created record. - addressbook delete recordID ?-fromgroup groupID? + addressbook delete recordID This command removes the record with unique ID recordID from the -database or from a particular subgroup specified by its unique ID with the --fromgroup option. Note that any changes made to the database won't -be definitive until you invoke the addressbook save command. +database. Note that any changes made to the database won't be definitive +until you invoke the addressbook save command. + In version 1.0 of the extension, this command used to accept an option +called -fromgroup in order to remove the record from a particular +subgroup. This is achieved now by the addressbook remove command. addressbook export personID This command lets you export the record with unique ID personID as @@ -169,7 +178,7 @@ This command returns all the data available in the database concerning the record with unique ID recordID. The returned value takes the form of a keyed list. -The format used for a particular property's value depends on the type of + The format used for a particular property's value depends on the type of the property (string, integer, date, multivalue etc.). Some properties have a multiple type: MultiString for fields like Email, Phone etc., MultiDate for fields like ABDate, MultiDictionary for the Address field. In case of a @@ -189,13 +198,18 @@ addresses: each address will be returned as a Label/Dictionary pair; the elements of the dictionary are pairs like {City Paris} or {CountryCode fr}. -Dates are returned as values suitable for use with the clock + Dates are returned as values suitable for use with the clock format Tcl command. It is the number of seconds relative to "Thu Jan 01 00:00:00 CET 1970". -Note that keyed lists can be easily manipulated + Note that keyed lists can be easily manipulated using the keylget and keylset commands defined in the TclX extension. + addressbook remove recordID groupID +This command lets you remove an already existing item (person or group) +designated by its unique ID recordID from the group with ID +groupID. + addressbook save This command lets you save the changes made in the database. Commands such as addressbook set, addressbook create or addressbook @@ -245,28 +259,27 @@ a simple property, value will be a simple string. In the case of a MultiString, MultiInteger or MultiDate property, value will be a two-elements list representing a label/value pair. In the case of a -MultiDictionary property, value will be a two-elements list +MultiDictionary property, value will be a two-elements list representing a label/dictionary pair, the dictionary itself being a two-elements list representing a single key/value pair. For instance: {Phone "01 02 03 04 05"} {Home {City Paris}} -One can specify an empty string for the label in order to perform the + One can specify an empty string for the label in order to perform the search over all the possible labels. One can also specify an empty string for the key in order to perform the search over all the possible keys in a dictionary. -The -groups or -persons options let you specify the + The -groups or -persons options let you specify the kind of records you want to search. If it is not specified, the default is -person. If the -ids option is specified, only IDs of the matching records are returned, rather than pairs made of the ID and the name. The -nocase argument concerns string comparisons and requires that no distinction be made between uppercase and lowercase letters. -To get a list of all possible properties, use the addressbook + To get a list of all possible properties, use the addressbook property names command. To know the type of a particular property, use the addressbook property type command. - addressbook set recordID propertyName ?value? This command lets you get or set the value of a particular property for the record with unique ID recordID. If the value argument is @@ -296,6 +309,8 @@ 6. VERSION HISTORY 1.0b1 -- 2004/01/25 -- First public release. + 1.1b1 -- 2004/08/01 -- New commands "add" and "remove". Modified +"delete" command. @@ -314,19 +329,19 @@ 9. SOURCE CODE Tcladdressbook is an Open Source Project. Its source code is public and can be found on the SourceForge site at the following address: -<http://sourceforge.net/projects/tcladdressbook> + <http://sourceforge.net/projects/tcladdressbook> -Tcladdressbook binary releases are available at -<http://sourceforge.net/project/showfiles.php?group_id=96169> + Tcladdressbook binary releases are available at + <http://sourceforge.net/project/showfiles.php?group_id=96169> or on my web page at -<http://webperso.easyconnect.fr/bdesgraupes/tcl.html> + <http://webperso.easyconnect.fr/bdesgraupes/tcl.html> -The code is under CVS control. You can retrieve the latest stage of + The code is under CVS control. You can retrieve the latest stage of development using any CVS client. See instructions at: -<http://sourceforge.net/cvs/?group_id=96169> + <http://sourceforge.net/cvs/?group_id=96169> -You can also browse the cvs repository online at -<http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook> + You can also browse the cvs repository online at + <http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook> 10. CONTRIBUTIONS Code contributions (Tcl scripts making use of the Tcladdressbook extension) @@ -339,7 +354,7 @@ This software is free software and distributed under the same licensing terms as the Tcl language itself. See license.terms in the Tcl distribution. -© Copyright Bernard Desgraupes 2003-2004 + © Copyright Bernard Desgraupes 2003-2004 12. SEE ALSO See the TclX extension for keyed lists: TclX(n). See the Mk4Tcl extension for @@ -350,7 +365,7 @@ ---------------------------------------------------------------------- -Last updated 2004-01-24 13:25:56 + Last updated 2004-07-29 01:09:25 |
|
From: Bernard D. <bde...@us...> - 2004-07-28 23:11:08
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19298/Help Modified Files: tcladdressbook.n Log Message: New "add" and "remove" subcommands Index: tcladdressbook.n =================================================================== RCS file: /cvsroot/tcladdressbook/Help/tcladdressbook.n,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- tcladdressbook.n 26 Jan 2004 23:07:51 -0000 1.3 +++ tcladdressbook.n 28 Jul 2004 23:10:57 -0000 1.4 @@ -1,83 +1,70 @@ .de uline \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m' .. -.TH tcladdressbook n "" "2004-01-24" "addressbook extension for Tcl" -.PP +.TH tcladdressbook n "" "2004-07-29" "addressbook extension for Tcl" .SH NAME .PP -.PP addressbook - manipulate the Macintosh OSX Address Book database -.PP .SH SYNOPSIS .PP -.PP \fBpackage require addressbook\fP .PP \fBaddressbook subcommand\fP ?\fI arg arg\fP...? -.PP .SH INTRODUCTION .PP -.PP The argument \fI subcommand\fP indicates what operation to perform. Any unique abbreviation for each subcommand is acceptable. The valid subcommands are explained in the next sections. -.PP .SH SUBCOMMANDS .PP +.SS addressbook add \fI recordID\fP \fI groupID\fP .PP +This command lets you add an already existing item (person or group) +designated by its unique ID \fI recordID\fP to the group with ID +\fI groupID\fP. .SS addressbook changed .PP -.PP This command returns 1 if there has been changes made to the database, 0 otherwise. Changes are made in memory with commands such as \fBaddressbook set\fP, \fBaddressbook create\fP, \fBaddressbook delete\fP. To make these changes permanent, one must call the \fBaddressbook save\fP command. -.PP .SS addressbook count (-groups | -persons) ?-ingroup \fI groupID\fP? .PP -.PP This command returns the count of existing groups or persons in the database. One can specify a particular group with the -ingroup option to count only the subgroups or members in this group. -.PP .SS addressbook create (group | person) \fI name\fP ?-ingroup \fI groupID\fP? .PP -.PP This command lets you create a new group or a new person record. The \fI name\fP argument is the name to give to the new group or the last name of the person for which a new record is created. With the \fI -ingroup\fP option one can make the newly created record a subgroup or a member of the particular group with unique ID \fI groupID\fP. If no error occurs, the command returns the unique ID of the created record. -.PP -.SS addressbook delete \fI recordID\fP ?-fromgroup \fI groupID\fP? -.PP +.SS addressbook delete \fI recordID\fP .PP This command removes the record with unique ID \fI recordID\fP from the -database or from a particular subgroup specified by its unique ID with the -\fI -fromgroup\fP option. Note that any changes made to the database won't -be definitive until you invoke the \fBaddressbook save\fP command. +database. Note that any changes made to the database won't be definitive +until you invoke the \fBaddressbook save\fP command. .PP + In version 1.0 of the extension, this command used to accept an option +called \fI -fromgroup\fP in order to remove the record from a particular +subgroup. This is achieved now by the \fBaddressbook remove\fP command. .SS addressbook export \fI personID\fP .PP -.PP This command lets you export the record with unique ID \fI personID\fP as a VCard. The result should be considered as binary data since it can contain an image associated to the record. -.PP .SS addressbook getme .PP -.PP This command returns all the data available in the database concerning the logged-in user ("Me"). The returned value takes the form of a keyed list: see the \fBaddressbook record\fP command for a description of this format. Keyed lists can be easily manipulated with the \fBkeylget\fP and \fBkeylset\fP commands defined in the TclX extension. -.PP .SS addressbook groups ?-ids? ?-ingroup \fI groupID\fP? .PP -.PP This command returns a list of all the existing group records: if no option is specified, it is a list whose elements are sublists made of two elements. The first element is the unique ID associated with the group and @@ -85,37 +72,29 @@ returned list will contain only the unique IDs of the groups. If the \fI -ingroup\fP option is specified, only the subgroups contained in the group with ID \fI groupID\fP will be returned. -.PP .SS addressbook image \fI personID\fP ?\fI imageData\fP? .PP -.PP If no \fI imageData\fP argument is specified, this command returns the custom image associated with the record corresponding to the unique ID \fI personID\fP. The returned bytes are binary data. If no image exists, it raises an error. If an \fI imageData\fP argument is specified, it should contain valid binary data defining an image which will be associated the record with unique ID \fI personID\fP. -.PP .SS addressbook import \fI vCardData\fP .PP -.PP This command imports data in VCard format. The data specified by the \fI vCardData\fP argument must be valid data in VCard format: a new record is created in the database corresponding to the information contained in the VCard. Note that the data can be binary if the VCard contains an image. -.PP .SS addressbook parents ?-ids? \fI recordID\fP .PP -.PP This command returns a list of all the groups the record with unique ID \fI recordID\fP belongs to. The elements of this list are sublists made of one or two items: the unique ID and, possibly, the name of the record if this field exists. If the \fI -ids\fP option is specified, only IDs are returned. -.PP .SS addressbook persons ?-ids? ?-ingroup \fI groupID\fP? .PP -.PP This command returns a list of all the existing person records: if no option is specified, it is a list whose elements are sublists made of one or two items: the unique ID and, possibly, the name of the record if this @@ -123,25 +102,19 @@ will contain only the unique IDs. If the \fI -ingroup\fP option is specified, only the members belonging to the group with ID \fI groupID\fP will be returned. -.PP .SS addressbook property names (-groups | -persons) .PP -.PP This command returns a list of all the properties defined in the database for group or person records. New properties can be created or removed with the \fBaddressbook property add\fP and \fBaddressbook property remove\fP commands. -.PP .SS addressbook property type (-groups | -persons) \fI propName\fP .PP -.PP This command returns the type of the property specified by the \fI propName\fP argument. The returned type is one of the values listed with the \fBaddressbook property add\fP command below or \fI Unknown\fP. -.PP .SS addressbook property add (-groups | -persons) \fI propName\fP \fI propType\fP .PP -.PP This command lets you add a new property to the database, either for person or for group records. The name of the new property is specified by the \fI propName\fP argument: it must be unique. One can get the list of all the @@ -150,18 +123,14 @@ This argument can have one of the following values: \fI Array, Data, Date, Dictionary, Integer, Real, String, MultiArray, MultiData, MultiDate, MultiDictionary, MultiInteger, MultiReal, MultiString.\fP -.PP .SS addressbook property remove (-groups | -persons) \fI propName\fP .PP -.PP This command lets you remove a property from the database, either for person or for group records. The name of the property is specified in the \fI propName\fP argument. One can get the list of all the existing properties with the \fBaddressbook property names\fP command. -.PP .SS addressbook record \fI recordID\fP .PP -.PP This command returns all the data available in the database concerning the record with unique ID \fI recordID\fP. The returned value takes the form of a keyed list. @@ -173,12 +142,10 @@ multivalue, the returned value is a keyed list itself. Each element of the list corresponds to a single property. For instance: .RS -.PP .IP * 4 the elements of a MultiString or MultiDate value list are two-elements sublists: the first element is the label of the corresponding property (like Home, Work etc.) and the second is the value itself. -.PP .IP * 4 the elements of a MultiDictionary value list are lists themselves, representing a Label/Dictionary pair (dictionary in the AddressBook sense, @@ -190,10 +157,8 @@ the value associated with this key. For instance a person could have two addresses: each address will be returned as a Label/Dictionary pair; the elements of the dictionary are pairs like {City Paris} or {CountryCode fr}. -.PP .RE .PP -.PP Dates are returned as values suitable for use with the \fBclock format\fP Tcl command. It is the number of seconds relative to "Thu Jan 01 00:00:00 CET 1970". @@ -201,27 +166,26 @@ Note that keyed lists can be easily manipulated using the \fBkeylget\fP and \fBkeylset\fP commands defined in the TclX extension. +.SS addressbook remove \fI recordID\fP \fI groupID\fP .PP +This command lets you remove an already existing item (person or group) +designated by its unique ID \fI recordID\fP from the group with ID +\fI groupID\fP. .SS addressbook save .PP -.PP This command lets you save the changes made in the database. Commands such as \fBaddressbook set\fP, \fBaddressbook create\fP or \fBaddressbook delete\fP modify the data in memory: to make the changes definitive in the database, one must call explicitely the \fBaddressbook save\fP command. To check whether there has been changes in the database, use the \fBaddressbook changed\fP command. -.PP .SS addressbook search ?(-groups | -persons)? ?-ids? ?-nocase? \fI property op value\fP .PP -.PP This command returns all the records corresponding to the criterion described by the last three arguments: .RS -.PP .IP * 4 \fI property\fP is the name of the property you are searching on. -.PP .IP * 4 \fI op\fP is an operator specifying the type of comparison. It can be one of the following symbols: @@ -235,7 +199,6 @@ which may have different interpretations depending on whether the value is numeric or is a string. .RS -.PP .IP * 8 For a numeric value, they correspond respectively to: .RS @@ -252,7 +215,6 @@ .RE .sp The ^= operator is not applicable (and will default to Greater Than or Equal). -.PP .IP * 8 For a string value, they correspond respectively to: .RS @@ -269,15 +231,13 @@ .RE .sp The < and <= operators are not applicable and will both default to Equal. -.PP .RE -.PP .IP * 4 the argument \fI value\fP is the value you are searching for. In the case of a simple property, \fI value\fP will be a simple string. In the case of a MultiString, MultiInteger or MultiDate property, \fI value\fP will be a two-elements list representing a label/value pair. In the case of a -MultiDictionary property, \fI value \fP will be a two-elements list +MultiDictionary property, \fI value\fP will be a two-elements list representing a label/dictionary pair, the dictionary itself being a two-elements list representing a single key/value pair. For instance: .RS @@ -292,10 +252,8 @@ One can specify an empty string for the label in order to perform the search over all the possible labels. One can also specify an empty string for the key in order to perform the search over all the possible keys in a dictionary. -.PP .RE .PP -.PP The \fI -groups\fP or \fI -persons\fP options let you specify the kind of records you want to search. If it is not specified, the default is \fI -person\fP. If the \fI -ids\fP option is specified, only IDs of the @@ -306,10 +264,8 @@ To get a list of all possible properties, use the \fBaddressbook property names\fP command. To know the type of a particular property, use the \fBaddressbook property type\fP command. -.PP .SS addressbook set \fI recordID propertyName\fP ?\fI value\fP? .PP -.PP This command lets you get or set the value of a particular property for the record with unique ID \fI recordID\fP. If the \fI value\fP argument is not specified, it returns the current value of the property specified in @@ -317,16 +273,12 @@ property \fI propertyName\fP will be set to this value. See the \fBaddressbook record\fP command for a description of the format used for the various kinds of properties. -.PP .SS addressbook type \fI recordID\fP .PP -.PP This command returns the type (\fI ABPerson\fP or \fI ABGroup\fP) of the record with unique ID \fI recordID\fP. -.PP .SH INSTALLATION .PP -.PP The extension is made of two files: the dynamic library (called addressbook1.0.dylib in version 1.0) and a file pkgIndex.tcl necessary for Tcl to be able to locate the extension upon request. Both files are @@ -337,40 +289,32 @@ editor (version 8.0b11 or greater), you can also install it in the \fI Tclextensions\fP folder which is located at the same level as the application. -.PP .SH VERSION HISTORY .PP -.PP .RS -.PP .IP * 4 1.0b1 -- 2004/01/25 -- First public release. -.PP +.IP * 4 +1.1b1 -- 2004/08/01 -- New commands "add" and "remove". Modified +"delete" command. .RE -.PP .SH REQUIREMENTS AND PORTABILITY .PP -.PP This extension is only useful on Macintosh platforms. Version 10.2 or greater of the system is required: the AddressBook framework was introduced in version 10.2 of the System (aka Jaguar). -.PP .SH KNOW ISSUES .PP -.PP Tcladdressbook was written by Bernard Desgraupes. Please e-mail any bug or problem you encounter: <bde...@us...> -.PP .SH SOURCE CODE .PP -.PP Tcladdressbook is an Open Source Project. Its source code is public and can be found on the SourceForge site at the following address: .PP <http://sourceforge.net/projects/tcladdressbook> .PP -.PP Tcladdressbook binary releases are available at .PP <http://sourceforge.net/project/showfiles.php?group_id=96169> @@ -378,47 +322,34 @@ .PP <http://webperso.easyconnect.fr/bdesgraupes/tcl.html> .PP -.PP The code is under CVS control. You can retrieve the latest stage of development using any CVS client. See instructions at: .PP <http://sourceforge.net/cvs/?group_id=96169> .PP -.PP You can also browse the cvs repository online at .PP <http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook> -.PP .SH CONTRIBUTIONS .PP -.PP Code contributions (Tcl scripts making use of the Tcladdressbook extension) are very welcome. There is a "Contribs" directory in the Tcladdressbook project on SourceForge for code contributions. They must be free software, distributed under an Open Source license acceptable by the SourceForge site (for instance, the same licensing terms as the Tcl language itself). -.PP .SH LICENSE AND DISCLAIMER .PP -.PP This software is free software and distributed under the same licensing terms as the Tcl language itself. See license.terms in the Tcl distribution. .PP -.PP © Copyright Bernard Desgraupes 2003-2004 -.PP .SH SEE ALSO .PP -.PP See the TclX extension for keyed lists: TclX(n). See the Mk4Tcl extension for commands to open directly the database file. -.PP .SH KEYWORDS .PP -.PP Address book, data base. .PP -.PP \l'70\(ul' .PP -.PP |
|
From: <bde...@pr...> - 2004-01-28 09:22:08
|
Update of /cvsroot/tcladdressbook/Contribs/Tcl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29474/Contribs/Tcl Modified Files: ABtoTclArrays.tcl Log Message: More informative header Index: ABtoTclArrays.tcl =================================================================== RCS file: /cvsroot/tcladdressbook/Contribs/Tcl/ABtoTclArrays.tcl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ABtoTclArrays.tcl 5 Jan 2004 13:27:00 -0000 1.1 +++ ABtoTclArrays.tcl 28 Jan 2004 09:20:57 -0000 1.2 @@ -6,7 +6,9 @@ # Description: export the records from the Address Book to Tcl arrays. This # script creates a Tcl script file which can be sourced to create three # arrays called respectively persons, parents and groups. The keys of these -# arrays are the IDs of the records. +# arrays are the IDs of the records. Note that, depending on the system +# you work with, you might have to fconfigure the file encoding to an +# appropriate value (see in the script below). # # This software is free software and distributed under the same licensing terms # as the Tcl language itself. See license.terms in the Tcl distribution. @@ -47,9 +49,12 @@ } set fd [open addressbook.txt w] + +# ------------------------------------------------------------- # Here, configure the file stream to the appropriate encoding # (iso8859-1, macRoman...) fconfigure $fd -encoding macRoman +# ------------------------------------------------------------- puts $fd "array set persons {" foreach {n v} [array get persons] { |
|
From: <bde...@pr...> - 2004-01-26 23:10:26
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19757/Help Modified Files: TclAddressBookHelp.html Log Message: Update for 1.0b1 release Index: TclAddressBookHelp.html =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.html,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- TclAddressBookHelp.html 6 Jan 2004 06:59:03 -0000 1.14 +++ TclAddressBookHelp.html 26 Jan 2004 23:09:14 -0000 1.15 @@ -4,13 +4,9 @@ <META NAME=GENERATOR CONTENT="Aida Mode"> </HEAD> <BODY> -<!-- :Title: Tcladdressbook Help --> -<!-- :Project: addressbook extension for Tcl --> -<!-- :Author: Bernard Desgraupes <A HREF="mailto:bde...@ea...">bde...@ea...</A> --> -<!-- :Homepage: <A HREF="http://webperso.easyconnect.fr/bdesgraupes/">http://webperso.easyconnect.fr/bdesgraupes/</A> --> -<!-- :Modified: 2004-01-05 06:42:28 --><P><!-- logo --> +<P><!-- logo --> <P><IMG SRC="Images/TclAB_logo.gif " ALT="TclAB Logo" ALIGN=bottom></P> -<P> <A href="TclAB.html"> Home Page</A> | <A href="http://sourceforge.net/projects/tcladdressbook"> Project Page at SourceForge</A><P><HR><BLOCKQUOTE><P><I> +<P> <A HREF="TclAB.html"> Home Page</A> | <A HREF="http://sourceforge.net/projects/tcladdressbook"> Project Page at SourceForge</A><P><HR><BLOCKQUOTE><P><I> This is a manual page for the Tcladdressbook extension for Tcl. It documents version 1.0b1. </I></P></BLOCKQUOTE><HR> @@ -43,81 +39,80 @@ <LI><A HREF="#M26">VERSION HISTORY</A> <LI><A HREF="#M27">REQUIREMENTS AND PORTABILITY</A> <LI><A HREF="#M28">KNOW ISSUES</A> -<LI><A HREF="#M29">LICENSE AND DISCLAIMER</A> -<LI><A HREF="#M30">SOURCE CODE</A> -<LI><A HREF="#M31">CONTRIBUTIONS</A> +<LI><A HREF="#M29">SOURCE CODE</A> +<LI><A HREF="#M30">CONTRIBUTIONS</A> +<LI><A HREF="#M31">LICENSE AND DISCLAIMER</A> <LI><A HREF="#M32">SEE ALSO</A> <LI><A HREF="#M33">KEYWORDS</A> -</UL><P><P><H2><A NAME="M1"></A> NAME</H2> -addressbook - manipulate the Macintosh OSX Address Book database<P><H2><A NAME="M2"></A> SYNOPSIS</H2> -<PRE> - package require addressbook - addressbook subcommand ?arg arg ...? -</PRE><P><H2><A NAME="M3"></A> INTRODUCTION</H2><P>The argument <I>subcommand</I> indicates what operation to perform. Any +</UL> +<P><H2><A NAME="M1"></A>NAME</H2> +addressbook - manipulate the Macintosh OSX Address Book database<P><H2><A NAME="M2"></A>SYNOPSIS</H2> +<B>package require addressbook</B> +<P> <B>addressbook subcommand</B> ?<I>arg arg</I>...?<P><H2><A NAME="M3"></A>INTRODUCTION</H2><P>The argument <I>subcommand</I> indicates what operation to perform. Any unique abbreviation for each subcommand is acceptable. The valid -subcommands are explained in the next sections.<P><H2><A NAME="M4"></A> SUBCOMMANDS</H2><P><H4><A NAME="M5"></A> addressbook changed</H4> +subcommands are explained in the next sections.<P><H2><A NAME="M4"></A>SUBCOMMANDS</H2><P><H4><A NAME="M5"></A>addressbook changed</H4> This command returns 1 if there has been changes made to the database, 0 otherwise. Changes are made in memory with commands such as <B>addressbook set</B>, <B>addressbook create</B>, <B>addressbook delete</B>. To make these changes permanent, one must call the <B>addressbook save</B> -command. <P><H4><A NAME="M6"></A> addressbook count (-groups | -persons) ?-ingroup <I>groupID</I>?</H4> +command. <P><H4><A NAME="M6"></A>addressbook count (-groups | -persons) ?-ingroup <I>groupID</I>?</H4> This command returns the count of existing groups or persons in the database. One can specify a particular group with the -ingroup option -to count only the subgroups or members in this group.<P><H4><A NAME="M7"></A> addressbook create (group | person) <I>name</I> ?-ingroup <I>groupID</I>?</H4> +to count only the subgroups or members in this group.<P><H4><A NAME="M7"></A>addressbook create (group | person) <I>name</I> ?-ingroup <I>groupID</I>?</H4> This command lets you create a new group or a new person record. The <I>name</I> argument is the name to give to the new group or the last name of the person for which a new record is created. With the <I>-ingroup</I> option one can make the newly created record a subgroup or a member of the particular group with unique ID <I>groupID</I>. If no error occurs, the -command returns the unique ID of the created record.<P><H4><A NAME="M8"></A> addressbook delete <I>recordID</I> ?-fromgroup <I>groupID</I>?</H4> +command returns the unique ID of the created record.<P><H4><A NAME="M8"></A>addressbook delete <I>recordID</I> ?-fromgroup <I>groupID</I>?</H4> This command removes the record with unique ID <I>recordID</I> from the database or from a particular subgroup specified by its unique ID with the <I>-fromgroup</I> option. Note that any changes made to the database won't -be definitive until you invoke the <B>addressbook save</B> command.<P><H4><A NAME="M9"></A> addressbook export <I>personID</I></H4> +be definitive until you invoke the <B>addressbook save</B> command.<P><H4><A NAME="M9"></A>addressbook export <I>personID</I></H4> This command lets you export the record with unique ID <I>personID</I> as a VCard. The result should be considered as binary data since it can -contain an image associated to the record.<P><H4><A NAME="M10"></A> addressbook getme</H4> +contain an image associated to the record.<P><H4><A NAME="M10"></A>addressbook getme</H4> This command returns all the data available in the database concerning the logged-in user ("Me"). The returned value takes the form of a keyed list: see the <B>addressbook record</B> command for a description of this format. Keyed lists can be easily manipulated with the -<B>keylget</B> and <B>keylset</B> commands defined in the TclX extension.<P><H4><A NAME="M11"></A> addressbook groups ?-ids? ?-ingroup <I>groupID</I>?</H4> +<B>keylget</B> and <B>keylset</B> commands defined in the TclX extension.<P><H4><A NAME="M11"></A>addressbook groups ?-ids? ?-ingroup <I>groupID</I>?</H4> This command returns a list of all the existing group records: if no option is specified, it is a list whose elements are sublists made of two elements. The first element is the unique ID associated with the group and the second is its name. If the <I>-ids</I> argument is specified, the returned list will contain only the unique IDs of the groups. If the <I>-ingroup</I> option is specified, only the subgroups contained in the group -with ID <I>groupID</I> will be returned.<P><H4><A NAME="M12"></A> addressbook image <I>personID</I> ?<I>imageData</I>?</H4> +with ID <I>groupID</I> will be returned.<P><H4><A NAME="M12"></A>addressbook image <I>personID</I> ?<I>imageData</I>?</H4> If no <I>imageData</I> argument is specified, this command returns the custom image associated with the record corresponding to the unique ID <I>personID</I>. The returned bytes are binary data. If no image exists, it raises an error. If an <I>imageData</I> argument is specified, it should contain valid binary data defining an image which will be associated the -record with unique ID <I>personID</I>.<P><H4><A NAME="M13"></A> addressbook import <I>vCardData</I></H4> +record with unique ID <I>personID</I>.<P><H4><A NAME="M13"></A>addressbook import <I>vCardData</I></H4> This command imports data in VCard format. The data specified by the <I>vCardData</I> argument must be valid data in VCard format: a new record is created in the database corresponding to the information contained in the -VCard. Note that the data can be binary if the VCard contains an image.<P><H4><A NAME="M14"></A> addressbook parents ?-ids? <I>recordID</I></H4> +VCard. Note that the data can be binary if the VCard contains an image.<P><H4><A NAME="M14"></A>addressbook parents ?-ids? <I>recordID</I></H4> This command returns a list of all the groups the record with unique ID <I>recordID</I> belongs to. The elements of this list are sublists made of one or two items: the unique ID and, possibly, the name of the record if this field exists. If the <I>-ids</I> option is specified, only IDs are -returned. <P><H4><A NAME="M15"></A> addressbook persons ?-ids? ?-ingroup <I>groupID</I>?</H4> +returned. <P><H4><A NAME="M15"></A>addressbook persons ?-ids? ?-ingroup <I>groupID</I>?</H4> This command returns a list of all the existing person records: if no option is specified, it is a list whose elements are sublists made of one or two items: the unique ID and, possibly, the name of the record if this field exists. If the <I>-ids</I> argument is specified, the returned list will contain only the unique IDs. If the <I>-ingroup</I> option is specified, only the members belonging to the group with ID <I>groupID</I> -will be returned.<P><H4><A NAME="M16"></A> addressbook property names (-groups | -persons)</H4> +will be returned.<P><H4><A NAME="M16"></A>addressbook property names (-groups | -persons)</H4> This command returns a list of all the properties defined in the database for group or person records. New properties can be created or removed with -the <B>addressbook property add</B> and <B>addressbook property remove</B> commands.<P><H4><A NAME="M17"></A> addressbook property type (-groups | -persons) <I>propName</I></H4> +the <B>addressbook property add</B> and <B>addressbook property remove</B> commands.<P><H4><A NAME="M17"></A>addressbook property type (-groups | -persons) <I>propName</I></H4> This command returns the type of the property specified by the <I>propName</I> argument. The returned type is one of the values listed with the <B>addressbook property add</B> command below -or <I>Unknown</I>. <P><H4><A NAME="M18"></A> addressbook property add (-groups | -persons) <I>propName</I> <I>propType</I></H4> +or <I>Unknown</I>. <P><H4><A NAME="M18"></A>addressbook property add (-groups | -persons) <I>propName</I> <I>propType</I></H4> This command lets you add a new property to the database, either for person or for group records. The name of the new property is specified by the <I>propName</I> argument: it must be unique. One can get the list of all the @@ -125,11 +120,11 @@ The type of the property is specified by the <I>propType</I> argument. This argument can have one of the following values: <I>Array, Data, Date, Dictionary, Integer, Real, String, MultiArray, MultiData, MultiDate, -MultiDictionary, MultiInteger, MultiReal, MultiString.</I><P><H4><A NAME="M19"></A> addressbook property remove (-groups | -persons) <I>propName</I></H4> +MultiDictionary, MultiInteger, MultiReal, MultiString.</I><P><H4><A NAME="M19"></A>addressbook property remove (-groups | -persons) <I>propName</I></H4> This command lets you remove a property from the database, either for person or for group records. The name of the property is specified in the <I>propName</I> argument. One can get the list of all the existing -properties with the <B>addressbook property names</B> command.<P><H4><A NAME="M20"></A> addressbook record <I>recordID</I></H4> +properties with the <B>addressbook property names</B> command.<P><H4><A NAME="M20"></A>addressbook record <I>recordID</I></H4> This command returns all the data available in the database concerning the record with unique ID <I>recordID</I>. The returned value takes the form of a keyed list. @@ -152,19 +147,20 @@ sublists: the first item is the key in the dictionary and the second one is the value associated with this key. For instance a person could have two addresses: each address will be returned as a Label/Dictionary pair; the -elements of the dictionary are pairs like {City Paris} or {CountryCode fr}.<P></UL> +elements of the dictionary are pairs like {City Paris} or {CountryCode fr}. +</UL> <P> Dates are returned as values suitable for use with the <B>clock format</B> Tcl command. It is the number of seconds relative to "Thu Jan 01 00:00:00 CET 1970". <P> Note that keyed lists can be easily manipulated using the <B>keylget</B> and <B>keylset</B> commands defined in the TclX -extension.<P><H4><A NAME="M21"></A> addressbook save</H4> +extension.<P><H4><A NAME="M21"></A>addressbook save</H4> This command lets you save the changes made in the database. Commands such as <B>addressbook set</B>, <B>addressbook create</B> or <B>addressbook delete</B> modify the data in memory: to make the changes definitive in the database, one must call explicitely the <B>addressbook save</B> command. To check whether there has been changes in the database, use the -<B>addressbook changed</B> command.<P><H4><A NAME="M22"></A> addressbook search ?(-groups | -persons)? ?-ids? ?-nocase? <I>property op value</I></H4> +<B>addressbook changed</B> command.<P><H4><A NAME="M22"></A>addressbook search ?(-groups | -persons)? ?-ids? ?-nocase? <I>property op value</I></H4> This command returns all the records corresponding to the criterion described by the last three arguments: <UL> @@ -196,7 +192,8 @@ >= Contains Substring ^= Prefix Match </PRE> -The <TT><</TT> and <TT><=</TT> operators are not applicable and will both default to Equal.<P></UL><P> <LI> <I>value</I> is the value you are searching for. In the case of +The <TT><</TT> and <TT><=</TT> operators are not applicable and will both default to Equal. +</UL><P> <LI> the argument <I>value</I> is the value you are searching for. In the case of a simple property, <I>value</I> will be a simple string. In the case of a MultiString, MultiInteger or MultiDate property, <I>value</I> will be a two-elements list representing a label/value pair. In the case of a @@ -209,7 +206,8 @@ </PRE> <P> One can specify an empty string for the label in order to perform the search over all the possible labels. One can also specify an empty string for -the key in order to perform the search over all the possible keys in a dictionary. <P></UL> +the key in order to perform the search over all the possible keys in a dictionary. +</UL> <P> The <I>-groups</I> or <I>-persons</I> options let you specify the kind of records you want to search. If it is not specified, the default is <I>-person</I>. If the <I>-ids</I> option is specified, only IDs of the @@ -218,16 +216,16 @@ that no distinction be made between uppercase and lowercase letters. <P> To get a list of all possible properties, use the <B>addressbook property names</B> command. To know the type of a particular property, use -the <B>addressbook property type</B> command.<P><H4><A NAME="M23"></A> addressbook set <I>recordID propertyName</I> ?<I>value</I>?</H4> +the <B>addressbook property type</B> command.<P><H4><A NAME="M23"></A>addressbook set <I>recordID propertyName</I> ?<I>value</I>?</H4> This command lets you get or set the value of a particular property for the record with unique ID <I>recordID</I>. If the <I>value</I> argument is not specified, it returns the current value of the property specified in the <I>propertyName</I> argument. If <I>value</I> is specified, the property <I>propertyName</I> will be set to this value. See the <B>addressbook record</B> command for a description of the format used for the -various kinds of properties.<P><H4><A NAME="M24"></A> addressbook type <I>recordID</I></H4> -This command returns the type (ABPerson or ABGroup) of the record with -unique ID <I>recordID</I>.<P><H2><A NAME="M25"></A> INSTALLATION</H2> +various kinds of properties.<P><H4><A NAME="M24"></A>addressbook type <I>recordID</I></H4> +This command returns the type (<I>ABPerson</I> or <I>ABGroup</I>) of the record with +unique ID <I>recordID</I>.<P><H2><A NAME="M25"></A>INSTALLATION</H2> The extension is made of two files: the dynamic library (called addressbook1.0.dylib in version 1.0) and a file pkgIndex.tcl necessary for Tcl to be able to locate the extension upon request. Both files are @@ -237,32 +235,35 @@ <B>auto_path</B> Tcl variable. If you use the extension within the AlphaX editor (version 8.0b11 or greater), you can also install it in the <I>Tclextensions</I> folder which is located at the same level as the -application. <P><H2><A NAME="M26"></A> VERSION HISTORY</H2> +application. <P><H2><A NAME="M26"></A>VERSION HISTORY</H2> <UL> - <LI> 1.0 - - <P></UL><P><H2><A NAME="M27"></A> REQUIREMENTS AND PORTABILITY</H2> + <LI> 1.0b1 -- 2004/01/25 -- First public release. +</UL><P><H2><A NAME="M27"></A>REQUIREMENTS AND PORTABILITY</H2> This extension is only useful on Macintosh platforms. Version 10.2 or greater of the system is required: the AddressBook framework was introduced -in version 10.2 of the System (aka Jaguar).<P><H2><A NAME="M28"></A> KNOW ISSUES</H2> +in version 10.2 of the System (aka Jaguar).<P><H2><A NAME="M28"></A>KNOW ISSUES</H2> +Tcladdressbook was written by Bernard Desgraupes. Please e-mail any bug or problem you encounter: -<A HREF="mailto:bde...@us...">bde...@us...</A><P><H2><A NAME="M29"></A> LICENSE AND DISCLAIMER</H2> -This software is free software and distributed under the same licensing terms -as the Tcl language itself. See license.terms in the Tcl distribution.<P><P> © Copyright Bernard Desgraupes 2003-2004<P><H2><A NAME="M30"></A> SOURCE CODE</H2> +<A HREF="mailto:bde...@us...">bde...@us...</A><P><H2><A NAME="M29"></A>SOURCE CODE</H2> Tcladdressbook is an Open Source Project. Its source code is public and can be found on the SourceForge site at the following address: -<A HREF="http://sourceforge.net/projects/tcladdressbook">http://sourceforge.net/projects/tcladdressbook</A><P><P> Tcladdressbook binary releases are available at -<A HREF="http://sourceforge.net/project/showfiles.php?group_id=96169">http://sourceforge.net/project/showfiles.php?group_id=96169</A> or on my web -page at <A HREF="http://webperso.easyconnect.fr/bdesgraupes/tcl.html">http://webperso.easyconnect.fr/bdesgraupes/tcl.html</A><P><P> The code is under CVS control. You can retrieve the latest stage of +<P> <A HREF="http://sourceforge.net/projects/tcladdressbook">http://sourceforge.net/projects/tcladdressbook</A><P><P> Tcladdressbook binary releases are available at +<P> <A HREF="http://sourceforge.net/project/showfiles.php?group_id=96169">http://sourceforge.net/project/showfiles.php?group_id=96169</A> +or on my web page at +<P> <A HREF="http://webperso.easyconnect.fr/bdesgraupes/tcl.html">http://webperso.easyconnect.fr/bdesgraupes/tcl.html</A><P><P> The code is under CVS control. You can retrieve the latest stage of development using any CVS client. See instructions at: -<A HREF="http://sourceforge.net/cvs/?group_id=96169">http://sourceforge.net/cvs/?group_id=96169</A><P><P> You can also browse the cvs repository online at -<A HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook">http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook</A> <P><H2><A NAME="M31"></A> CONTRIBUTIONS</H2> +<P> <A HREF="http://sourceforge.net/cvs/?group_id=96169">http://sourceforge.net/cvs/?group_id=96169</A><P><P> You can also browse the cvs repository online at +<P> <A HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook">http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook</A> <P><H2><A NAME="M30"></A>CONTRIBUTIONS</H2> Code contributions (Tcl scripts making use of the Tcladdressbook extension) are very welcome. There is a "Contribs" directory in the Tcladdressbook project on SourceForge for code contributions. They must be free software, distributed under an Open Source license acceptable by the SourceForge site -(for instance, the same licensing terms as the Tcl language itself).<P><H2><A NAME="M32"></A> SEE ALSO</H2> -See the TclX extension for keyed lists. See the Mk4Tcl extension for -commands to open directly the database file.<P><H2><A NAME="M33"></A> KEYWORDS</H2> +(for instance, the same licensing terms as the Tcl language itself).<P><H2><A NAME="M31"></A>LICENSE AND DISCLAIMER</H2> +This software is free software and distributed under the same licensing terms +as the Tcl language itself. See license.terms in the Tcl distribution.<P><P> © Copyright Bernard Desgraupes 2003-2004<P><H2><A NAME="M32"></A>SEE ALSO</H2> +See the TclX extension for keyed lists: TclX(n). See the Mk4Tcl extension for +commands to open directly the database file.<P><H2><A NAME="M33"></A>KEYWORDS</H2> Address book, data base.<P><HR> -<P> Last updated 2004-01-06 07:36:53<P> +<P> Last updated 2004-01-24 13:24:29<P> </BODY> </HTML> \ No newline at end of file |
|
From: <bde...@pr...> - 2004-01-26 23:09:52
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19640/Help Modified Files: TclAddressBookHelp.aida Log Message: Update for 1.0b1 release Index: TclAddressBookHelp.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.aida,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- TclAddressBookHelp.aida 6 Jan 2004 06:58:56 -0000 1.11 +++ TclAddressBookHelp.aida 26 Jan 2004 23:08:43 -0000 1.12 @@ -1,19 +1,25 @@ :Title: Tcladdressbook Help :Project: addressbook extension for Tcl -!! !! :Version: $Revision$ -!! !! :CVSDate: $Date$ -!! :Author: Bernard Desgraupes <bde...@ea...> -!! :Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> -!! !! :Created: 2003-11-26 14:30:03 -:Modified: 2004-01-05 06:42:28 -!! !! :Keywords: Address book, data base - +:Version: $Revision$ +:CVSDate: $Date$ +:Author: Bernard Desgraupes <bde...@ea...> +:Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> +:Created: 2003-11-26 14:30:03 +:Modified: 2004-01-23 22:26:20 +:Keywords: Address book, data base +((if $aida_params(target) eq "Pdf" +((s [set aida_keywd(TocDepth) 2; return ""] s)) +((s [set aida_keywd(NumberingDepth) 2; return ""] s)) +if)) +((if $aida_params(target) eq "Html" !! logo ((im Images/TclAB_logo.gif TclAB Logo im)) ((nl ((lk TclAB.html )) Home Page lk)) | ((lk http://sourceforge.net/projects/tcladdressbook )) Project Page at SourceForge lk)) +if)) +((if $aida_params(target) ne "Man" ((/ This is a manual page for the Tcladdressbook extension for Tcl. It documents version ((s [package require addressbook] s)). @@ -21,15 +27,14 @@ ((toc ((np +if)) ((s1 NAME addressbook - manipulate the Macintosh OSX Address Book database ((s1 SYNOPSIS -((| -(| package require addressbook -(| addressbook subcommand ?arg arg ...? -|)) +((b package require addressbook b)) +((nl ((b addressbook subcommand b)) ?((i arg arg i))...? ((s1 INTRODUCTION @@ -223,7 +228,7 @@ The ((v < v)) and ((v <= v)) operators are not applicable and will both default to Equal. lu)) -((li ((i value i)) is the value you are searching for. In the case of +((li the argument ((i value i)) is the value you are searching for. In the case of a simple property, ((i value i)) will be a simple string. In the case of a MultiString, MultiInteger or MultiDate property, ((i value i)) will be a two-elements list representing a label/value pair. In the case of a @@ -259,7 +264,7 @@ various kinds of properties. ((s3 addressbook type ((i recordID i)) -This command returns the type (ABPerson or ABGroup) of the record with +This command returns the type (((i ABPerson i)) or ((i ABGroup i))) of the record with unique ID ((i recordID i)). @@ -278,7 +283,7 @@ ((s1 VERSION HISTORY ((lu -((li 1.0 - - +((li 1.0b1 -- 2004/01/25 -- First public release. lu)) @@ -289,32 +294,27 @@ ((s1 KNOW ISSUES +Tcladdressbook was written by Bernard Desgraupes. Please e-mail any bug or problem you encounter: <bde...@us...> -((s1 LICENSE AND DISCLAIMER -This software is free software and distributed under the same licensing terms -as the Tcl language itself. See license.terms in the Tcl distribution. - -((nl © Copyright Bernard Desgraupes 2003-2004 - - ((s1 SOURCE CODE Tcladdressbook is an Open Source Project. Its source code is public and can be found on the SourceForge site at the following address: -<http://sourceforge.net/projects/tcladdressbook> +((nl <http://sourceforge.net/projects/tcladdressbook> ((nl Tcladdressbook binary releases are available at -<http://sourceforge.net/project/showfiles.php?group_id=96169> or on my web -page at <http://webperso.easyconnect.fr/bdesgraupes/tcl.html> +((nl <http://sourceforge.net/project/showfiles.php?group_id=96169> +or on my web page at +((nl <http://webperso.easyconnect.fr/bdesgraupes/tcl.html> ((nl The code is under CVS control. You can retrieve the latest stage of development using any CVS client. See instructions at: -<http://sourceforge.net/cvs/?group_id=96169> +((nl <http://sourceforge.net/cvs/?group_id=96169> ((nl You can also browse the cvs repository online at -<http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook> +((nl <http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook> ((s1 CONTRIBUTIONS Code contributions (Tcl scripts making use of the Tcladdressbook extension) @@ -323,8 +323,14 @@ distributed under an Open Source license acceptable by the SourceForge site (for instance, the same licensing terms as the Tcl language itself). +((s1 LICENSE AND DISCLAIMER +This software is free software and distributed under the same licensing terms +as the Tcl language itself. See license.terms in the Tcl distribution. + +((nl © Copyright Bernard Desgraupes 2003-2004 + ((s1 SEE ALSO -See the TclX extension for keyed lists. See the Mk4Tcl extension for +See the TclX extension for keyed lists: TclX(n). See the Mk4Tcl extension for commands to open directly the database file. ((s1 KEYWORDS @@ -332,8 +338,9 @@ ((- +((if $aida_params(target) ne "Man" ((nl Last updated ((s [ISOTime::ISODateAndTimeRelaxed] s)) - +if)) |
|
From: <bde...@pr...> - 2004-01-26 23:09:28
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19529/Help Modified Files: TclAddressBookHelp Log Message: Update for 1.0b1 release Index: TclAddressBookHelp =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- TclAddressBookHelp 6 Jan 2004 06:58:51 -0000 1.12 +++ TclAddressBookHelp 26 Jan 2004 23:08:17 -0000 1.13 @@ -1,6 +1,5 @@ -Title: Tcladdressbook Help -Project: addressbook extension for Tcl -Modified: 2004-01-05 06:42:28 + + Abstract @@ -37,24 +36,21 @@ 6. VERSION HISTORY 7. REQUIREMENTS AND PORTABILITY 8. KNOW ISSUES - 9. LICENSE AND DISCLAIMER - 10. SOURCE CODE - 11. CONTRIBUTIONS + 9. SOURCE CODE + 10. CONTRIBUTIONS + 11. LICENSE AND DISCLAIMER 12. SEE ALSO 13. KEYWORDS - - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + 1. NAME addressbook - manipulate the Macintosh OSX Address Book database 2. SYNOPSIS - - package require addressbook - addressbook subcommand ?arg arg ...? - +package require addressbook +addressbook subcommand ?arg arg...? 3. INTRODUCTION @@ -173,17 +169,16 @@ This command returns all the data available in the database concerning the record with unique ID recordID. The returned value takes the form of a keyed list. - The format used for a particular property's value depends on the type of +The format used for a particular property's value depends on the type of the property (string, integer, date, multivalue etc.). Some properties have a multiple type: MultiString for fields like Email, Phone etc., MultiDate for fields like ABDate, MultiDictionary for the Address field. In case of a multivalue, the returned value is a keyed list itself. Each element of the list corresponds to a single property. For instance: - - the elements of a MultiString or MultiDate value list are two-elements + the elements of a MultiString or MultiDate value list are two-elements sublists: the first element is the label of the corresponding property (like Home, Work etc.) and the second is the value itself. - the elements of a MultiDictionary value list are lists themselves, + the elements of a MultiDictionary value list are lists themselves, representing a Label/Dictionary pair (dictionary in the AddressBook sense, not a Tcl dictionary as defined in version 8.5 of Tcl). Each element of this list has two elements: the first one is the label describing the @@ -194,10 +189,10 @@ addresses: each address will be returned as a Label/Dictionary pair; the elements of the dictionary are pairs like {City Paris} or {CountryCode fr}. - Dates are returned as values suitable for use with the clock +Dates are returned as values suitable for use with the clock format Tcl command. It is the number of seconds relative to "Thu Jan 01 00:00:00 CET 1970". - Note that keyed lists can be easily manipulated +Note that keyed lists can be easily manipulated using the keylget and keylset commands defined in the TclX extension. @@ -212,18 +207,16 @@ addressbook search ?(-groups | -persons)? ?-ids? ?-nocase? property op value This command returns all the records corresponding to the criterion described by the last three arguments: + property is the name of the property you are searching on. - property is the name of the property you are searching on. - - op is an operator specifying the type of comparison. It can be + op is an operator specifying the type of comparison. It can be one of the following symbols: ==, !=, <, <=, >, >=, ^= which may have different interpretations depending on whether the value is numeric or is a string. - - For a numeric value, they correspond respectively to: + For a numeric value, they correspond respectively to: == Equal != Not Equal @@ -235,7 +228,7 @@ The ^= operator is not applicable (and will default to Greater Than or Equal). - For a string value, they correspond respectively to: + For a string value, they correspond respectively to: == Equal != Not Equal @@ -248,7 +241,7 @@ The < and <= operators are not applicable and will both default to Equal. - value is the value you are searching for. In the case of + the argument value is the value you are searching for. In the case of a simple property, value will be a simple string. In the case of a MultiString, MultiInteger or MultiDate property, value will be a two-elements list representing a label/value pair. In the case of a @@ -259,17 +252,17 @@ {Phone "01 02 03 04 05"} {Home {City Paris}} - One can specify an empty string for the label in order to perform the +One can specify an empty string for the label in order to perform the search over all the possible labels. One can also specify an empty string for the key in order to perform the search over all the possible keys in a dictionary. - The -groups or -persons options let you specify the +The -groups or -persons options let you specify the kind of records you want to search. If it is not specified, the default is -person. If the -ids option is specified, only IDs of the matching records are returned, rather than pairs made of the ID and the name. The -nocase argument concerns string comparisons and requires that no distinction be made between uppercase and lowercase letters. - To get a list of all possible properties, use the addressbook +To get a list of all possible properties, use the addressbook property names command. To know the type of a particular property, use the addressbook property type command. @@ -302,8 +295,7 @@ 6. VERSION HISTORY - - 1.0 - - + 1.0b1 -- 2004/01/25 -- First public release. @@ -314,42 +306,43 @@ 8. KNOW ISSUES +Tcladdressbook was written by Bernard Desgraupes. Please e-mail any bug or problem you encounter: <bde...@us...> -9. LICENSE AND DISCLAIMER -This software is free software and distributed under the same licensing terms -as the Tcl language itself. See license.terms in the Tcl distribution. - - © Copyright Bernard Desgraupes 2003-2004 - - -10. SOURCE CODE +9. SOURCE CODE Tcladdressbook is an Open Source Project. Its source code is public and can be found on the SourceForge site at the following address: <http://sourceforge.net/projects/tcladdressbook> - Tcladdressbook binary releases are available at -<http://sourceforge.net/project/showfiles.php?group_id=96169> or on my web -page at <http://webperso.easyconnect.fr/bdesgraupes/tcl.html> +Tcladdressbook binary releases are available at +<http://sourceforge.net/project/showfiles.php?group_id=96169> +or on my web page at +<http://webperso.easyconnect.fr/bdesgraupes/tcl.html> - The code is under CVS control. You can retrieve the latest stage of +The code is under CVS control. You can retrieve the latest stage of development using any CVS client. See instructions at: <http://sourceforge.net/cvs/?group_id=96169> - You can also browse the cvs repository online at +You can also browse the cvs repository online at <http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook> -11. CONTRIBUTIONS +10. CONTRIBUTIONS Code contributions (Tcl scripts making use of the Tcladdressbook extension) are very welcome. There is a "Contribs" directory in the Tcladdressbook project on SourceForge for code contributions. They must be free software, distributed under an Open Source license acceptable by the SourceForge site (for instance, the same licensing terms as the Tcl language itself). +11. LICENSE AND DISCLAIMER +This software is free software and distributed under the same licensing terms +as the Tcl language itself. See license.terms in the Tcl distribution. + +© Copyright Bernard Desgraupes 2003-2004 + 12. SEE ALSO -See the TclX extension for keyed lists. See the Mk4Tcl extension for +See the TclX extension for keyed lists: TclX(n). See the Mk4Tcl extension for commands to open directly the database file. 13. KEYWORDS @@ -357,7 +350,7 @@ ---------------------------------------------------------------------- - Last updated 2004-01-06 07:36:29 +Last updated 2004-01-24 13:25:56 |
|
From: <bde...@pr...> - 2004-01-26 23:08:57
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19427/Help Modified Files: tcladdressbook.n Log Message: Update for 1.0b1 release Index: tcladdressbook.n =================================================================== RCS file: /cvsroot/tcladdressbook/Help/tcladdressbook.n,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- tcladdressbook.n 9 Jan 2004 14:32:51 -0000 1.2 +++ tcladdressbook.n 26 Jan 2004 23:07:51 -0000 1.3 @@ -1,67 +1,83 @@ .de uline \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m' .. -.TH tcladdressbook n "" "2004-01-09" "addressbook extension for Tcl" -.\" :Title: Tcladdressbook Help -.\" :Project: addressbook extension for Tcl -.\" :Author: Bernard Desgraupes <bde...@ea...> -.\" :Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> -.\" :Modified: 2004-01-05 06:42:28 +.TH tcladdressbook n "" "2004-01-24" "addressbook extension for Tcl" +.PP .SH NAME .PP +.PP addressbook - manipulate the Macintosh OSX Address Book database +.PP .SH SYNOPSIS .PP +.PP \fBpackage require addressbook\fP .PP -\fBaddressbook subcommand\fP ?\fI arg arg\fP...? + \fBaddressbook subcommand\fP ?\fI arg arg\fP...? +.PP .SH INTRODUCTION .PP +.PP The argument \fI subcommand\fP indicates what operation to perform. Any unique abbreviation for each subcommand is acceptable. The valid subcommands are explained in the next sections. +.PP .SH SUBCOMMANDS .PP +.PP .SS addressbook changed .PP +.PP This command returns 1 if there has been changes made to the database, 0 otherwise. Changes are made in memory with commands such as \fBaddressbook set\fP, \fBaddressbook create\fP, \fBaddressbook delete\fP. To make these changes permanent, one must call the \fBaddressbook save\fP command. +.PP .SS addressbook count (-groups | -persons) ?-ingroup \fI groupID\fP? .PP +.PP This command returns the count of existing groups or persons in the database. One can specify a particular group with the -ingroup option to count only the subgroups or members in this group. +.PP .SS addressbook create (group | person) \fI name\fP ?-ingroup \fI groupID\fP? .PP +.PP This command lets you create a new group or a new person record. The \fI name\fP argument is the name to give to the new group or the last name of the person for which a new record is created. With the \fI -ingroup\fP option one can make the newly created record a subgroup or a member of the particular group with unique ID \fI groupID\fP. If no error occurs, the command returns the unique ID of the created record. +.PP .SS addressbook delete \fI recordID\fP ?-fromgroup \fI groupID\fP? .PP +.PP This command removes the record with unique ID \fI recordID\fP from the database or from a particular subgroup specified by its unique ID with the \fI -fromgroup\fP option. Note that any changes made to the database won't be definitive until you invoke the \fBaddressbook save\fP command. +.PP .SS addressbook export \fI personID\fP .PP +.PP This command lets you export the record with unique ID \fI personID\fP as a VCard. The result should be considered as binary data since it can contain an image associated to the record. +.PP .SS addressbook getme .PP +.PP This command returns all the data available in the database concerning the logged-in user ("Me"). The returned value takes the form of a keyed list: see the \fBaddressbook record\fP command for a description of this format. Keyed lists can be easily manipulated with the \fBkeylget\fP and \fBkeylset\fP commands defined in the TclX extension. +.PP .SS addressbook groups ?-ids? ?-ingroup \fI groupID\fP? .PP +.PP This command returns a list of all the existing group records: if no option is specified, it is a list whose elements are sublists made of two elements. The first element is the unique ID associated with the group and @@ -69,29 +85,37 @@ returned list will contain only the unique IDs of the groups. If the \fI -ingroup\fP option is specified, only the subgroups contained in the group with ID \fI groupID\fP will be returned. +.PP .SS addressbook image \fI personID\fP ?\fI imageData\fP? .PP +.PP If no \fI imageData\fP argument is specified, this command returns the custom image associated with the record corresponding to the unique ID \fI personID\fP. The returned bytes are binary data. If no image exists, it raises an error. If an \fI imageData\fP argument is specified, it should contain valid binary data defining an image which will be associated the record with unique ID \fI personID\fP. +.PP .SS addressbook import \fI vCardData\fP .PP +.PP This command imports data in VCard format. The data specified by the \fI vCardData\fP argument must be valid data in VCard format: a new record is created in the database corresponding to the information contained in the VCard. Note that the data can be binary if the VCard contains an image. +.PP .SS addressbook parents ?-ids? \fI recordID\fP .PP +.PP This command returns a list of all the groups the record with unique ID \fI recordID\fP belongs to. The elements of this list are sublists made of one or two items: the unique ID and, possibly, the name of the record if this field exists. If the \fI -ids\fP option is specified, only IDs are returned. +.PP .SS addressbook persons ?-ids? ?-ingroup \fI groupID\fP? .PP +.PP This command returns a list of all the existing person records: if no option is specified, it is a list whose elements are sublists made of one or two items: the unique ID and, possibly, the name of the record if this @@ -99,19 +123,25 @@ will contain only the unique IDs. If the \fI -ingroup\fP option is specified, only the members belonging to the group with ID \fI groupID\fP will be returned. +.PP .SS addressbook property names (-groups | -persons) .PP +.PP This command returns a list of all the properties defined in the database for group or person records. New properties can be created or removed with the \fBaddressbook property add\fP and \fBaddressbook property remove\fP commands. +.PP .SS addressbook property type (-groups | -persons) \fI propName\fP .PP +.PP This command returns the type of the property specified by the \fI propName\fP argument. The returned type is one of the values listed with the \fBaddressbook property add\fP command below or \fI Unknown\fP. +.PP .SS addressbook property add (-groups | -persons) \fI propName\fP \fI propType\fP .PP +.PP This command lets you add a new property to the database, either for person or for group records. The name of the new property is specified by the \fI propName\fP argument: it must be unique. One can get the list of all the @@ -120,14 +150,18 @@ This argument can have one of the following values: \fI Array, Data, Date, Dictionary, Integer, Real, String, MultiArray, MultiData, MultiDate, MultiDictionary, MultiInteger, MultiReal, MultiString.\fP +.PP .SS addressbook property remove (-groups | -persons) \fI propName\fP .PP +.PP This command lets you remove a property from the database, either for person or for group records. The name of the property is specified in the \fI propName\fP argument. One can get the list of all the existing properties with the \fBaddressbook property names\fP command. +.PP .SS addressbook record \fI recordID\fP .PP +.PP This command returns all the data available in the database concerning the record with unique ID \fI recordID\fP. The returned value takes the form of a keyed list. @@ -139,10 +173,12 @@ multivalue, the returned value is a keyed list itself. Each element of the list corresponds to a single property. For instance: .RS +.PP .IP * 4 the elements of a MultiString or MultiDate value list are two-elements sublists: the first element is the label of the corresponding property (like Home, Work etc.) and the second is the value itself. +.PP .IP * 4 the elements of a MultiDictionary value list are lists themselves, representing a Label/Dictionary pair (dictionary in the AddressBook sense, @@ -154,8 +190,10 @@ the value associated with this key. For instance a person could have two addresses: each address will be returned as a Label/Dictionary pair; the elements of the dictionary are pairs like {City Paris} or {CountryCode fr}. +.PP .RE .PP +.PP Dates are returned as values suitable for use with the \fBclock format\fP Tcl command. It is the number of seconds relative to "Thu Jan 01 00:00:00 CET 1970". @@ -163,21 +201,27 @@ Note that keyed lists can be easily manipulated using the \fBkeylget\fP and \fBkeylset\fP commands defined in the TclX extension. +.PP .SS addressbook save .PP +.PP This command lets you save the changes made in the database. Commands such as \fBaddressbook set\fP, \fBaddressbook create\fP or \fBaddressbook delete\fP modify the data in memory: to make the changes definitive in the database, one must call explicitely the \fBaddressbook save\fP command. To check whether there has been changes in the database, use the \fBaddressbook changed\fP command. +.PP .SS addressbook search ?(-groups | -persons)? ?-ids? ?-nocase? \fI property op value\fP .PP +.PP This command returns all the records corresponding to the criterion described by the last three arguments: .RS +.PP .IP * 4 \fI property\fP is the name of the property you are searching on. +.PP .IP * 4 \fI op\fP is an operator specifying the type of comparison. It can be one of the following symbols: @@ -191,7 +235,8 @@ which may have different interpretations depending on whether the value is numeric or is a string. .RS -.IP * 4 +.PP +.IP * 8 For a numeric value, they correspond respectively to: .RS .nf @@ -207,7 +252,8 @@ .RE .sp The ^= operator is not applicable (and will default to Greater Than or Equal). -.IP * 4 +.PP +.IP * 8 For a string value, they correspond respectively to: .RS .nf @@ -223,7 +269,9 @@ .RE .sp The < and <= operators are not applicable and will both default to Equal. +.PP .RE +.PP .IP * 4 the argument \fI value\fP is the value you are searching for. In the case of a simple property, \fI value\fP will be a simple string. In the case of a @@ -244,8 +292,10 @@ One can specify an empty string for the label in order to perform the search over all the possible labels. One can also specify an empty string for the key in order to perform the search over all the possible keys in a dictionary. +.PP .RE .PP +.PP The \fI -groups\fP or \fI -persons\fP options let you specify the kind of records you want to search. If it is not specified, the default is \fI -person\fP. If the \fI -ids\fP option is specified, only IDs of the @@ -256,8 +306,10 @@ To get a list of all possible properties, use the \fBaddressbook property names\fP command. To know the type of a particular property, use the \fBaddressbook property type\fP command. +.PP .SS addressbook set \fI recordID propertyName\fP ?\fI value\fP? .PP +.PP This command lets you get or set the value of a particular property for the record with unique ID \fI recordID\fP. If the \fI value\fP argument is not specified, it returns the current value of the property specified in @@ -265,12 +317,16 @@ property \fI propertyName\fP will be set to this value. See the \fBaddressbook record\fP command for a description of the format used for the various kinds of properties. +.PP .SS addressbook type \fI recordID\fP .PP -This command returns the type (ABPerson or ABGroup) of the record with +.PP +This command returns the type (\fI ABPerson\fP or \fI ABGroup\fP) of the record with unique ID \fI recordID\fP. +.PP .SH INSTALLATION .PP +.PP The extension is made of two files: the dynamic library (called addressbook1.0.dylib in version 1.0) and a file pkgIndex.tcl necessary for Tcl to be able to locate the extension upon request. Both files are @@ -281,57 +337,88 @@ editor (version 8.0b11 or greater), you can also install it in the \fI Tclextensions\fP folder which is located at the same level as the application. +.PP .SH VERSION HISTORY .PP +.PP .RS +.PP .IP * 4 -1.0 - - +1.0b1 -- 2004/01/25 -- First public release. +.PP .RE +.PP .SH REQUIREMENTS AND PORTABILITY .PP +.PP This extension is only useful on Macintosh platforms. Version 10.2 or greater of the system is required: the AddressBook framework was introduced in version 10.2 of the System (aka Jaguar). +.PP .SH KNOW ISSUES .PP +.PP +Tcladdressbook was written by Bernard Desgraupes. Please e-mail any bug or problem you encounter: <bde...@us...> -.SH LICENSE AND DISCLAIMER -.PP -This software is free software and distributed under the same licensing terms -as the Tcl language itself. See license.terms in the Tcl distribution. .PP - © Copyright Bernard Desgraupes 2003-2004 .SH SOURCE CODE .PP +.PP Tcladdressbook is an Open Source Project. Its source code is public and can be found on the SourceForge site at the following address: -<http://sourceforge.net/projects/tcladdressbook> +.PP + <http://sourceforge.net/projects/tcladdressbook> +.PP .PP Tcladdressbook binary releases are available at -<http://sourceforge.net/project/showfiles.php?group_id=96169> or on my web -page at <http://webperso.easyconnect.fr/bdesgraupes/tcl.html> +.PP + <http://sourceforge.net/project/showfiles.php?group_id=96169> +or on my web page at +.PP + <http://webperso.easyconnect.fr/bdesgraupes/tcl.html> +.PP .PP The code is under CVS control. You can retrieve the latest stage of development using any CVS client. See instructions at: -<http://sourceforge.net/cvs/?group_id=96169> +.PP + <http://sourceforge.net/cvs/?group_id=96169> +.PP .PP You can also browse the cvs repository online at -<http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook> +.PP + <http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook> +.PP .SH CONTRIBUTIONS .PP +.PP Code contributions (Tcl scripts making use of the Tcladdressbook extension) are very welcome. There is a "Contribs" directory in the Tcladdressbook project on SourceForge for code contributions. They must be free software, distributed under an Open Source license acceptable by the SourceForge site (for instance, the same licensing terms as the Tcl language itself). +.PP +.SH LICENSE AND DISCLAIMER +.PP +.PP +This software is free software and distributed under the same licensing terms +as the Tcl language itself. See license.terms in the Tcl distribution. +.PP +.PP + © Copyright Bernard Desgraupes 2003-2004 +.PP .SH SEE ALSO .PP -See the TclX extension for keyed lists. See the Mk4Tcl extension for +.PP +See the TclX extension for keyed lists: TclX(n). See the Mk4Tcl extension for commands to open directly the database file. +.PP .SH KEYWORDS .PP +.PP Address book, data base. .PP +.PP \l'70\(ul' .PP +.PP |
|
From: <bde...@pr...> - 2004-01-26 23:08:37
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19322/Help Modified Files: TclAB_QuickStart.html Log Message: Update for 1.0b1 release Index: TclAB_QuickStart.html =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB_QuickStart.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- TclAB_QuickStart.html 6 Jan 2004 06:58:32 -0000 1.5 +++ TclAB_QuickStart.html 26 Jan 2004 23:07:23 -0000 1.6 @@ -4,51 +4,46 @@ <META NAME=GENERATOR CONTENT="Aida Mode"> </HEAD> <BODY> - -<!-- :Title: TclAB_QuickStart --> -<!-- :Project: addressbook extension for Tcl --> -<!-- :Version: $Revision$ --> -<!-- :CVSDate: $Date$ --> -<!-- :Author: Bernard Desgraupes <A HREF="mailto:bde...@ea...">bde...@ea...</A> --> -<!-- :Homepage: <A HREF="http://webperso.easyconnect.fr/bdesgraupes/">http://webperso.easyconnect.fr/bdesgraupes/</A> --> -<!-- :Created: 2003-12-14 18:26:47 --> -<!-- :Modified: 2004-01-04 21:10:51 --> -<!-- :Keywords: Address book, data base --> -<!-- :TclCmd: set currentversion [package require addressbook] --><P><!-- logo --> +<P><!-- logo --> <P><IMG SRC="Images/TclAB_logo.gif " ALT="TclAB Logo" ALIGN=bottom></P> -<P> <A href="TclAB.html">Home Page</A> | <A href="http://sourceforge.net/projects/tcladdressbook"> Project Page at SourceForge</A><P><HR><BLOCKQUOTE><P><I> +<P> <A HREF="TclAB.html">Home Page</A> | <A HREF="http://sourceforge.net/projects/tcladdressbook"> Project Page at SourceForge</A><P><HR><BLOCKQUOTE><P><I> This file is a tutorial that demonstrates the [addressbook] command defined by the Tcladdressbook extension for Tcl. It documents -version 1.0b1. -For a detailed and complete description of the syntax of each subcommand, -refer to the <A href="TclAddressBookHelp.html">help file</A>. +version 1.0b1. All the Tcl instructions in the sections +below are very short one-line commands which you can try in any Tcl shell, +like tclsh for instance. +<P> For a detailed and complete description of the syntax of each subcommand, +refer to the <A HREF="TclAddressBookHelp.html">help file</A>. +The home page for Tcladdressbook is +<A HREF="http://tcladdressbook.sourceforge.net/"> on the SourceForge site</A>. </I></P></BLOCKQUOTE><HR> <UL> <LI><A HREF="#M1">Using the commands</A> -<UL><LI><A HREF="#M2">The [groups] command</A></UL> -<UL><LI><A HREF="#M3">The [persons] command</A></UL> -<UL><LI><A HREF="#M4">The [count] command</A></UL> -<UL><LI><A HREF="#M5">The [getme] command</A></UL> -<UL><LI><A HREF="#M6">The [record] command</A></UL> -<UL><LI><A HREF="#M7">The [type] command</A></UL> -<UL><LI><A HREF="#M8">The [remove] command</A></UL> -<UL><LI><A HREF="#M9">The [parents] command</A></UL> -<UL><LI><A HREF="#M10">The [create] command</A></UL> -<UL><LI><A HREF="#M11">The [property names] command</A></UL> -<UL><LI><A HREF="#M12">The [property type] command</A></UL> -<UL><LI><A HREF="#M13">The [property add] command</A></UL> -<UL><LI><A HREF="#M14">The [property remove] command</A></UL> -<UL><LI><A HREF="#M15">The [export] command</A></UL> -<UL><LI><A HREF="#M16">The [import] command</A></UL> -<UL><LI><A HREF="#M17">The [image] command</A></UL> -<UL><LI><A HREF="#M18">The [set] command</A></UL> -<UL><LI><A HREF="#M19">The [search] command</A></UL> +<UL><LI><A HREF="#M2">The [groups] subcommand</A></UL> +<UL><LI><A HREF="#M3">The [persons] subcommand</A></UL> +<UL><LI><A HREF="#M4">The [count] subcommand</A></UL> +<UL><LI><A HREF="#M5">The [getme] subcommand</A></UL> +<UL><LI><A HREF="#M6">The [record] subcommand</A></UL> +<UL><LI><A HREF="#M7">The [type] subcommand</A></UL> +<UL><LI><A HREF="#M8">The [remove] subcommand</A></UL> +<UL><LI><A HREF="#M9">The [parents] subcommand</A></UL> +<UL><LI><A HREF="#M10">The [create] subcommand</A></UL> +<UL><LI><A HREF="#M11">The [property names] subcommand</A></UL> +<UL><LI><A HREF="#M12">The [property type] subcommand</A></UL> +<UL><LI><A HREF="#M13">The [property add] subcommand</A></UL> +<UL><LI><A HREF="#M14">The [property remove] subcommand</A></UL> +<UL><LI><A HREF="#M15">The [export] subcommand</A></UL> +<UL><LI><A HREF="#M16">The [import] subcommand</A></UL> +<UL><LI><A HREF="#M17">The [image] subcommand</A></UL> +<UL><LI><A HREF="#M18">The [set] subcommand</A></UL> +<UL><LI><A HREF="#M19">The [search] subcommand</A></UL> <LI><A HREF="#M20">Using keyed lists</A> -</UL><P>Load the extension +</UL> +First load the extension like this <PRE> package require addressbook -</PRE><P><H2><A NAME="M1"></A> Using the commands</H2> -<H3><A NAME="M2"></A> The [groups] command</H3> +</PRE><P><H2><A NAME="M1"></A>Using the commands</H2> +<H3><A NAME="M2"></A>The [groups] subcommand</H3> List all the groups (ID and name) <PRE> addressbook groups @@ -65,7 +60,7 @@ List the subgroups of a specific group (only ID) <PRE> addressbook groups -ids -ingroup $groupid -</PRE><P><H3><A NAME="M3"></A> The [persons] command</H3> +</PRE><P><H3><A NAME="M3"></A>The [persons] subcommand</H3> List all the persons records (ID and name) <PRE> addressbook persons @@ -73,26 +68,26 @@ List all the persons records (only ID) <PRE> addressbook persons -ids -</PRE><P><H3><A NAME="M4"></A> The [count] command</H3> +</PRE><P><H3><A NAME="M4"></A>The [count] subcommand</H3> Count the existing groups and persons records <PRE> addressbook count -groups addressbook count -persons addressbook count -persons -ingroup [lindex [addressbook groups -ids] 0] -</PRE><P><H3><A NAME="M5"></A> The [getme] command</H3> +</PRE><P><H3><A NAME="M5"></A>The [getme] subcommand</H3> Store the info about "me" in the variable <I>myrecord</I>. <PRE> set myrecord [addressbook getme] </PRE> The value of <I>myrecord</I> is a keyed list. One can use the usual Tcl list commands to parse this value or special commands defined in the TclX -extension (see section <A href="#ukl">Using keyed lists</A> below).<P><H3><A NAME="M6"></A> The [record] command</H3> +extension (see section <A HREF="#ukl">Using keyed lists</A> below).<P><H3><A NAME="M6"></A>The [record] subcommand</H3> Store the ID of the first record in the variable <I>theid</I> <PRE> set theid [lindex [addressbook persons -ids] 0] </PRE> Store the info about this record in the variable <I>person</I>. The -returned value has the same keyed list format as with the [getme] command. +returned value has the same keyed list format as with the [getme] subcommand. <PRE> set person [addressbook record $theid] </PRE><P>Similarly with a group: store the ID of the first group in the variable <I>theid</I> @@ -102,12 +97,12 @@ Store the info about this group in the variable <I>grp</I> <PRE> set grp [addressbook record $theid] -</PRE><P><H3><A NAME="M7"></A> The [type] command</H3> +</PRE><P><H3><A NAME="M7"></A>The [type] subcommand</H3> Find the type (<I>ABPerson</I> or <I>ABGroup</I>) of the object corresponding to the ID <I>$theid</I> <PRE> addressbook type $theid -</PRE><P><H3><A NAME="M8"></A> The [remove] command</H3> +</PRE><P><H3><A NAME="M8"></A>The [remove] subcommand</H3> Remove from the database the record corresponding to the ID <I>$theid</I> <PRE> addressbook delete $theid @@ -126,7 +121,7 @@ set groupid [lindex [addressbook groups -ids] 0] set theid [lindex [addressbook persons -ids] 0] addressbook delete $theid -fromgroup $groupid -</PRE><P><H3><A NAME="M9"></A> The [parents] command</H3> +</PRE><P><H3><A NAME="M9"></A>The [parents] subcommand</H3> List the parents of a person record (the various groups it belongs to). <PRE> set theid [lindex [addressbook persons -ids] 0] @@ -135,7 +130,7 @@ List the parents of a person record (only ID) <PRE> addressbook parents -ids $theid -</PRE><P>One can also find the parents of a group using this command.<P><H3><A NAME="M10"></A> The [create] command</H3> +</PRE><P>One can also find the parents of a group using this command.<P><H3><A NAME="M10"></A>The [create] subcommand</H3> One can create either a group's or a person's record. The third argument will be the "name" of the new record, that is to say the name of the new group or the last name of the new person respectively. The command returns @@ -150,37 +145,37 @@ set grpid [lindex [addressbook groups -ids] 0] set subgrpid [addressbook create group Composers -ingroup $grpid] addressbook create person Beethoven -ingroup $subgrpid -</PRE><P><H3><A NAME="M11"></A> The [property names] command</H3> +</PRE><P><H3><A NAME="M11"></A>The [property names] subcommand</H3> Get the list of all existing properties for groups or for persons <PRE> addressbook property names -groups addressbook property names -persons -</PRE><P><H3><A NAME="M12"></A> The [property type] command</H3> +</PRE><P><H3><A NAME="M12"></A>The [property type] subcommand</H3> Get the type of a particular property <PRE> addressbook property type -groups UID addressbook property type -persons Address </PRE> For the two examples above, the result is respectively -<I>String</I> and <I>MultiDictionary</I>.<P><H3><A NAME="M13"></A> The [property add] command</H3> +<I>String</I> and <I>MultiDictionary</I>.<P><H3><A NAME="M13"></A>The [property add] subcommand</H3> Add a new person's property called <I>Instrument</I> with type <I>String</I> <PRE> addressbook property add -persons Instrument String </PRE><P>Add a new group's property called <I>Meeting</I> with type <I>Date</I> <PRE> addressbook property add -groups Meeting Date -</PRE><P><H3><A NAME="M14"></A> The [property remove] command</H3> +</PRE><P><H3><A NAME="M14"></A>The [property remove] subcommand</H3> Remove the properties created above: <PRE> addressbook property remove -persons Instrument addressbook property remove -groups Meeting -</PRE><P><H3><A NAME="M15"></A> The [export] command</H3> +</PRE><P><H3><A NAME="M15"></A>The [export] subcommand</H3> Create a VCard corresponding to a particular record: <PRE> set theid [lindex [addressbook persons -ids] 0] set vcardData [addressbook export $theid] </PRE> -The data returned is binary. You can store it in a file for instance.<P><H3><A NAME="M16"></A> The [import] command</H3> +The data returned is binary. You can store it in a file for instance.<P><H3><A NAME="M16"></A>The [import] subcommand</H3> Import in the database some information stored in a .vcf file. A new record containing this info, is created in the database: <PRE> @@ -189,14 +184,14 @@ set vcard [read $fid] close $fid addressbook import $vcard -</PRE><P><H3><A NAME="M17"></A> The [image] command</H3> +</PRE><P><H3><A NAME="M17"></A>The [image] subcommand</H3> Get the custom image corresponding to a particular record: <PRE> set theid [lindex [addressbook persons -ids] 0] set img [addressbook image $theid] </PRE> The data returned is binary. You can store it in a file for instance. -An error is raised if there is no custom image for this record.<P><H3><A NAME="M18"></A> The [set] command</H3> +An error is raised if there is no custom image for this record.<P><H3><A NAME="M18"></A>The [set] subcommand</H3> This command lets you get or set the value of a particular field. For instance, to get the first name, dates and address fields of the first record: <PRE> @@ -215,7 +210,7 @@ permanent. <P> When setting the value of a field it is important that the new value be formatted correctly with respect to the type of the property, as explained -in the <A href="TclAddressBookHelp.html">help file</A>. Here are a few +in the <A HREF="TclAddressBookHelp.html">help file</A>. Here are a few examples corresponding to various property types: <UL> <LI> Multi string value @@ -232,7 +227,8 @@ </PRE><P> <LI> Multi dictionary value <PRE> addressbook set $theid Address [list [list Home [list {CountryCode fr} {City Paris} {Country France} {ZIP 75001} {Street "1, avenue de l'Opéra"}]]] -</PRE><P></UL><P><H3><A NAME="M19"></A> The [search] command</H3> +</PRE> +</UL><P><H3><A NAME="M19"></A>The [search] subcommand</H3> This command can be used to report the IDs of the records corresponding to a single criterion. The criterion is expressed by a three elements list: the first element is the name of a property, the second is a comparison operator and @@ -245,7 +241,7 @@ addressbook search -persons Modification < 1070199949 </PRE><P><P> When searching on a particular property, it is important that the searched value be formatted correctly with respect to the type of the property, -as explained in the <A href="TclAddressBookHelp.html">help file</A>. Specify +as explained in the <A HREF="TclAddressBookHelp.html">help file</A>. Specify an empty label or an empty key to search on all possible labels or keys respectively. Here are a few examples corresponding to various property types: <UL> @@ -274,8 +270,9 @@ <LI> Empty label and key to search on all labels and keys <PRE> addressbook search -persons -nocase Address >= {"" {"" abc}} -</PRE><P></UL><P><A name="ukl"></A> -<H2><A NAME="M20"></A> Using keyed lists</H2> +</PRE> +</UL><P><A NAME="ukl"></A> +<H2><A NAME="M20"></A>Using keyed lists</H2> Keyed lists can be easily manipulated using the <B> keylget </B> and <B>keylset</B> commands defined by the TclX extension. For instance, if a record has been stored in some variable <I>myrecord</I>, one can extract @@ -295,6 +292,6 @@ keylget grp GroupName clock format [keylget grp Modification] </PRE><P><HR> -<P> Last updated 2004-01-06 07:32:36<P> +<P> Last updated 2004-01-24 08:09:04<P> </BODY> </HTML> \ No newline at end of file |
|
From: <bde...@pr...> - 2004-01-26 23:08:08
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19198/Help Modified Files: TclAB_QuickStart.aida Log Message: Update for 1.0b1 release Index: TclAB_QuickStart.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB_QuickStart.aida,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- TclAB_QuickStart.aida 6 Jan 2004 06:58:26 -0000 1.5 +++ TclAB_QuickStart.aida 26 Jan 2004 23:07:07 -0000 1.6 @@ -1,39 +1,44 @@ :Title: TclAB_QuickStart :Project: addressbook extension for Tcl -!! :Version: $Revision$ -!! :CVSDate: $Date$ -!! :Author: Bernard Desgraupes <bde...@ea...> -!! :Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> -!! :Created: 2003-12-14 18:26:47 -:Modified: 2004-01-04 21:10:51 -!! :Keywords: Address book, data base -:TclCmd: set currentversion [package require addressbook] +:Version: $Revision$ +:CVSDate: $Date$ +:Author: Bernard Desgraupes <bde...@ea...> +:Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> +:Created: 2003-12-14 18:26:47 +:Modified: 2004-01-23 22:03:14 +:Keywords: Address book, data base +((if $aida_params(target) eq "Html" !! logo ((im Images/TclAB_logo.gif TclAB Logo im)) ((nl ((lk TclAB.html ))Home Page lk)) | ((lk http://sourceforge.net/projects/tcladdressbook )) Project Page at SourceForge lk)) +if)) ((/ This file is a tutorial that demonstrates the [addressbook] command defined by the Tcladdressbook extension for Tcl. It documents -version ((s $currentversion s)). -For a detailed and complete description of the syntax of each subcommand, +version ((s [package require addressbook] s)). All the Tcl instructions in the sections +below are very short one-line commands which you can try in any Tcl shell, +like tclsh for instance. +((nl For a detailed and complete description of the syntax of each subcommand, refer to the ((lk TclAddressBookHelp.html ))help file lk)). +The home page for Tcladdressbook is +((lk http://tcladdressbook.sourceforge.net/ )) on the SourceForge site lk)). /)) ((toc -Load the extension +First load the extension like this ((| package require addressbook |)) ((s1 Using the commands -((s2 The [groups] command +((s2 The [groups] subcommand List all the groups (ID and name) ((| addressbook groups @@ -53,7 +58,7 @@ |)) -((s2 The [persons] command +((s2 The [persons] subcommand List all the persons records (ID and name) ((| addressbook persons @@ -64,7 +69,7 @@ |)) -((s2 The [count] command +((s2 The [count] subcommand Count the existing groups and persons records ((| addressbook count -groups @@ -73,23 +78,23 @@ |)) -((s2 The [getme] command +((s2 The [getme] subcommand Store the info about "me" in the variable ((i myrecord i)). ((| set myrecord [addressbook getme] |)) The value of ((i myrecord i)) is a keyed list. One can use the usual Tcl list commands to parse this value or special commands defined in the TclX -extension (see section ((lk #ukl ))Using keyed lists lk)) below). +extension (see section ((rf ukl ))Using keyed lists rf)) below). -((s2 The [record] command +((s2 The [record] subcommand Store the ID of the first record in the variable ((i theid i)) ((| set theid [lindex [addressbook persons -ids] 0] |)) Store the info about this record in the variable ((i person i)). The -returned value has the same keyed list format as with the [getme] command. +returned value has the same keyed list format as with the [getme] subcommand. ((| set person [addressbook record $theid] |)) @@ -105,7 +110,7 @@ |)) -((s2 The [type] command +((s2 The [type] subcommand Find the type (((i ABPerson i)) or ((i ABGroup i))) of the object corresponding to the ID ((i $theid i)) ((| @@ -113,7 +118,7 @@ |)) -((s2 The [remove] command +((s2 The [remove] subcommand Remove from the database the record corresponding to the ID ((i $theid i)) ((| addressbook delete $theid @@ -137,7 +142,7 @@ |)) -((s2 The [parents] command +((s2 The [parents] subcommand List the parents of a person record (the various groups it belongs to). ((| set theid [lindex [addressbook persons -ids] 0] @@ -150,7 +155,7 @@ One can also find the parents of a group using this command. -((s2 The [create] command +((s2 The [create] subcommand One can create either a group's or a person's record. The third argument will be the "name" of the new record, that is to say the name of the new group or the last name of the new person respectively. The command returns @@ -168,7 +173,7 @@ |)) -((s2 The [property names] command +((s2 The [property names] subcommand Get the list of all existing properties for groups or for persons ((| addressbook property names -groups @@ -176,7 +181,7 @@ |)) -((s2 The [property type] command +((s2 The [property type] subcommand Get the type of a particular property ((| addressbook property type -groups UID @@ -185,7 +190,7 @@ For the two examples above, the result is respectively ((i String i)) and ((i MultiDictionary i)). -((s2 The [property add] command +((s2 The [property add] subcommand Add a new person's property called ((i Instrument i)) with type ((i String i)) ((| addressbook property add -persons Instrument String @@ -196,7 +201,7 @@ addressbook property add -groups Meeting Date |)) -((s2 The [property remove] command +((s2 The [property remove] subcommand Remove the properties created above: ((| addressbook property remove -persons Instrument @@ -204,7 +209,7 @@ |)) -((s2 The [export] command +((s2 The [export] subcommand Create a VCard corresponding to a particular record: ((| set theid [lindex [addressbook persons -ids] 0] @@ -213,7 +218,7 @@ The data returned is binary. You can store it in a file for instance. -((s2 The [import] command +((s2 The [import] subcommand Import in the database some information stored in a .vcf file. A new record containing this info, is created in the database: ((| @@ -225,7 +230,7 @@ |)) -((s2 The [image] command +((s2 The [image] subcommand Get the custom image corresponding to a particular record: ((| set theid [lindex [addressbook persons -ids] 0] @@ -234,7 +239,7 @@ The data returned is binary. You can store it in a file for instance. An error is raised if there is no custom image for this record. -((s2 The [set] command +((s2 The [set] subcommand This command lets you get or set the value of a particular field. For instance, to get the first name, dates and address fields of the first record: ((| @@ -278,7 +283,7 @@ lu)) -((s2 The [search] command +((s2 The [search] subcommand This command can be used to report the IDs of the records corresponding to a single criterion. The criterion is expressed by a three elements list: the first element is the name of a property, the second is a comparison operator and |
|
From: <bde...@pr...> - 2004-01-26 23:07:53
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19040/Help Modified Files: TclAB_Home.aida Log Message: Update for 1.0b1 release Index: TclAB_Home.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB_Home.aida,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TclAB_Home.aida 21 Dec 2003 14:35:39 -0000 1.3 +++ TclAB_Home.aida 26 Jan 2004 23:06:48 -0000 1.4 @@ -1,18 +1,20 @@ :Title: TclAB :Project: addressbook extension for Tcl -!! :Version: $Revision$ -!! :CVSDate: $Date$ -!! :Author: Bernard Desgraupes <bde...@ea...> -!! :Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> -!! :Created: 2003-12-14 18:26:47 +:Version: $Revision$ +:CVSDate: $Date$ +:Author: Bernard Desgraupes <bde...@ea...> +:Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> +:Created: 2003-12-14 18:26:47 :Modified: 2003-12-16 11:47:56 -!! :Keywords: Address book, data base +:Keywords: Address book, data base :TclCmd: set currentversion [package require addressbook] -!! logo +!! !! logo +((if $aida_params(target) eq "Html" || $aida_params(target) eq "Pdf" ((im Images/TclAB_logo.gif TclAB Logo im)) +if)) ((/ Welcome to the Home Page of the Tcladdressbook extension for Tcl. @@ -67,8 +69,7 @@ containing the exact reference of all the commands and a ((lk TclAB_QuickStart.html )) Quick Start file lk)) -which is a tutorial giving examples -of how to use this extension. +which is a tutorial giving examples of how to use this extension. ((s1 Bug reports @@ -84,10 +85,12 @@ <bde...@us...> ((nl Last updated ((s [ISOTime::ISODateAndTimeRelaxed] s)) -!! logo SF -!! ------- +((if $aida_params(target) eq "Html" +!! !! logo SF +!! !! ------- ((- ((nl ((i Tcladdressbook is hosted by i)) ((lk http://sourceforge.net )) ((im http://sourceforge.net/sflogo.php?group_id=96169&type=4 SourceForge.net Logo im)) lk)) +if)) |
|
From: <bde...@pr...> - 2004-01-26 23:07:28
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18839/Help Modified Files: ReadMe Log Message: Update for 1.0b1 release Index: ReadMe =================================================================== RCS file: /cvsroot/tcladdressbook/Help/ReadMe,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ReadMe 5 Jan 2004 06:13:47 -0000 1.3 +++ ReadMe 26 Jan 2004 23:06:18 -0000 1.4 @@ -12,12 +12,17 @@ greater), you can also install it in the Tclextensions folder which is located at the same level as the application. -Please read the documentation about the command in the Help file - TclAddressBookHelp.html - To load the extension in a Tcl script, just use the following instruction: package require addressbook +Please read the documentation about the command in the Help file + TclAddressBookHelp.html + +The file tcladdressbook.n contains the same documentation in troff format. +You can copy it to /usr/share/man/mann from the Terminal like this + sudo cp tcladdressbook.n /usr/share/man/mann +Then you can read it like any man page by just typing + man tcladdressbook Please e-mail any bug or problem you encounter to Bernard Desgraupes e-mail <bde...@us...> |
|
From: <bde...@pr...> - 2004-01-26 23:05:45
|
Update of /cvsroot/tcladdressbook/Contribs/Tcl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18517/Contribs/Tcl Added Files: TabToAddressBook.tcl Log Message: First checkin --- NEW FILE: TabToAddressBook.tcl --- # File: "AddressbookFromTab.tcl" # Created: 2003-12-11 13:09:31 # Last modification: 2004-01-23 09:07:17 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> # Description: this simple script is an example file. You will # have to adapt it to your own needs. It reads a file of tab # separated database records and writes them in the Address Book: all the # records are created in a subgroup called "Imported". # # This script has been placed in the public domain. package require addressbook # Set the fname variable to the pathname of the db file you want to import set fname "/Users/MyName/tabdb.txt" set fid [open $fname r] set lines [read $fid] close $fid # Suppose each line of the file is a database record with seven tab separated # fields corresponding respectively to the first name, the last name, a first # line of address, a second line of address, a Zip code, a city and a # phone number. set keylist [list first last adr1 adr2 zip city tel] # Search if there is already a subgroup called "Imported". If not, create it. set groupId [addressbook search -groups -ids GroupName == Imported] if {$groupId == ""} { set groupId [addressbook create group Imported] } set lines [split $lines "\r\n"] set keysnum [llength $keylist] foreach line $lines { unset -nocomplain Rec # Store a line set line [split $line "\t"] set len [llength $line] if {$len == $keysnum} { for {set i 0} {$i < $len} {incr i} { array set Rec [list [lindex $keylist $i] [lindex $line $i]] } # Create a new record in AB inside the subgroup if {$groupId != ""} { set theid [addressbook create person $Rec(last) -ingroup $groupId] } # Add the data to the record catch {addressbook set $theid First $Rec(first)} catch {addressbook set $theid Phone [list [list Home [lindex $Rec(tel) 0]]]} set thestreet $Rec(adr1) if {$Rec(adr2) != ""} { append thestreet "\r$Rec(adr2)" } set theaddr [list [list Home [list [list City $Rec(city)] [list ZIP $Rec(zip)] [list Street $thestreet]]]] catch {addressbook set $theid Address $theaddr} addressbook save unset -nocomplain Rec } } |
|
From: <bde...@pr...> - 2004-01-26 23:04:27
|
Update of /cvsroot/tcladdressbook/Contribs/Tcl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18172/Contribs/Tcl Added Files: PhoneBook.tcl Log Message: First checkin --- NEW FILE: PhoneBook.tcl --- # File: "PhoneBook.tcl" # Created: 2004-01-05 11:54:31 # Last modification: 2004-01-23 08:58:13 # Author: Bernard Desgraupes # e-mail: <bde...@ea...> # www: <http://webperso.easyconnect.fr/bdesgraupes/> # Description: this simple script reads all the records from the Address Book # and builds a phones list. Each line of the output file contains the last # name, the first name and the corresponding phone number(s). The fields are # tab separated. # # This script has been placed in the public domain. package require addressbook set fid [open ABPhones.txt w+] fconfigure $fid -encoding macRoman foreach rid [addressbook persons -ids] { set line "" if {![catch {addressbook set $rid Last} res]} { append line $res } append line "\t" if {![catch {addressbook set $rid First} res]} { append line $res } if {![catch {addressbook set $rid Phone} res]} { foreach ph $res {append line "\t[lindex $ph 1]"} } puts $fid $line } close $fid |
|
From: <bde...@us...> - 2004-01-09 14:32:54
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv3098/Help Modified Files: tcladdressbook.n Log Message: Inline |verb| Index: tcladdressbook.n =================================================================== RCS file: /cvsroot/tcladdressbook/Help/tcladdressbook.n,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- tcladdressbook.n 8 Jan 2004 10:36:54 -0000 1.1 +++ tcladdressbook.n 9 Jan 2004 14:32:51 -0000 1.2 @@ -1,7 +1,7 @@ .de uline \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m' .. -.TH tcladdressbook n "" "2004-01-08" "Extension for Tcl" +.TH tcladdressbook n "" "2004-01-09" "addressbook extension for Tcl" .\" :Title: Tcladdressbook Help .\" :Project: addressbook extension for Tcl .\" :Author: Bernard Desgraupes <bde...@ea...> @@ -190,7 +190,7 @@ .sp which may have different interpretations depending on whether the value is numeric or is a string. - +.RS .IP * 4 For a numeric value, they correspond respectively to: .RS @@ -206,13 +206,7 @@ .fi .RE .sp -The -.RS -.nf -^= -.fi -.RE - operator is not applicable (and will default to Greater Than or Equal). +The ^= operator is not applicable (and will default to Greater Than or Equal). .IP * 4 For a string value, they correspond respectively to: .RS @@ -228,19 +222,7 @@ .fi .RE .sp -The -.RS -.nf -< -.fi -.RE - and -.RS -.nf -<= -.fi -.RE - operators are not applicable and will both default to Equal. +The < and <= operators are not applicable and will both default to Equal. .RE .IP * 4 the argument \fI value\fP is the value you are searching for. In the case of @@ -262,6 +244,7 @@ One can specify an empty string for the label in order to perform the search over all the possible labels. One can also specify an empty string for the key in order to perform the search over all the possible keys in a dictionary. +.RE .PP The \fI -groups\fP or \fI -persons\fP options let you specify the kind of records you want to search. If it is not specified, the default is |
|
From: <bde...@us...> - 2004-01-08 10:36:57
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv30761/Help Added Files: tcladdressbook.n Log Message: Man page. First checkin --- NEW FILE: tcladdressbook.n --- .de uline \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m' .. .TH tcladdressbook n "" "2004-01-08" "Extension for Tcl" .\" :Title: Tcladdressbook Help .\" :Project: addressbook extension for Tcl .\" :Author: Bernard Desgraupes <bde...@ea...> .\" :Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> .\" :Modified: 2004-01-05 06:42:28 .SH NAME .PP addressbook - manipulate the Macintosh OSX Address Book database .SH SYNOPSIS .PP \fBpackage require addressbook\fP .PP \fBaddressbook subcommand\fP ?\fI arg arg\fP...? .SH INTRODUCTION .PP The argument \fI subcommand\fP indicates what operation to perform. Any unique abbreviation for each subcommand is acceptable. The valid subcommands are explained in the next sections. .SH SUBCOMMANDS .PP .SS addressbook changed .PP This command returns 1 if there has been changes made to the database, 0 otherwise. Changes are made in memory with commands such as \fBaddressbook set\fP, \fBaddressbook create\fP, \fBaddressbook delete\fP. To make these changes permanent, one must call the \fBaddressbook save\fP command. .SS addressbook count (-groups | -persons) ?-ingroup \fI groupID\fP? .PP This command returns the count of existing groups or persons in the database. One can specify a particular group with the -ingroup option to count only the subgroups or members in this group. .SS addressbook create (group | person) \fI name\fP ?-ingroup \fI groupID\fP? .PP This command lets you create a new group or a new person record. The \fI name\fP argument is the name to give to the new group or the last name of the person for which a new record is created. With the \fI -ingroup\fP option one can make the newly created record a subgroup or a member of the particular group with unique ID \fI groupID\fP. If no error occurs, the command returns the unique ID of the created record. .SS addressbook delete \fI recordID\fP ?-fromgroup \fI groupID\fP? .PP This command removes the record with unique ID \fI recordID\fP from the database or from a particular subgroup specified by its unique ID with the \fI -fromgroup\fP option. Note that any changes made to the database won't be definitive until you invoke the \fBaddressbook save\fP command. .SS addressbook export \fI personID\fP .PP This command lets you export the record with unique ID \fI personID\fP as a VCard. The result should be considered as binary data since it can contain an image associated to the record. .SS addressbook getme .PP This command returns all the data available in the database concerning the logged-in user ("Me"). The returned value takes the form of a keyed list: see the \fBaddressbook record\fP command for a description of this format. Keyed lists can be easily manipulated with the \fBkeylget\fP and \fBkeylset\fP commands defined in the TclX extension. .SS addressbook groups ?-ids? ?-ingroup \fI groupID\fP? .PP This command returns a list of all the existing group records: if no option is specified, it is a list whose elements are sublists made of two elements. The first element is the unique ID associated with the group and the second is its name. If the \fI -ids\fP argument is specified, the returned list will contain only the unique IDs of the groups. If the \fI -ingroup\fP option is specified, only the subgroups contained in the group with ID \fI groupID\fP will be returned. .SS addressbook image \fI personID\fP ?\fI imageData\fP? .PP If no \fI imageData\fP argument is specified, this command returns the custom image associated with the record corresponding to the unique ID \fI personID\fP. The returned bytes are binary data. If no image exists, it raises an error. If an \fI imageData\fP argument is specified, it should contain valid binary data defining an image which will be associated the record with unique ID \fI personID\fP. .SS addressbook import \fI vCardData\fP .PP This command imports data in VCard format. The data specified by the \fI vCardData\fP argument must be valid data in VCard format: a new record is created in the database corresponding to the information contained in the VCard. Note that the data can be binary if the VCard contains an image. .SS addressbook parents ?-ids? \fI recordID\fP .PP This command returns a list of all the groups the record with unique ID \fI recordID\fP belongs to. The elements of this list are sublists made of one or two items: the unique ID and, possibly, the name of the record if this field exists. If the \fI -ids\fP option is specified, only IDs are returned. .SS addressbook persons ?-ids? ?-ingroup \fI groupID\fP? .PP This command returns a list of all the existing person records: if no option is specified, it is a list whose elements are sublists made of one or two items: the unique ID and, possibly, the name of the record if this field exists. If the \fI -ids\fP argument is specified, the returned list will contain only the unique IDs. If the \fI -ingroup\fP option is specified, only the members belonging to the group with ID \fI groupID\fP will be returned. .SS addressbook property names (-groups | -persons) .PP This command returns a list of all the properties defined in the database for group or person records. New properties can be created or removed with the \fBaddressbook property add\fP and \fBaddressbook property remove\fP commands. .SS addressbook property type (-groups | -persons) \fI propName\fP .PP This command returns the type of the property specified by the \fI propName\fP argument. The returned type is one of the values listed with the \fBaddressbook property add\fP command below or \fI Unknown\fP. .SS addressbook property add (-groups | -persons) \fI propName\fP \fI propType\fP .PP This command lets you add a new property to the database, either for person or for group records. The name of the new property is specified by the \fI propName\fP argument: it must be unique. One can get the list of all the existing properties with the \fBaddressbook property names\fP command. The type of the property is specified by the \fI propType\fP argument. This argument can have one of the following values: \fI Array, Data, Date, Dictionary, Integer, Real, String, MultiArray, MultiData, MultiDate, MultiDictionary, MultiInteger, MultiReal, MultiString.\fP .SS addressbook property remove (-groups | -persons) \fI propName\fP .PP This command lets you remove a property from the database, either for person or for group records. The name of the property is specified in the \fI propName\fP argument. One can get the list of all the existing properties with the \fBaddressbook property names\fP command. .SS addressbook record \fI recordID\fP .PP This command returns all the data available in the database concerning the record with unique ID \fI recordID\fP. The returned value takes the form of a keyed list. .PP The format used for a particular property's value depends on the type of the property (string, integer, date, multivalue etc.). Some properties have a multiple type: MultiString for fields like Email, Phone etc., MultiDate for fields like ABDate, MultiDictionary for the Address field. In case of a multivalue, the returned value is a keyed list itself. Each element of the list corresponds to a single property. For instance: .RS .IP * 4 the elements of a MultiString or MultiDate value list are two-elements sublists: the first element is the label of the corresponding property (like Home, Work etc.) and the second is the value itself. .IP * 4 the elements of a MultiDictionary value list are lists themselves, representing a Label/Dictionary pair (dictionary in the AddressBook sense, not a Tcl dictionary as defined in version 8.5 of Tcl). Each element of this list has two elements: the first one is the label describing the address (like Home, Work etc.) and the second one is a list representing the dictionary. The lists representing dictionaries contain two-elements sublists: the first item is the key in the dictionary and the second one is the value associated with this key. For instance a person could have two addresses: each address will be returned as a Label/Dictionary pair; the elements of the dictionary are pairs like {City Paris} or {CountryCode fr}. .RE .PP Dates are returned as values suitable for use with the \fBclock format\fP Tcl command. It is the number of seconds relative to "Thu Jan 01 00:00:00 CET 1970". .PP Note that keyed lists can be easily manipulated using the \fBkeylget\fP and \fBkeylset\fP commands defined in the TclX extension. .SS addressbook save .PP This command lets you save the changes made in the database. Commands such as \fBaddressbook set\fP, \fBaddressbook create\fP or \fBaddressbook delete\fP modify the data in memory: to make the changes definitive in the database, one must call explicitely the \fBaddressbook save\fP command. To check whether there has been changes in the database, use the \fBaddressbook changed\fP command. .SS addressbook search ?(-groups | -persons)? ?-ids? ?-nocase? \fI property op value\fP .PP This command returns all the records corresponding to the criterion described by the last three arguments: .RS .IP * 4 \fI property\fP is the name of the property you are searching on. .IP * 4 \fI op\fP is an operator specifying the type of comparison. It can be one of the following symbols: .RS .nf .sp ==, !=, <, <=, >, >=, ^= .fi .RE .sp which may have different interpretations depending on whether the value is numeric or is a string. .IP * 4 For a numeric value, they correspond respectively to: .RS .nf .sp == Equal != Not Equal < Less Than <= Less Than or Equal > Greater Than >= Greater Than or Equal ^= not applicable .fi .RE .sp The .RS .nf ^= .fi .RE operator is not applicable (and will default to Greater Than or Equal). .IP * 4 For a string value, they correspond respectively to: .RS .nf .sp == Equal != Not Equal < not applicable <= not applicable > Contains Substring >= Contains Substring ^= Prefix Match .fi .RE .sp The .RS .nf < .fi .RE and .RS .nf <= .fi .RE operators are not applicable and will both default to Equal. .RE .IP * 4 the argument \fI value\fP is the value you are searching for. In the case of a simple property, \fI value\fP will be a simple string. In the case of a MultiString, MultiInteger or MultiDate property, \fI value\fP will be a two-elements list representing a label/value pair. In the case of a MultiDictionary property, \fI value \fP will be a two-elements list representing a label/dictionary pair, the dictionary itself being a two-elements list representing a single key/value pair. For instance: .RS .nf .sp {Phone "01 02 03 04 05"} {Home {City Paris}} .fi .RE .sp .PP One can specify an empty string for the label in order to perform the search over all the possible labels. One can also specify an empty string for the key in order to perform the search over all the possible keys in a dictionary. .PP The \fI -groups\fP or \fI -persons\fP options let you specify the kind of records you want to search. If it is not specified, the default is \fI -person\fP. If the \fI -ids\fP option is specified, only IDs of the matching records are returned, rather than pairs made of the ID and the name. The \fI -nocase\fP argument concerns string comparisons and requires that no distinction be made between uppercase and lowercase letters. .PP To get a list of all possible properties, use the \fBaddressbook property names\fP command. To know the type of a particular property, use the \fBaddressbook property type\fP command. .SS addressbook set \fI recordID propertyName\fP ?\fI value\fP? .PP This command lets you get or set the value of a particular property for the record with unique ID \fI recordID\fP. If the \fI value\fP argument is not specified, it returns the current value of the property specified in the \fI propertyName\fP argument. If \fI value\fP is specified, the property \fI propertyName\fP will be set to this value. See the \fBaddressbook record\fP command for a description of the format used for the various kinds of properties. .SS addressbook type \fI recordID\fP .PP This command returns the type (ABPerson or ABGroup) of the record with unique ID \fI recordID\fP. .SH INSTALLATION .PP The extension is made of two files: the dynamic library (called addressbook1.0.dylib in version 1.0) and a file pkgIndex.tcl necessary for Tcl to be able to locate the extension upon request. Both files are contained in a folder called, in version 1.0, TclAddressBook1.0. This folder should be installed on your system in /Library/Tcl or in ~/Library/Tcl or, more generally, in any folder contained in your \fBauto_path\fP Tcl variable. If you use the extension within the AlphaX editor (version 8.0b11 or greater), you can also install it in the \fI Tclextensions\fP folder which is located at the same level as the application. .SH VERSION HISTORY .PP .RS .IP * 4 1.0 - - .RE .SH REQUIREMENTS AND PORTABILITY .PP This extension is only useful on Macintosh platforms. Version 10.2 or greater of the system is required: the AddressBook framework was introduced in version 10.2 of the System (aka Jaguar). .SH KNOW ISSUES .PP Please e-mail any bug or problem you encounter: <bde...@us...> .SH LICENSE AND DISCLAIMER .PP This software is free software and distributed under the same licensing terms as the Tcl language itself. See license.terms in the Tcl distribution. .PP © Copyright Bernard Desgraupes 2003-2004 .SH SOURCE CODE .PP Tcladdressbook is an Open Source Project. Its source code is public and can be found on the SourceForge site at the following address: <http://sourceforge.net/projects/tcladdressbook> .PP Tcladdressbook binary releases are available at <http://sourceforge.net/project/showfiles.php?group_id=96169> or on my web page at <http://webperso.easyconnect.fr/bdesgraupes/tcl.html> .PP The code is under CVS control. You can retrieve the latest stage of development using any CVS client. See instructions at: <http://sourceforge.net/cvs/?group_id=96169> .PP You can also browse the cvs repository online at <http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook> .SH CONTRIBUTIONS .PP Code contributions (Tcl scripts making use of the Tcladdressbook extension) are very welcome. There is a "Contribs" directory in the Tcladdressbook project on SourceForge for code contributions. They must be free software, distributed under an Open Source license acceptable by the SourceForge site (for instance, the same licensing terms as the Tcl language itself). .SH SEE ALSO .PP See the TclX extension for keyed lists. See the Mk4Tcl extension for commands to open directly the database file. .SH KEYWORDS .PP Address book, data base. .PP \l'70\(ul' .PP |
|
From: <bde...@us...> - 2004-01-06 06:59:06
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv22441/Help Modified Files: TclAddressBookHelp.html Log Message: Simplified subst tags Index: TclAddressBookHelp.html =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- TclAddressBookHelp.html 5 Jan 2004 06:12:49 -0000 1.13 +++ TclAddressBookHelp.html 6 Jan 2004 06:59:03 -0000 1.14 @@ -5,8 +5,10 @@ </HEAD> <BODY> <!-- :Title: Tcladdressbook Help --> -<!-- :Project: addressbook extension for Tcl --><P><!-- :Author: Bernard Desgraupes <A HREF="mailto:bde...@ea...">bde...@ea...</A> --> -<!-- :Homepage: <A HREF="http://webperso.easyconnect.fr/bdesgraupes/">http://webperso.easyconnect.fr/bdesgraupes/</A> --><P><!-- :Modified: 2004-01-05 06:42:28 --><P><!-- :TclCmd: set currentversion [package require addressbook] --><P><!-- logo --> +<!-- :Project: addressbook extension for Tcl --> +<!-- :Author: Bernard Desgraupes <A HREF="mailto:bde...@ea...">bde...@ea...</A> --> +<!-- :Homepage: <A HREF="http://webperso.easyconnect.fr/bdesgraupes/">http://webperso.easyconnect.fr/bdesgraupes/</A> --> +<!-- :Modified: 2004-01-05 06:42:28 --><P><!-- logo --> <P><IMG SRC="Images/TclAB_logo.gif " ALT="TclAB Logo" ALIGN=bottom></P> <P> <A href="TclAB.html"> Home Page</A> | <A href="http://sourceforge.net/projects/tcladdressbook"> Project Page at SourceForge</A><P><HR><BLOCKQUOTE><P><I> This is a manual page for the Tcladdressbook extension for Tcl. It @@ -130,9 +132,8 @@ properties with the <B>addressbook property names</B> command.<P><H4><A NAME="M20"></A> addressbook record <I>recordID</I></H4> This command returns all the data available in the database concerning the record with unique ID <I>recordID</I>. The returned value -takes the form of a keyed list: see the <B>addressbook record</B> command -for a description of this format. -<P> The format used for a particular value depends on the type of +takes the form of a keyed list. +<P> The format used for a particular property's value depends on the type of the property (string, integer, date, multivalue etc.). Some properties have a multiple type: MultiString for fields like Email, Phone etc., MultiDate for fields like ABDate, MultiDictionary for the Address field. In case of a @@ -262,6 +263,6 @@ See the TclX extension for keyed lists. See the Mk4Tcl extension for commands to open directly the database file.<P><H2><A NAME="M33"></A> KEYWORDS</H2> Address book, data base.<P><HR> -<P> Last updated 2004-01-05 07:09:51<P> +<P> Last updated 2004-01-06 07:36:53<P> </BODY> </HTML> |