OnWorks favicon

marc2ris - Online in the Cloud

Run marc2ris in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command marc2ris that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



marc2ris - converts MARC bibliographic data to the RIS format


marc2ris [-e log-destination] [-h] [-l log-level] [-L log-file] [-m] [-o outfile]
[-O outfile] [-t input_type] [-u t|f] file


marc2ris attempts to extract the information useful to RefDB from MARC datasets. MARC
(Machine Readable Catalogue Format) is a standard originating from the 1960s and is widely
used by libraries and bibliographic agencies. Most libraries that offer Z39.50 access can
provide the records in at least one MARC format (like with most other "standards" there's
a couple to choose from). Currently the following MARC dialects are supported:

This is an attempt to consolidate existing MARC variants (mainly USMARC and CANMARC)
and will most likely be the format supported by all libraries in the near future. The
format is described on the Library of Congress MARC pages[1].

This is the European equivalent of a standardization attempt. The specification can be
found here[2].

This format is fairly close to the USMARC variant and is mainly used by libraries in
the United Kingdom and in Ireland. Libraries supporting this format may switch to
MARC21 in the future. Unfortunately there is no online description of this format, but
this PDF document[3] describes the main differences between USMARC and UKMARC.


By default the script reads USMARC data from stdin and sends RIS data to stdout.

-e log-destination
log-destination can have the values 0, 1, or 2, or the equivalent strings stderr,
syslog, or file, respectively. This value specifies where the log information goes to.
0 (zero) means the messages are sent to stderr. They are immediately available on the
screen but they may interfere with command output. 1 will send the output to the
syslog facility. Keep in mind that syslog must be configured to accept log messages
from user programs, see the syslog(8) man page for further information. Unix-like
systems usually save these messages in /var/log/user.log. 2 will send the messages to
a custom log file which can be specified with the -L option.

Displays help and usage screen, then exits.

-l log-level
Specify the priority up to which events are logged. This is either a number between 0
and 7 or one of the strings emerg, alert, crit, err, warning, notice, info, debug,
respectively (see also Log level definitions). -1 disables logging completely. A low
log level like 0 means that only the most critical messages are logged. A higher log
level means that less critical events are logged as well. 7 will include debug
messages. The latter can be verbose and abundant, so you want to avoid this log level
unless you need to track down problems.

-L log-file
Specify the full path to a log file that will receive the log messages. Typically this
would be /var/log/refdba.

Switch on additional MARC output. The output data will be the RIS output interspersed
with the source MARC data used to generate the output. This is useful to fix
conversion errors manually.

-o file
Send output to file. If file exists, its contents will be overwritten.

-O file
Send output to file. If file exists, the output will be appended.

-t input_type
Specify the MARC input type. The default is MARC21. Other available types are UNIMARC

-u t|f
Request Unicode output if set to "t" (this is the default). marc2ris attempts to
convert the input data into Unicode (unless the dataset explicitly states that it
already uses Unicode). If the conversion does not seem to work, set this to "f" as
some MARC variants do not state the character encoding explicitly.


marc2ris evaluates the file marc2risrc to initialize itself.

Table 1. marc2risrc
│outfile │ (none) │ The default output file │
│ │ │ name. │
│outappend │ t │ Determines whether │
│ │ │ output is appended (t) │
│ │ │ to an existing file or │
│ │ │ overwrites (f) an │
│ │ │ existing file. │
│unmapped │ t │ If set to t, unknown │
│ │ │ tags in the input data │
│ │ │ will be output following │
│ │ │ a <unmapped> tag; the │
│ │ │ resulting data can be │
│ │ │ inspected and then be │
│ │ │ sent through sed to │
│ │ │ strip off these │
│ │ │ additional lines. If set │
│ │ │ to f, unknown tags will │
│ │ │ be gracefully ignored. │
│logfile │ /var/log/med2ris.log │ The full path of a │
│ │ │ custom log file. This is │
│ │ │ used only if logdest is │
│ │ │ set appropriately. │
│logdest │ 1 │ The destination of the │
│ │ │ log information. 0 = │
│ │ │ print to stderr; 1 = use │
│ │ │ the syslog facility; 2 = │
│ │ │ use a custom logfile. │
│ │ │ The latter needs a │
│ │ │ proper setting of │
│ │ │ logfile. │
│loglevel │ 6 │ The log level up to │
│ │ │ which messages will be │
│ │ │ sent. A low setting (0) │
│ │ │ allows only the most │
│ │ │ important messages, a │
│ │ │ high setting (7) allows │
│ │ │ all messages including │
│ │ │ debug messages. -1 means │
│ │ │ nothing will be logged. │


