NAME
picawebcat - command line interface to PICA::Store
SYNOPSIS
picawebcat [options] <command>
Commands:
get <id(s)>
create <file(s)>
update <id> <file> [<version>]
delete <id>
upsert <file(s)>
Options:
-config <file> set config file (see description with -m)
-dbsid <dbsdi> set database id
-from <file> read ids or files from a file (empty lines ignored)
-help brief help message
-language <lang> set language code
-man full documentation
-password <pwd> set password
-quiet no additional output
-SOAP <url> set SOAP interface base URL
-simulate simulate (only print what would be done)
-userkey <user> set user
-version print version of this script
DESCRIPTION
This script can be used to get, insert, update, and delete records in a PICA::Record storage. The connection to a specific storage can be specified with command line options or in a special config file.
You can use one of five commands get, create, update, delete, and upsert. A get command will print the record(s) data to STDOUT, the other commands only print a status message on success. If an error occurred, the error message is send to STDOUT and the script ends with error code.
The upsert command expects files to be named with their ids and works like:
if ( get <id> ) then
update <id> <file>
else
create <file>
Config file
By default the script first looks whether the environment variable WEBCAT_CONF points to a config file, otherwise whether a file named "webcat.conf" located in the current directory exists. The config file can contain key=value pairs of dbsid, SOAP, userkey, password, language.
Command line parameters override settings in a config file.
Examples
webcat get 000000477
webcat delete 000000477
webcat create myrecord.pica
webcat update 000000477 myrecord.pica
webcat -f records.list create > creation.log 2> creation.err