This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Convert MARC files to Excel spreadsheets and vice-versa.

Installation

From PyPI:

pip install marc2excel

From GitHub:

git clone https://github.com/alexandermendes/marc2excel
cd marc2excel
python setup.py install

Usage

Running scripts:

The following scripts can be run from anywhere, once the package is installed.

Converting MARC to Excel:

Usage: marc2excel_cli.py [OPTIONS] MARC_PATH

  Convert MARC_PATH to an Excel spreadsheet.

  The path to the saved spreadsheet will be the same as MARC_PATH but with a
  .xlsx extension.

  If a directory is specified for MARC_PATH all files found in that
  directory with .mrc, .marc or .lex extensions will be converted and the
  .xlsx versions saved in the same directory.

  The option to force utf-8 encoding is included to help deal with any
  poorly formed MARC records that you might encounter. For example, those
  that are utf-8 encoded but without the leader set appropriately, or those
  that contain mostly utf-8 data but with a few non-utf-8 characters (any
  non-utf-8 characters will be replaced with the official U+FFFD REPLACEMENT
  CHARACTER).

Options:
  -d        Specify a directory for MARC_PATH.
  --silent  Don't display progress.
  --utf8    Force utf-8 encoding.
  --help    Show this message and exit.

Converting Excel to MARC:

Usage: excel2marc_cli.py [OPTIONS] EXCEL_PATH

  Convert EXCEL_PATH to an MARC file.

  The path to the saved MARC file will be the same as EXCEL_PATH but with a
  .mrc extension.

  If a directory is specified for EXCEL_PATH all files found in that
  directory with .xlsx extensions will be converted and the .mrc versions
  saved in the same directory.

  The option to force utf-8 encoding is included to help deal with any
  poorly formed data found in the spreadsheet. For example, where rows
  contain data that is utf-8 encoded but without the leader set
  appropriately, or rows that contain mostly utf-8 data but with a few non-
  utf-8 characters (any non-utf-8 characters will be replaced with the
  official U+FFFD REPLACEMENT CHARACTER).

Options:
  -d        Specify a directory for EXCEL_PATH.
  --silent  Don't display progress.
  --utf8    Force utf-8 encoding.
  --help    Show this message and exit.

Running from Python:

Converting MARC to Excel:

import marc2excel
marc2excel.marc2excel('path/to/file.mrc', 'path/to/save/file.xls')

Converting Excel to MARC:

import marc2excel
marc2excel.excel2marc('path/to/file.xls', 'path/to/save/file.mrc')

Spreadsheet guidelines

Spreadsheets require a header row that must adhere to the following guidelines:

  • The field tag is required for all fields.
  • For non-control fields, the indicator and subfield tags are also required.
  • Backslashes should be used to indicate blank spaces in indicators.
  • Subfields should be prepended with a dollar symbol.
  • Leaders can be added from a column with the heading LDR (optional).
  • Repeated fields can be created by appending headers with [number].

Example:

001 245 \ $a 852 \1 $j 852 \1 $j [2]
123 some_value another_value another_value

Testing

Tests can be run using:

python setup.py test
Release History

Release History

1.2.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
marc2excel-1.2.1.tar.gz (6.7 kB) Copy SHA256 Checksum SHA256 Source Sep 21, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting