|
ConsoleToolSpecification
The specification of work in console in the man style.
NAMEcontactserv - a service to manage personal address book data in the URI-based Semantic Web style. SYNOPSIScontactserv [<semap instance URL>] <command> [<arguments>] DESCRIPTIONcontactserv is an address book utility to operate with a specified by FOAF scheme personal data. All various aspects of supported contacts data are described in the master.rdf file. COMMANDfind - to find contacts' URI(s) corresponding some constraint field values. get - to display all or specified explicitly contact fields on the specified URI(s). add - to create a new contact or add contact field values on the specified URI(s). update - to update or delete contact field values on the specified URI(s). remove - to remove whole contacts with all fields on the specified URI(s). [--]help or -h - to access the built-in tool documentation. [--]version or -v - to see an information about the tool version. get, add, update and remove are URI-centric commands, they consume URIs consistently. Sometimes you can use the find command to populate them. To exit from these commands enter an empty URI. COMMAND ARGUMENTSFOR FIND COMMANDOnly some fields of contact data can be used to find contacts or try keyword-base approach instead. You can use regular expressions in all these cases. Don't set any arguments to find all contacts. Used field-based arguments:
Other special arguments:
FOR GET COMMANDOptions that define what contact fields must be displayed. Don't set any arguments to display all existing contact fields. Field-based arguments:
Other special arguments:
If a plain literal value doesn't have any predefined language, it is always displayed regardless of the chosen language. The most often used language codes (see the list of available codes also):
FOR ADD COMMANDThe command arguments are identical to arguments from the get command, but there are some additional important rules:
New contact field values should satisfy with the following simple rules:
FOR UPDATE COMMANDThe command arguments are identical to arguments from the get command, but you can update and delete contact fields values instead of only viewing them by means of the following commands:
And some important rules exist:
New contact fields values should satisfy with the rules described in the add command section. FOR REMOVE COMMANDNo predefined arguments. FOR HELP COMMANDTo view the description of any command simply write it's name after the 'help' command: contactserv [--]help <command> EXAMPLESspecdata.rdf (will be used by default by using the predefined environment parameter) and master.rdf (will be used via the http://master.localhost/ semap instance) data are used in the following examples. 1. Find all contact resources URIs: > contactserv find http://localhost/contacts/timbl http://localhost/contacts/nwalsh http://localhost/contacts/ivan_herman http://localhost/contacts/fgiasson http://localhost/contacts/chrisb http://localhost/contacts/cygri http://localhost/contacts/dave_beckett http://localhost/contacts/danbri http://localhost/contacts/mnaver http://localhost/contacts/dulanov 2. Find contact resources that have nickname started with 'c': > contactserv find --nick 'c.*' http://localhost/contacts/chrisb http://localhost/contacts/cygri 3. Who has birthday in winter and has a homepage, weblog, workpage or openid: > contactserv find -b '.*-(12|01|02)-.*' -u '.*' | contactserv get -nbr --homepage Welcome to contactserv version 1.0. Insert a contact URI to process it or press 'ENTER' (an empty URI) to finish. uri> http://localhost/contacts/ivan_herman name: Ivan Herman@en name: Herman Iván@hu birthday: 1955-02-24 homepage: http://www.ivan-herman.net residence: 52.302063:4.87397 uri> http://localhost/contacts/danbri name: Dan Brickley@en birthday: 1972-01-09 homepage: http://danbri.org/ uri> 4. Display all contact resources names (all languages by default): > contactserv find | contactserv get --name --force uri> http://localhost/contacts/timbl name: Timothy Berners-Lee@en uri> http://localhost/contacts/nwalsh name: Norman Walsh@en uri> http://localhost/contacts/ivan_herman name: Ivan Herman@en name: Herman Iván@hu uri> http://localhost/contacts/fgiasson name: Frédérick Giasson@fr uri> http://localhost/contacts/chrisb name: Chris Bizer@en uri> http://localhost/contacts/cygri name: Richard Cyganiak@en uri> http://localhost/contacts/dave_beckett name: Dave Beckett@en uri> http://localhost/contacts/danbri name: Dan Brickley@en uri> http://localhost/contacts/mnaver uri> http://localhost/contacts/dulanov name: Dmitry Ulanov@en name: Уланов Дмитрий@ru uri> 5. Display contact names, emails and available online services in English and Russian languages: > contactserv http://master.localhost/ get --name --mailbox --account --language en,ru --force or > contactserv http://master.localhost/ get -nma -l en,ru --force uri> http://example.com/foaf#me name: 一流の姓 name: Firstname Surname@en name: Имя Фамилия@ru mailbox: mailto:me@example.com account: me@http://example.com/service/ [http://example.com/service/me/] uri> 6. Display all contact fields values: > contactserv http://master.localhost/ find | contactserv http://master.localhost/ get --force uri> http://example.com/foaf#me gender: male gender: female nick: nick@en nick: ник@ru name: 一流の姓 name: Firstname Surname@en firstname: Firstname@en surname: Surname@en name: Имя Фамилия@ru firstname: Имя@ru surname: Фамилия@ru birthday: 1999-12-31 image: http://example.com/image.jpg mailbox: mailto:me@example.com mailboxsha1sum: 7197f75b9213873c4679bfcb982a00943fc0ffb3 phone: tel:+1-(123)-123-4567 homepage: http://example.com/ weblog: http://example.com/blog/ workpage: http://example.com/ icq: 1234567 aim: [aimChatID] msn: me@example.co yahoo: [yahooChatID] jabber: [jabberChatID] account: me@http://example.com/service/ [http://example.com/service/me/] openid: http://example.com/ residence: 12.345678:-12.345678 friend: http://example.com/foaf#anyone uri> 7. Add a first name and surname in French and Spain and Timothy Berners-Lee as a friend to a contact: > contactserv find --surname 'Bern.*' http://localhost/contacts/timbl > contactserv add --firstname --surname --friend Welcome to contactserv version 1.0. Insert a contact URI to process it or press 'ENTER' (an empty URI) to finish. uri> http://example.com/foaf#me firstname: prénom@fr, 'nombre'@es surname: "nom de famille"@fr, `apellido`@es friend: http://localhost/contacts/timbl uri> 8. Change the nick name in English, the weblog page URL and delete the phone number: > contactserv http://master.localhost/ update -fs --nick --phone --weblog -l en Welcome to contactserv version 1.0. Insert a contact URI to process it or press 'ENTER' (an empty URI) to finish. Usage: 1. Press 'TAB' to leave the current field value; 2. Enter an empty value to delete the current field value. uri> http://example.com/foaf#me nick: nick@en -> new nick@en firstname: Firstname@en -> Firstname@en surname: Surname@en -> Surname@en phone: tel:+1-(123)-123-4567 -> weblog: http://example.com/blog/ -> http://example.com/newblog/ uri> Are you sure you want to update those values? (yes/no) no 9. Remove all contacts: > contactserv http://master.localhost/ find | contactserv http://master.localhost/ remove Welcome to contactserv version 1.0. Insert a contact URI to process it or press 'ENTER' (an empty URI) to finish. uri> http://example.com/foaf#me uri> Are you sure you want to delete those contacts? (yes/no) no ENVIRONMENT
EXIT STATUS000 The contactserv utility terminated without any errors (successfully). 001-127 The contactserv utility detected an error. The summary table of all predefined errors:
AUTHORThe semap project development team BUGS/TODOPlease report all bugs and suggestions via http://code.google.com/p/contactserv/issues/list. LICENSECopyright 2007 The semap project development team. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. VERSIONSEE ALSO- |
Sign in to add a comment