Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timclicks/okrand
A MARC21 to RDF converter
https://github.com/timclicks/okrand
Last synced: 3 days ago
JSON representation
A MARC21 to RDF converter
- Host: GitHub
- URL: https://github.com/timclicks/okrand
- Owner: timClicks
- Created: 2011-09-12T02:22:22.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-09-13T03:02:40.000Z (over 13 years ago)
- Last Synced: 2025-01-19T11:15:17.476Z (7 days ago)
- Language: Python
- Homepage:
- Size: 104 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
okrand - a MARC21 to RDF converter
about
=====software
--------This tool was originally used to convert the
National Library of New Zealand's MARC21
catalogue to RDF. It should be sufficiently
generic to do the task for any MARC21 file.The conversion process loses some data. If
you know of an RDF vocabularly that matches
MARC21 perfectly, please contact the author.Once converted, your
name
----Marc Okrand invented Klingon. MARC21 seems
like Klingon for computers.dependencies
============
okrand depends on two libraries to do its
heavy lifting:RDFLib
pymarcBoth can be installed via the command line
with pip or easy_install:$ pip install rdflib pymarc
$ easy_install rdflib pymarcusage
=====No command line usage yet. Open up a Python
interpreter and run the main function.By example
----------1. You want to parse catalog.mrc in memory:
>>> import okrand
>>> graph = okrand.main('catalog.mrc')2. You want to parse a compressed
catalog.mrc.gz file and store the graph
on disk so that it can be used by RDFlib:>>> okrand.main('catalog.mrc',
... store_type='Sleepycat',
... store_id='my_catalog',
... graph_id='my_catalog',
... gzipped=True)Note: store_id and graph_id are arbitrary,
but are strongly recommended for
disk-based stores.If you would like to serialize the graph, call
you can do so from the resulting object:>>> graph.serialize('mycatalog.n3',
... format='n3')licence
======APGL v3.