Skip to content

rsirres/NimMarc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Marc21 Parser for NimLang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published