Skip to main content

A simple converter of MARCXML/PICAXML to CSV/TSV

Project description

marcxml2csv

A simple converter of (possibly gzipped) MARCXML/PICAXML to (possibly gzipped) CSV/TSV.

The resulting CSV/TSV has been designed to be easy to use as a data table, but also to retain all ordering informaation in the original when such is needed. The format is as follows: record_number,field_number,subfield_number,field_code,subfield_code,value

Here, record_number identifies the MARC/PICA+ record, while field_number and subfield_number can be used for more exact filtering / reconstructing the original field flow if needed.

For the MARC leader and control fields, subfield_number will be empty.

For MARC data fields, ind1 and ind2 values are reported as separate rows with the subfield_code being ind1 or ind2, but only when non-empty. The also have an empty subfield_number.

Installation

Install from pypi with e.g. pipx install marcxml2csv.

Usage

Usage: marcxml2csv [OPTIONS] [INPUT]...

  Convert from MARCXML (gz) input files into (gzipped) CSV/TSV

Options:
  -o, --output TEXT  Output CSV/TSV (gz) file  [required]
  --help             Show this message and exit.
Usage: picaxml2csv [OPTIONS] [INPUT]...

  Convert from PICAXML (gz) input files into (gzipped) CSV/TSV

Options:
  -o, --output TEXT  Output CSV/TSV (gz) file  [required]
  --help             Show this message and exit.

Files will be read/written using gzip if the filename ends with .gz. TSV format will be used if the output filename contains .tsv, otherwise CSV will be used.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marcxml2csv-1.0.4.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

marcxml2csv-1.0.4-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file marcxml2csv-1.0.4.tar.gz.

File metadata

  • Download URL: marcxml2csv-1.0.4.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.6 Darwin/21.6.0

File hashes

Hashes for marcxml2csv-1.0.4.tar.gz
Algorithm Hash digest
SHA256 fd50899ef3fc1b66fbb24a0b68b3db719b9630a3f6cff35de7a166190a7d12d0
MD5 1d3061dbd1af53d1a316ec721e0473b3
BLAKE2b-256 9323fb785ebc1487dabdc4740c6e2172c54bd6e51729e12d2dacd4c862e1da9f

See more details on using hashes here.

File details

Details for the file marcxml2csv-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: marcxml2csv-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.6 Darwin/21.6.0

File hashes

Hashes for marcxml2csv-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bac7905d482527ce1d04cd138ce437851e66e92b0d7436f5b94229f1a80e4c94
MD5 46f7fcacaa07c01ccf2b5f9f98614809
BLAKE2b-256 b13e86a24ab8d8cc31cdfae8b18d3df09f56839438dc816bb033bd5d37c8d051

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page