Using Python Script Convert MARC files to Excel spreadsheets and vice-versa

This blog post will help you to convert excel spreadsheets to marc and vice-versa using a python script instead of using a standalone software like MarcEdit. Python is a widely used, interpreted, high-level, general-purpose programming language. Python is available in Debian/Ubuntu by default, You can check the version of python using this command python -V . If you want to install the latest version of it click here

Install PIP On Debian/Ubuntu
Pip is a cross-platform package manager for installing and managing Python packages (which can be found in the Python Package Index (PyPI)) that comes with Python 2 >=2.7.9 or Python 3 >=3.4 binaries that are downloaded from python.org.

sudo su
apt install python-pip #python 2
apt install python3-pip #python 3

Install Marc2Excel

pip install marc2excel

Converting MARC to Excel:
Place the .mrc file into your desired directory, navigate to it and execute the command ( I placed it in my Downloads directory)

cd Downloads
marc2excel_cli.py test.mrc


Converting Excel to MARC:

cd Downloads
excel2marc_cli.py test.xlsx


NB:
  • The first raw of Excel spreadsheet must be filled up with appropriate marc tag
  • Appropriate extension must be used (.mrc/.xlsx/.xls)
Watch the video


Reference: https://pypi.org/project/marc2excel/

0 Komentar