Print

Print


I remember using the MARCedit CLI tool for a similar purpose in the past (many years ago). At that time, I needed to run it on Linux, so I used Mono to do that, as advised by Terry Reese on the MARCedit website. Wine should also work just fine for running the tool on Linux.

Here's a possible script that you can use to convert a MARCXML file to MARC21 using the MARCedit CLI tool on Linux:

#!/bin/bash

# Set the input and output file paths
input_file="input.xml"
output_file="output.mrc"

# Run the conversion using the MARCedit CLI tool; please replace [mono OR wine] with either "mono" or "wine" depending on which one you're using
[mono OR wine] cmarcedit.exe -s "${input_file}" -d "${output_file}" -xmlmarc

If you're using Windows, you can run the tool directly without needing to use Mono or Wine. Here's an example command that you can use:

cmarcedit -s yourMARCXML.xml -d outputMARC21.mrc -xmlmarc

If you're using macOS, it seems that you can run the tool directly from the MarcEdit app. According to the directions shared by Eric Phetteplace, "the terminal is run through the MarcEdit app."

I hope this helps! Let me know if you have any questions or if there's anything else I can do to assist you.

All the best,
Filipe

-----Original Message-----
From: Code for Libraries <[log in to unmask]> On Behalf Of Eric Phetteplace
Sent: Tuesday, August 8, 2023 8:06 PM
To: [log in to unmask]
Subject: Re: [CODE4LIB] marcxml to marc

MARCedit has a CLI:
https://marcedit.reeset.net/cmarcedit-exe-using-the-command-line

Looks like the `-xmltomarc` flag is what you want, though I've not used it for this purpose myself.

Best,
Eric


On Tue, Aug 8, 2023 at 11:57 AM Eric Lease Morgan < [log in to unmask]> wrote:

> I have a 500MB MARCXML file, and I want to create a corresponding MARC 
> file in communications format -- "standard" MARC. What command-line 
> utilities can do this sort of work? --Eric Morgan
>