No description
Find a file
2020-05-05 13:59:08 +02:00
benchmark Initial commit 2020-05-04 16:54:13 +02:00
data Initial commit 2020-05-04 16:54:13 +02:00
test Initial commit 2020-05-04 16:54:13 +02:00
.gitignore Initial commit 2020-05-04 16:54:13 +02:00
constant.nim Initial commit 2020-05-04 16:54:13 +02:00
field.nim Add nimble file and correct minor issue README mardown 2020-05-05 13:58:08 +02:00
NimMarc.nimble Add nimble file and correct minor issue README mardown 2020-05-05 13:58:08 +02:00
reader.nim Initial commit 2020-05-04 16:54:13 +02:00
README.md Fix indentation 2020-05-05 13:59:08 +02:00
record.nim Initial commit 2020-05-04 16:54:13 +02:00

Marc21 Parser for Nim Lang

Implementation of a marc21 parse for nimlang. It is heavily based on pymarc as nim and python are so similar.

Some toy benchmarks on OSX with large marc files show that this implementation is (unsurprisingly) 3-4x faster than pymarc.

Basic Usage Example

Save the following code snippet in file: my_reader.nim

import reader
import record

var r = newReader("<path_to_marc>/my_file.marc")

for record in iter(r):
    echo record.toString()

Run the cmd in terminal/cmd:

nim c -r my_reader.nim

Looking for marc file to test this library?

cd data
wget https://www.lib.umich.edu/files/open-access-marc/umich_created_20151120.marc.gz

TODO

  • Add simple cli
  • Support different encodings (e.g. latin-1)
  • Support marc8 encoding
  • Support XML serialization
  • Support JSON serialization
  • Support (sub-)field access like marc-x