Skip to content

Configuration

Aidan Sawyer edited this page Apr 29, 2016 · 4 revisions

Introduction

This program is meant to be highly configurable, since it's intended to be used with a variety of collections in different scenarios. The two main ways of customizing the program's operation to any given collection (without altering the code itself) is to edit the config.txt and shared.csv files.

Config.txt

Edit the contents of config.txt to determine how the program should read the first N lines of each of your input files.

Every line of the file should contain exactly one term from 'options.txt' per line. Blank lines, or lines with more that one term will not be read correctly.

In the example below, the contents of the config.txt file are used to determine that the first 5 lines of each input file will be contain information about:

  • the title of the item,
  • its placement within the series,
  • when it was first issued,
  • an alternative title for the item, and
  • the filename to which all the metadata from the file refer.

Example Config.txt

TITLE
SERIES
DATE_ISSUED
TITLE_ALT
FILENAME

If we wanted to reorganize our input files for greater readability - to make the alternative title come directly after the title, for example - we would just have to reorder this list of words to the following:

TITLE
TITLE_ALT
SERIES
DATE_ISSUED
FILENAME

Shared.csv

Quite often (and especially with magazines), items within a given collection, will share the same value for given pieces of metadata (e.g. they'll have the same publisher, language, type, etc).

The shared.csv file is meant as an easy way to help with this. Using the same list of terms from options.txt file as above, enter in csv form the term shared by each item, followed by the value of that term respectively on a unique line.

Example Shared.csv

TITLE,Title of the Item
PUBLISHER,The Publisher's Name and perhaps address
TYPE,Magazine
DESCRIPTION,A basic description that applies to each item in the collection, and is added to each.

In the example below, every item in the collection will be catalouged with the following elements:

  • dc.title: "Title of the Item"
  • dc.publisher: "The Publisher's Name and perhaps address"
  • dc.type: "Magazine"
  • dc.description: "A basic description that applies to each item in the collection, and is added to each."

Options.txt

The content of both of the above files is dependent upon options.txt which contains an alphabetical listing of all the strings that the system will understand and parse. This file should not be edited, unless you edit the code itself to enable the system to process this input.

Option.txt Metadata Matching

Option DublinCore Metadata field
DATE_ISSUED dc.date.issued
DESCRIPTION dc.description
FILENAME [internal filename for upload]
FORMAT dc.format
IDENTIFIER dc.identifier
LANGUAGE dc.language.iso
LICENSE [internal (?)]
NOTE dc.description.note
PUBLISHER dc.publisher
SERIES dc.description.tableofcontents
SUBJECT dc.subject
TITLE dc.title
TITLE_ALT dc.title.alternative
TYPE dc.type