add_date_fields_to_marc_records.pl
perl add_date_fields_to_marc_records.pl --help perl add_date_fields_to_marc_records.pl --field='905$a=0/%Y' --field='905$a=1/%Y/%b-%m' --field='905$a=2/%Y/%b-%m/%d' --unless-exists='905$a' --verbose --confirm perl add_date_fields_to_marc_records.pl --field='905$a=0/%Y' --field='905$a=1/%Y/%b-%m' --field='905$a=2/%Y/%b-%m/%d' --unless-exists='905$a' --where "biblionumber=42" --verbose --confirm perl add_date_fields_to_marc_records.pl --field='905$a=0/%Y' --field='905$a=1/%Y/%b-%m' --field='905$a=2/%Y/%b-%m/%d' --date-field='908$a' --verbose --confirm
Add some MARC fields to bibliographic records.
The replacement tokens are the ones used by strftime.
Prints this help
Verbose mode.
Confirmation flag, the script will be running in dry-run mode if set not.
Limits the search on bibliographic records with a user-specified WHERE clause.
Only the columns from the biblio table are available.
Fields to add to the bibliographic records.
Must be formatted as 'tag' $ 'subfield' = 'value'
For instance:
905$a=0/%Y will add a new field 905$a with the value '0/2019' (if run in 2019)
905$a=2/%Y/%b-%m/%d'will a a new field 905$a with the value '2/2019/Mar-03/13' if run on March 13th 2019
Will only create the new fields if this field does not exist.
For instance, if --field='905$a=0/%Y' and --unless-exists='905$a' are provided, a 905$a will be created unless there is already one. If --unless-exists is not passed, a new 905$a will be created in any case.
The date will be picked from a specific marc field.
For instance, if the record contains a date formatted YYYY-MM-DD in 908$a, you can pass --date-field='908$a' Note that the date format used will be the one defined in the syspref 'dateformat', or iso format.