Skip to content

Commit e7c202d

Browse files
Fresotfmorris
andauthored
Add Library of Congress NAF as Author identifier (#9812)
* Add Library of Congress NAF as Author identifier Adds Library of Congress Name Authority File (LC NAF) as an Author identifier. The `label` has been shortened to just “Library of Congress” to avoid having an obscenely long label in the drop-down lists and also avoid obscure acronyms (“NAF”) in it that are likely to cause more confusion than clarity. The URI identifiers given by LoC themselves start with “http://” but I have opted to use “https://” for the `url` so patrons etc. won’t need a redirect or similar to get to the page. Closes #9791 * Add auto select for LOC NAF Author identifiers Adds an entry for `loc_naf` (Library of Congress Name Authority File) identifiers to the `identifierPatterns` lookup table to enable autoselection when entering the identifiers. * Update LoC NAF identifier label+name Per #9812 (comment) Co-authored-by: Tom Morris <[email protected]> * Update lc_naf author autoselection regex Per #9812 (comment) Co-authored-by: Tom Morris <[email protected]> --------- Co-authored-by: Tom Morris <[email protected]>
1 parent 8780881 commit e7c202d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

openlibrary/components/AuthorIdentifiers.vue

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
const identifierPatterns = {
3333
wikidata: /^Q[1-9]\d*$/i,
3434
isni: /^[0]{4} ?[0-9]{4} ?[0-9]{4} ?[0-9]{3}[0-9X]$/i,
35+
lc_naf: /^n[bors]?[0-9]+$/,
3536
amazon: /^B[0-9A-Za-z]{9}$/,
3637
youtube: /^@[A-Za-z0-9_\-.]{3,30}/,
3738
}

openlibrary/plugins/openlibrary/config/author/identifiers.yml

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ identifiers:
2222
notes: two formats depending on if the author exists in wikidata, wd:Q42 or inv:914ad8068b8711ead0cc2efbed56e53c
2323
url: https://inventaire.io/entity/@@@
2424
website: https://inventaire.io/
25+
- label: Library of Congress Names
26+
name: lc_naf
27+
notes: Should be something like nr92001540, no97027235, etc. (/^n[a-z]?[0-9]+$/)
28+
url: https://id.loc.gov/authorities/names/@@@
29+
website: https://id.loc.gov/authorities/names.html
2530
- label: LibraryThing
2631
name: librarything
2732
notes: Should be something like kingstephen-1

0 commit comments

Comments
 (0)