The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

picadata - parse and validate PICA+ data

SYNOPSIS

picadata [--from TYPE] [--schema FILE] [--to TYPE] {OPTIONS} [FILE]

DESCRIPTION

Parse, validate and/or serialize PICA+ data from the command line, e.g.:

  picadata pica.dat -t xml           # convert binary to XML
  picadata -c -f plain < pica.plain  # parse and count records
  picadata -p 003@ pica.xml -t       # extract field 003@
  picadata pica.xml -s schema.json   # validate against Avram schema

  # document fields used in a record
  picadata -t fields pica.xml -s https://format.k10plus.de/avram.pl?profile=k10plus

OPTIONS

--from, -f

PICA serialization type (plain, plus, binary, XML, ppxml) with XML as default. Guessed from input filename unless specified. See format documentation at http://format.gbv.de/pica

--to, -t

PICA serialization type to enable writing parsed PICA data. Use fields to list all fields in the data (with optional schema information).

--number, -n

Stop parsing after n records. Can be abbreviated as -1, -2...

--order, -o

Sort record fields by field identifier or by occurrence for level 2.

--annotate, -a, -A

Enforce annotated PICA as output format or prevent with -A. Combined with --schema this will set annotations ! and ? to mark validation errors.

--count, -c

Count number of records, holdings, items, and fields.

--path, -p

Select fields or subfield values specified by PICA Path expressions. Multiple expressions can be separated by | or by repeating the option.

--schema, -s

Avram Schema to validate against. Can be a file or an URL.

--unknown, -u

Report unknown fields and subfields on validation (disabled by default).

--build, -b, -B

Build an Avram schema from records. Option -B abbreviates the schema.

--color, -C

Colorize output. Only supported for PICA plain and PICA plus format.

--mono, -M

Monochrome (don't colorize output).

--version, -V

Print version number and exit.

SEE ALSO

See catmandu for a more elaborated command line tool for data processing (transformation, API access...), including PICA+ with Catmandu::PICA.