Documentation ¶
Overview ¶
Package libraryofcongress provides tools and methods for working with Library of Congress data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
type Catalog is a struct used deduplicate IDs seen in the various LoC authority files. It is necessary specifically for the LCNAF file which is so big that tracking IDs in memory trigger "out of memory" errors so instead we track "attendance" on disk using a temporary SQLite database.
func NewCatalog ¶
NewCatalog() returns a new `Catalog` instance configured by 'uri' which is expected to take the form of:
tmp://
func (*Catalog) Exists ¶
Exists() returns a boolean value indicating whether or not 'id' exists in the temporary SQLite database.
func (*Catalog) ExistsOrStore ¶
ExistsOrStore() adds 'id' to the underlying SQLite database if it does not already exist.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
parse-lcnaf
parse-lcnaf is a command-line tool to parse the Library of Congress `lcnaf.both.ndjson` (or `lcnaf.both.ndjson.zip`) file and output CSV-encoded subject heading ID and (English) label data.
|
parse-lcnaf is a command-line tool to parse the Library of Congress `lcnaf.both.ndjson` (or `lcnaf.both.ndjson.zip`) file and output CSV-encoded subject heading ID and (English) label data. |
parse-lcsh
parse-lcsh is a command-line tool to parse the Library of Congress `lcsh.both.ndjson` file and out CSV-encoded subject heading ID and (English) label data.
|
parse-lcsh is a command-line tool to parse the Library of Congress `lcsh.both.ndjson` file and out CSV-encoded subject heading ID and (English) label data. |
Package walk provides interfaces and methods for walking Library of Congress (LoC) data files.
|
Package walk provides interfaces and methods for walking Library of Congress (LoC) data files. |