Skip to main content

Quick Summary

​I attended the Association for Library Collections & Technical Services webinar Introduction to Python and PyMARC: Session 2. Presenter Lauren Magnusson (California State University San Marcos) continued her discussion of some of the many uses for the Python programming language and the PyMARC module. 

Body

​I attended the Association for Library Collections & Technical Services webinar Introduction to Python and PyMARC: Session 2. Presenter Lauren Magnusson (California State University San Marcos) continued her discussion of some of the many uses for the Python programming language and the PyMARC module. 

Since she spent much of the first session of this series focusing on installation and getting started with Python, Magnusson was able to go further in depth into the use cases she mentioned in the first session: 

  • Extract and transform OCLC numbers from a set of MARC records. For example, perhaps you need to do a homegrown OCLC reclamation project and update your holdings in WorldCat. You could write a Python script to strip out all the OCLC prefix or suffix text from your MARC records so that you are left with just a list of OCLC numbers to use for updating holdings in WorldCat.
  • Transform a file of MARC records for bulk DSpace metadata ingest. Transform MARC records into Dublin Core records, and prepare a file for ingest into DSpace.
  • Extract and transform ISBNs for holding upload for GOBI. Extract ISBNs from a set of MARC records and put in your GOBI account number to be able to tell GOBI what you hold. 
  • Generate a KBART file from MARC records for custom WorldCat Knowledge Base collections. Take a vendor file of MARC records, run a Python script on it, and generate a custom KBART file (file format needed for ingest into the WorldCat Knowledge Base)

For each scenario, the presenter showed a piece of script that could solve the problem at hand. She took participants step by step through each piece of code, explaining what it does and why it is formulated the way it is. She did a good job pointing out confusing pieces (such as the use of variables) and explaining them clearly. 

The presenter also discussed some underlying functionality that can be used in a wide variety of situations, including looping through fields to perform multiple manipulations on the same field and writing data back and forth between MARC files and CSV (spreadsheet) files. 

Finally, Magnusson recommended some tutorials and further reading: 

Written by

Lizzy Baus
Metadata Librarian, Macalester College
Professional Development logo.

Strengthening the knowledge, skills, and efficiency of staff in libraries throughout the Minitex region