Skip to content
Vladimir Alexiev edited this page Aug 15, 2022 · 10 revisions

Importers are Catmandu packages to read a specific data format. Catmandu provides importers for MARC, JSON, YAML, CSV, Excel, and many other input formats. One can also import from remote sources for instance via protocols such as SPARQL and OAI-PMH.

The name of a Catmandu importer should be provided as first argument to the convert command.

Read JSON input:

$ catmandu convert JSON

Read YAML input

$ catmandu convert YAML

Read MARC input

$ catmandu convert MARC

The Importer accepts configurable options. Eg you can use the --type arguments to the MARC importer where the following types are currently supported:

  • USMARC (use ISO as an alias)
  • MicroLIF
  • MARCMaker
  • Line 9for line-oriented MARC)
  • MiJ (for MARC-in-JSON)
  • XML (for MARCXML)
  • RAW
  • Lint (for importing ISO and checking validity)
  • ALEPHSEQ(for Aleph Sequential)

Read MARC-XML input

$ catmandu convert MARC --type XML < marc.xml

Read Aleph sequential input

$ catmandu convert MARC --type ALEPHSEQ < marc.txt

Read more about the configuration options of importers by reading their manual pages:

$ catmandu help import JSON
$ catmandu help import YAML
Clone this wiki locally