Skip to content
Python 3 MARC21 indexer using a forked pymarc that has been migrated to Python 3. Originally started to address some Unicode issues in Python 2.x with MARC21 records
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
features
.gitignore
LICENSE.rst
README.rst
__init__.py
decompose_marc.py
index.py
index2.py
marc.py
marc2.py
marc_maps.py
marc_sharder.py
tutt_maps.py

README.rst

py3 MARC Indexer README

The py3-marc-indexer project is an MARC 21 indexer using Python 3 along with a forked pymarc project that has been converted for use in Python 3 as well.

When indexing a small academic college library's MARC records, I ran into more Unicode issues related to misencoded MARC records. Part of these problems were a result of Python 2.6+ versions string verses unicode handling that I was able to elimate because with Python 3 all strings are Unicode.

License

The py3-marc-indexer project is licensed under Apache 2 open source license.

Installing

The recommended way to install py3-marc-indexer is to first created a Python 3 virtualenv first.

  1. Clone the forked pymarc project and install pymarc with the following commands.(Assumes you running a Linux VM)
::
$ git clone git@github.com:jermnelson/pymarc.git $ cd pymarc $ git branch py3 $ python setup.py install
  1. Clone the py3-marc-indexer project with the these commands.
::
$ git clone git@github.com:jermnelson/py3-marc-indexer.git $ cd py3-marc-indexer $ git branch multiprocess

Indexing MARC Records

To index MARC records, run the index command along with a path to you MARC records file. If your Solr server resides on a different machine, you'll need to change the stub_conf file located in index.py file. The next refactoring of this code base will likely to be integrate it into a Python 3 version of the FRBR-Redis-Datastore's Aristotle Django environment.

::
$ python index.py /path-to-marc-file/test.mrc
Something went wrong with that request. Please try again.