d2m v0.2

# d2m : A Dublin Core to MARC converter

version 0.2
1998-10-14
Ole Husby
BIBSYS
ole.husby@bibsys.no

## 1. Introduction

This software is part of the results from the Nordic Metadata project. (See http://linnea.helsinki.fi/meta/).

This version is a "pre-release". It is not really ready for distribution. All the customary disclaimers apply! The programs have been compiled on Solaris, AIX and Linux.

## 2. Contents

The distribution includes the following files:

README.html | This file
Makefile | Also includes some documentation
d2m.h | Common include file
D2Mcgi.c | Main program for the CGI version
D2Mmain.c | Main program for the standalone version
D2Mconv.c | Inputs file with DC metadata, outputs line MARC record
M2Mconv.c | Inputs file with ISO 2709 MARC record, outputs line MARC record
MARC2709.c | Converts from line MARC format to ISO 2709 MARC format
MARCmake.c | Builds a MARC struct from a DC struct. Selects one of the following :
danMARC.c |
finMARC.c |
isMARC.c |
norMARC.c |
sweMARC.c |
usMARC.c |
MARCtidy.c | Finishes the line MARC record from the MARC struct
marc2line.c | Converts from ISO 2709 MARC format to line MARC format
htget.c | Fetches a remote file using HTTP
dc_parse.c | Parses an HTML tag
util.c | Some utilities
wfetch.c | Small program on top of htget()
wfetch-l.c | Dummy version of wfetch.c, does nothing except return 0
test.data | A simple test file with a tag.

## 3. Compilation

Unpack the d2m-v02.tar file. It will produce a directory d2m-v02/ with the contents listed above.

Check the Makefile.

Type

      make all

This should produce the programs d2m and d2main .

If you do not need access to remote files, or have problems compiling socket libraries, try to compile

      make d2main-nosock

## 4. Use of d2main

d2main should be ready to execute from the command line. No configuration or environment variables are needed.

If you do not enter any arguments, a short instruction will be printed.

The first test could be

      d2main test.data -l

The next test could be (if d2main is not compiled using Makefile-l)

      d2main http://linnea.helsinki.fi/meta/ -l -m FINMARC

## 5. Use of d2m

d2m should be used as a CGI program.

A simple users guide is in D2Mcgi.c

See an example of use in http://www.bibsys.no/meta/d2m

## 6. Tailoring

This version is not table-driven. The different MARC formats are treated by customized functions (norMARC.c, isMARC.c etc.). The selection of conversion program is performed by MARKmake.c .

The program MARCtidy.c is also to some degree depending of the MARC format. In addition there is a small sequence in D2Mconv.c with a special treatment for ISMARC. (It should really not be done there ...). Apart from this, all programs are independent on MARC format.

The supported formats are introduced in d2m.h .