SUMMARY: Looking for MARC module for PERL

Peter Murray pem at po.CWRU.Edu
Sun Jun 2 18:38:53 EDT 1996


Last month I posted a question to the WEB4LIB mailing list asking if
anyone knew of a MARC file Module for PERL.  I received a few helpful mail
messages and some encouragement, but nothing that was exactly what I was
looking for.  Two URLs (thanks, Steve Palincsar) of note are:

  http://sunsite.berkeley.edu/Tools/
  http://lcweb.loc.gov/marc/marcutil.html

Below is a copy of the messages that I received.  Many thanks to everyone
who replied.  The LOC programs look close, but the only thing that is
available is an MS-DOS executable...no source code.  The person who is
responsible for that section of the web is on vacation right now, but I
hope to hear when that person gets back that the source code is
releaseable. 

Since I haven't found what I'm looking for, I've decided to try to write
it myself.  To that end, I've registered an idea in the PERL module
directory and hope to have a prototype of the module up and running next
month.  There was a suprising amount of interested generated when I posted
a message here before, so when there is substantial progress to be
reported, I'll send a message to the WEB4LIB mailing list. 


Peter
--
Peter Murray, Senior Systems Analyst                       pem at po.cwru.edu
Library Information Technologies         http://www.cwru.edu/home/pem.html
Case Western Reserve University, Cleveland, Ohio            W:216-368-8989



From: palincsars.isc at gao.gov
Date: Wed, 22 May 96 10:27:51 EST
Subject: USMARC records

I looked through the CPAN list of Perl modules and found nothing.  Then 
I did a web search and found this page:

http://lcweb.loc.gov/marc/marcutil.html

Sounds to me as though if you used the MARCBreakr program to convert to 
ASCII it ought to be pretty simple to parse out the resulting text with 
perl.  OTOH, what do I know about MARC?  The closest I ever got to tech 
svcs was doing original cataloging in a totally manual non-electronic 
mode.  (Then I switched to reference full time, and eventually turned 
to the Dark Side of the Force...)

steve palincsar
webmaster at www.gao.gov



MARCMakr & MARCBreakr

                         General Information

            Network Development and MARC Standards Office



This page describes software programs, related support files, and user 
documentation that are available, free-of-charge, to MARC format users. 
In order to obtain the non-textual items listed, your Web browser must 
be able to transfer files via File Transfer Protocol (FTP) or you must 
be able to use FTP directly. If FTP is not available to you, copies of 
these files can be sent to you via surface mail. 

                  To access the Library of Congress' FTP site directly:
                               ftp to ftp.loc.gov
                              login as anonymous
                      enter your email address as the password
                                cd to pub/marc



MARCMakr

This MARC utility runs on any IBM-compatible PC running under DOS with 
a 386 Intel (or compatible) processor, or better. (MARCMakr also runs 
under OS/2 in DOS emulation.) The program accepts files from most text 
editors and work processors and converts properly formatted
information into the MARC record structure. The MARC record length, 
directory, and special control characters are created automatically. 
You can FTP the MARCMakr executable program now. 

MARCBreakr

This companion MARC utility also runs on any IBM-compatible PC running 
under DOS with a 386 Intel (or compatible) processor, or better, and 
under OS/2 in DOS emulation. The program converts structurally sound 
MARC records and reformats the information into an ASCII text file
format. The resulting text file is identical to the input file format 
required by MARCMakr. You can FTP the MARCBreakr executable program 
now. 

Character set conversion files

In order to run, MARCMakr and MARCBreakr read in special character set 
conversion files as they run. The file named "usmarc.txt" is used with 
MARCMakr. The file named "ustext.txt" is used with MARCBreakr. 

WordPerfect Macros

Two WordPerfect 5.1 macros, "mnemonix.wpm" and "diacritx.wpm", are 
available for preprocessing MARCMakr files or postprocessing MARCBreakr 
files to change from the letter-with-diacritic to the 
diacritic-as-separate-character encodings required in MARC. 

User Manual

A user manual for MARCMakr and MARCBreakr is available as well. The 
manual describes how to run each of the utilities and how to format a 
text file for conversion to MARC. 

Test files

Available to MARC users interested in experimenting or testing with 
these utilities are four test files;
two for each of the utilities. 

      makrtest.txt - sample MARCMakr input file 
      makrtest.mrc - sample file after conversion to MARC by MARCMakr 
      brkrtest.mrc - sample MARCBreakr input file 
      brkrtest.txt - sample file after conversion to text by MARCBreakr 



------------------------------
From: palincsars.isc at gao.gov
Date: Wed, 22 May 96 10:40:37 EST
Subject: MARC and perl

Did an excite search on USMARC and perl and came up with this:

http://sunsite.berkeley.edu/Tools/


"Tei2marc is written in perl, and based on the University of Virginia 
Library Electronic Text Center's most current document type definition 
(DTD), TEILITE.DTD. It handles English language and reads in a header 
element by element, stores its readings in USMARC format, and creates 
an output file (in ASCII) following the MARC computer file format field 
by field (excluding the leader)." 

This program is described here:  http://www.sil.org/sgml/tei-marc.html

Also found some conversions here: 
http://www.ecst.csuchico.edu/~jacobsd/bib/tools/converters.html#conv:marc

including marc2bibtex which is written in perl.  

Perhaps between the two you can figure something out?

------------------------------
From: Michael Zimmerman <zimmer at pop.psu.edu>
To: Peter Murray <pem at po.CWRU.Edu>
Subject: Re: Looking for MARC module for PERL

As part of a previous incarnation of our homegrown online catalog, I 
wrote PERL code to search MARC-style records (in text) and display them in 
HTML.  It's not marvelous programming, and the records weren't full-blown 
MARC (they had MARC field tags but no sub-delimiters within the fields), 
but you're welcome to look at the code if you want.

The task of fielded searching/reading/displaying MARC records isn't too 
bad.  If you wanted PERL code to _write_ MARC records, I'd have to ask 
"write them from what?" before I could guess how easy or hard that would 
be.  I may still have the code around to generate the MARC-style records 
we used from Pro-Cite export (flat-file) databases.

Let me know if you'd like to see either if these, or if you have any 
questions.

Mike



More information about the Web4lib mailing list