Commit graph

12 commits

Author SHA1 Message Date
Hugh Rundle
c3ba7ba547 pylint Y U like this? 2021-11-01 20:04:25 +11:00
Hugh Rundle
6556090524 Update existing authors when isni data available
When an existing author is selected as a new author when editing a book,
if they have an ISNI ID recorded we check the record and augment the local
database record from the ISNI data.

Also dedupes author aliases for this feature and when adding a completely
new author.
2021-11-01 19:50:49 +11:00
Hugh Rundle
1533b55a32 lint code 2021-11-01 11:58:08 +11:00
Hugh Rundle
630f508ee4 code cleanup 2021-11-01 11:39:37 +11:00
Hugh Rundle
552980e208 select correct isni record when adding authors
The original implementation of this was so, so broken.
Now it's not.
2021-11-01 11:34:32 +11:00
Hugh Rundle
30a959dfce make pylint happy 2021-11-01 10:20:19 +11:00
Hugh Rundle
3cfd31f1fe hide isni authors if isni in local db
Check the authors suggested from the local DB for a matching ISNI when pulling authors from ISNI.
i.e. we do not want to suggest the same author twice when we *know* it is the same author.
2021-10-31 20:48:47 +11:00
Hugh Rundle
bce5f3f3b5 populate new authors with isni data
If a user selects an author pulled from the ISNI service when editing a book, use any relevant data from ISNI to populate the new author record.

This includes
- bio
- aliases
- isni
- wikipedia url
- viaf
2021-10-31 17:58:15 +11:00
Hugh Rundle
45158a1c03 improve isni search logic
- skip ISNIs that aren't persons
- don't look for text values in non-existent nameTitle elements
2021-10-30 09:24:42 +11:00
Hugh Rundle
87ed6f8380 code formatting 2021-10-29 21:14:32 +11:00
Hugh Rundle
d87e1b1567 fix encoding
The OCLC server claims that the xml payload is encoded as latin1 (ISO-8859-1).
This causes Requests to incorrectly encode things as latin1, when actually everything is (thank goodness) UTF-8.
We can fix it by just telling Requests that it is really UTF-8

With thanks to Tex Texin, creator of http://i18nqa.com/debug/utf8-debug.html
2021-10-29 21:00:35 +11:00
Hugh Rundle
625cfac76f isni author lookup utility 2021-10-29 16:12:31 +11:00