Skip to main content

A simple converter of MARCXML/PICAXML to CSV/TSV/parquet

Project description

bibxml2

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

The resulting CSV/TSV/parquet 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 structure/order if needed.

For MARC data fields, ind1 and ind2 values are reported as separate rows with the subfield_code being i_1 or i_2, but only when non-empty.

Installation

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

Usage

Usage: marcxml2 [OPTIONS] [INPUT]...

  Convert from MARCXML (compressed) input files into (compressed) CSV/TSV/parquet

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

  Convert from PICAXML (compressed) input files into (compressed) CSV/TSV/parquet

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

If the output file extension is .parquet, the output will be in parquet format, compressed with zstd, and with field typings maximally compatible with common R and Python ecosystems. Otherwise, compressed files will be read/written if the filename ends with an identifier recognised by fsspec. 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

bibxml2-1.1.7.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bibxml2-1.1.7-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file bibxml2-1.1.7.tar.gz.

File metadata

  • Download URL: bibxml2-1.1.7.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.11 Darwin/24.5.0

File hashes

Hashes for bibxml2-1.1.7.tar.gz
Algorithm Hash digest
SHA256 94472a41f3e007df11ff49aa5a9f571651e4c12a14dc76ca56930f83f09ba2a0
MD5 da72110c82e986cd05cc4a7049945f64
BLAKE2b-256 8efe79873b0d7a0827b04b7bb3f9fe649f68c7ac275275a2410023531d6b1e12

See more details on using hashes here.

File details

Details for the file bibxml2-1.1.7-py3-none-any.whl.

File metadata

  • Download URL: bibxml2-1.1.7-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.11 Darwin/24.5.0

File hashes

Hashes for bibxml2-1.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d7df1ba234dc9a6322a0fb5594e98dc3b954cc485d97dc6ec539fd574e3be1c4
MD5 581d1853e0df46ec11ece6d1704b218b
BLAKE2b-256 48ac40724223b0550165db0f3e424fa6cf9e9a198d80de9d483d5a04cb8c62eb

See more details on using hashes here.

Supported by

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