picaimport - Import or delete PICA+ records in a PICA::Store
picaimport [options] [file]*
-help this brief help message -man show detailed documentation with examples -config FILE read configuration from a file (default: picastore.conf) -delete delete records instead of importing them -force do not ask before deleting -from FILE read files to import from a file (default: - for STDIN) -get download records instead of uploading (implies -write) -move remove imported files on success -log FILE print import information to a file (default: - for STDIN) -quiet suppress additional status messages and output -ppn update with the PPN of a record if no PPN is given -version print version of this script and exit -write write back the resulting record
This script can be used to import or delete PICA records in a PICA::Store, for instance via webcat (PICA::SOAPClient) or into a SQLite database (PICA::SQLiteStore). By default only the first PICA record of each file that you specify is imported.
The PICA+ files to be imported can be specified either as command line parameters or listed in another file (option -from) or you type in the file names on request. It is recommended to delete sucessfully imported files (with option -move) so you do not import them twice. If options are read from another file, you must specify PPN and filename seperated by space (update) or just a filename on each line. To update via command line you must specify a PPN (with option -ppn) and a record file or state with option -update that the PPN is taken from the record.
On import or update picaimport prints the PPN and filename of each record in one line - you can use this output format as input format with option -from to later update the records.
To connect to a PICA store you must provide a config file via the -config parameter or the PICASTORE environment variable - or name it picastore.conf and put it in the current directory. The config file can contain all parameters that may be provided to the PICA::Store constructor. At least there must be one of the following parameters:
picastore.conf
webcat = URL SQLite = FILE
Other known configuration parameters include dbsid, userkey, password, and language.
Import the first PICA+ record in myrecord.pica to the store specified in the default configuration file (picastore.conf).
myrecord.pica
picaimport myrecord.pica
Update record 000073067 in the store specified in the default configuration file with the first PICA+ record in myrecord.pica.
000073067
picaimport -conf mydb.conf 000073067=title1.pica
Get the record 000073067 from the default store and write it to down.pica
down.pica
picaimport -get 000073067=down.pica
Import the first PICA+ record in myrecord.pica to the default store and write back the resulting record to myrecord.pica.
picaimport -write myrecord.pica
Import all files listed in newrecords and delete imported files on success
newrecords
picaimport -from newrecords -move
Jakob Voss jakob.voss@gbv.de
jakob.voss@gbv.de
This script is published as Public Domain. Feel free to reuse as you like!
To install PICA::Record, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PICA::Record
CPAN shell
perl -MCPAN -e shell install PICA::Record
For more information on module installation, please visit the detailed CPAN module installation guide.