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.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

marcxml2csv-1.0.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: marcxml2csv-1.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.4 Darwin/21.5.0

File hashes

Hashes for marcxml2csv-1.0.1.tar.gz
Algorithm Hash digest
SHA256 25db79ca3e2dcb581d77a3eeb5e16252009199cac0b1f6c87ddfaffc54796b2a
MD5 b36d2b3d3505d71a931744121b5e2553
BLAKE2b-256 f016a80ff7e401ab5c24720c7a5fd0a4dc92aeef741f87a52afe2e2307b77a1b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: marcxml2csv-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.4 Darwin/21.5.0

File hashes

Hashes for marcxml2csv-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c8b7299dd2dfa1c827c4494162c72d07f7b25d053b9582b736dc2b8df3d1ca7
MD5 97948d0566bec24ae50baa2c8e447127
BLAKE2b-256 a892424fe08a82a481480026ff26ad901ac389f7ba284568fc9e9217fef57957

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