Documentation
¶
Overview ¶
Package mrk reads and writes MARC 21 records in the MARCMaker / MARCBreaker mnemonic line format (".mrk"), implementing codex.RecordReader and codex.RecordWriter using only the standard library.
Each field is one line beginning with "=": "=LDR " carries the leader, and "=TAG " carries a field, where TAG is the 3-character tag followed by two spaces. A control field (tag below "010") is the raw value; a data field is two indicator characters — a blank indicator written as a backslash ("\") — followed by subfields, each introduced by "$" and a one-character code. Records are separated by a blank line:
=LDR 00000nam a2200000 4500 =001 ocm12345 =245 10$aStone butch blues :$ba novel /$cLeslie Feinberg. =650 \0$aLesbians
The literal characters "$", "{", "}" and "&" are written as the mnemonics {dollar}, {lcub}, {rcub} and {amp}; decoding also accepts numeric character references (&#xHHHH; and &#DDDD;). Values are otherwise UTF-8; the wider MARC-8 mnemonic repertoire is out of scope.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader reads MARC records from a .mrk stream one record at a time.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer writes records to a .mrk stream, separating them with a blank line.