![]() |
#31 | ||||
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 56
Karma: 130472
Join Date: May 2011
Device: BooxM90,M92*3,M96,N96, I86ml,C67ml,Kepler, Poke2,Nova3,MaxLumi2,TabUPC
|
Quote:
I would love to see your code. I haven't been able to wrap my head around ETREE and make that extraction work, and there are a bunch of different LC codes that contain alternate LCSH and Subject headings. Quote:
Quote:
Quote:
I would like to see the code for LCSH extraction! |
||||
![]() |
![]() |
![]() |
#32 | |||
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Oct 2019
Device: KT3
|
Quote:
Quote:
Quote:
For the VIAF, I discovered the viapy python library (https://github.com/Princeton-CDH/viapy), but you I saw in the code you can get a json response by changing the header in the request (https://github.com/Princeton-CDH/via...apy/api.py#L45). You can try this in the REPL: Code:
import requests def get_viaf_id_auto(name): resp = requests.get( "http://viaf.org/viaf/AutoSuggest", params={"query": name}, headers={"accept": "application/json"} ) data = resp.json() res = data.get("result", []) if not res: return None first_result = res[0] first_result_viafid = res[0]["viafid"] return first_result, first_result_viafid first_result, first_result_viafid = get_viaf_id_auto("Jane Austen") print("First result:", first_result, "\n") print("First result's VIAF id:", first_result_viafid) |
|||
![]() |
![]() |
![]() |
#33 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Oct 2019
Device: KT3
|
Here it is. I'll say no more but add some notes I've been writing while doing this. The second and third points are important for its functioning, since I added an external library (sorry).
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Metadata Source Plugin] SRU - Library of Congress & GBV (ger) | vform | Plugins | 14 | 08-01-2024 05:50 PM |
[GUI Plugin] Library Codes | DaltonST | Plugins | 373 | 07-12-2024 11:04 AM |
[GUI Plugin] Library Splitter | DaltonST | Plugins | 31 | 07-11-2022 03:09 AM |
How about using LC (Library Codes) plugin, w/ FAST/LCC/DDC derived tags? | anoukaimee | Library Management | 0 | 02-09-2022 05:25 AM |
[GUI Plugin]Problems retrieving LCC, Dewey etc codes | birkmaggs | Plugins | 2 | 05-11-2018 10:43 PM |