The purpose of the MARC format is entirely different from the purpose of the RIS format,
so you shouldn't be too surprised that the import of MARC data is somewhat rough at the
edges. The filter apparently deals fine with quite a lot of datasets, but the following
shortcomings are known (and more are likely to be discovered by the interested reader):

· Some fields, like 846, are currently ignored completely. This, of course, is bound to

· Author names specified in the natural order, i.e. something like First Middle Last,
are not normalized due to the problems with multiple middle or last names. Author
names in the inverse order, i.e. something like Last, First Middle, are normalized
correctly in most cases. Handling of non-European names is a matter of trial and

· Character set handling is somewhat limited. Only the unaltered input character
encoding or UTF-8 are available for the output data.

That said, there is still some hope. The -m command line option switches on additional
MARC output. That is, the generated output will contain interspersed lines that show the
contents of the original MARC fields used to generate the following RIS line or lines. For
example, the following output snippet shows how marc2ris generated the author lines from
the MARC input:

<marc>empty author field (100)
<marc>:Author(Ind1): 1
<marc>:Author($a): Ershov, A. P.
<marc>:Author(Ind1): 1
<marc>:Author($a): Knuth, Donald Ervin,
AU - Ershov,A.P.
AU - Knuth,Donald Ervin

If you feel marc2ris does not translate your data appropriately, the easiest way might be
to use the -m switch and redirect the output into a file. Then you can analyze the
situation and fix the RIS lines as you see fit. Finally you can strip the MARC lines off
with a command like:

~$ grep -v "<marc>" < withmarc.ris > womarc.ris

Use marc2ris online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Fork of TeamWinRecoveryProject(TWRP)
    with many additional functions, redesign
    and more Features:Supports Treble and
    non-Treble ROMsUp-to-date Oreo kernel,
    Download OrangeFox
  • 2
    itop - ITSM  CMDB OpenSource
    itop - ITSM CMDB OpenSource
    IT Operations Portal: a complete open
    source, ITIL, web based service
    management tool including a fully
    customizable CMDB, a helpdesk system and
    a document man...
    Download itop - ITSM CMDB OpenSource
  • 3
    Clementine is a multi-platform music
    player and library organizer inspired by
    Amarok 1.4. It has a fast and
    easy-to-use interface, and allows you to
    search and ...
    Download Clementine
  • 4
    ATTENTION: Cumulative update 2.4.3 has
    been released!! The update works for any
    previous 2.x.x version. If upgrading
    from version v1.x.x, please download and
    Download XISMuS
  • 5
    Modular headtracking program that
    supports multiple face-trackers, filters
    and game-protocols. Among the trackers
    are the SM FaceAPI, AIC Inertial Head
    Tracker ...
    Download facetracknoir
  • 6
    PHP QR Code
    PHP QR Code
    PHP QR Code is open source (LGPL)
    library for generating QR Code,
    2-dimensional barcode. Based on
    libqrencode C library, provides API for
    creating QR Code barc...
    Download PHP QR Code
  • 7
    Cuckoo Sandbox
    Cuckoo Sandbox
    Cuckoo Sandbox uses components to
    monitor the behavior of malware in a
    Sandbox environment; isolated from the
    rest of the system. It offers automated
    analysis o...
    Download Cuckoo Sandbox
  • More »

Linux commands

  • 1
    rsbac-admin - Rule Set Based Access
    Control DESCRIPTION: rsbac-admin is a
    set of tool used to manage systems using
    a Rule Set Based Access Control (RSBAC)
    Run acl_gran
  • 2
    rsbac-admin - Rule Set Based Access
    Control DESCRIPTION: rsbac-admin is a
    set of tool used to manage systems using
    a Rule Set Based Access Control (RSBAC)
    Run acl_grant
  • 3
    cpupower idle-set - Utility to set cpu
    idle state specific kernel options
    SYNTAX: cpupower [ -c cpulist ]
    idle-info [options] DESCRIPTION: The
    cpupower idle-se...
    Run cpupower-idle-set
  • 4
    cpupower-info - Shows processor power
    related kernel or hardware
    configurations ...
    Run cpupower-info
  • 5
    g15daemon - provides access to extra
    keys and the LCD available on the
    logitech G15 keyboard. DESCRIPTION:
    G15Daemon allows users access to all
    extra keys by d...
    Run g15daemon
  • 6
    laditools - tools to control and
    monitor LADI (JACK and ladish) systems ...
    Run g15ladi
  • More »