|
|
#31 | ||||
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
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: 8
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: 8
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).
|
|
|
|
|
|
#34 |
|
Connoisseur
![]() Posts: 66
Karma: 10
Join Date: Nov 2014
Device: kobo elipsa 2e
|
@frustratedhacker
My primary use of the forum is for tools like this and I'm entirely ignorant of coding, making it difficult to even ask an appropriate question. So I do not often post here. Just wanted to say thank you for taking this project up. It saves me an extraordinary amount of time and energy. Appreciated. |
|
|
|
|
|
#35 | |
|
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Oct 2019
Device: KT3
|
Quote:
Also, for anyone trying this, if you aren't getting results or if you are but suspect they aren't good, you can enable Calibre's debug mode to get detailed log messages and see what the plugin is doing. |
|
|
|
|
|
|
#36 | |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45
Karma: 3034
Join Date: Mar 2012
Device: Boox Note Air 2 Plus, Samsung Galaxy S23 (base), Samsung Galaxy Tab S3
|
Quote:
)?I'm wanting my #lc_genre field to use LCC Genres, but it sounds like that is not automatically included (and does not seem to be working for me in my initial tests with an item that does have an LCC). All that aside, I am SO grateful you have created this plugin!! I am working toward using Calibre for my physical library (I already use it for my digital one), so I'd like to use LCC in particular with my physical books. |
|
|
|
|
|
|
#37 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 130472
Join Date: May 2011
Device: BooxM90,M92*3,M96,N96, I86ml,C67ml,Kepler, Poke2,Nova3,MaxLumi2,TabUPC
|
This fork of Library Codes was created because OCLC took down their open-source web portal for sharing individual records - Classify- in the summer of 2023.
This was bewildering at the time, but now I know why. Baker and Taylor, a book wholesaler and distributor that provides library acquisition and collections management, engaged in a four year project to steal OCLC WorldCat data to create its own cataloguing service - BTCat. Here's the complaint from OCLC that was filed in the spring. We were caught in the crossfire of that litigation. |
|
|
|
|
|
#38 | ||
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45
Karma: 3034
Join Date: Mar 2012
Device: Boox Note Air 2 Plus, Samsung Galaxy S23 (base), Samsung Galaxy Tab S3
|
Quote:
Quote:
|
||
|
|
|
|
|
#39 |
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jun 2026
Device: none
|
Hi
Why doesn't this plugin work. Every time I try to use it, it gives this error: "Nothing Found For Any Selected Book. Visit: Http://classify.oclc.org/classify2/" Thanks in advance for reply. |
|
|
|
|
|
#40 |
|
Member
![]() Posts: 24
Karma: 10
Join Date: Mar 2022
Device: iPad 8
|
Update to LC-SRU plugin
The plugin did not work for me with ISBN's, so I made some changes in the oclc_classify_webscraping_stdnbr(paramtype, paramvalue) function that use a corrected API call. The changes also support addition diagnostics and handling on multi-line responses. Currently, it will take the longest DDC and LCC, assuming them to be the most detailed. The code is structured to easily support a different algo for selection.
I'm not looking to step on any toes here, but I haven't seen davidjoseph1 here in awhile (totally understandable - life intervenes). Also tried to send this via PM. So what I'm doing is attaching the new zip file here, with numbering of 2.04.1 (the current official version is 2.04). In the future, if desired, the single file mentioned above can be swapped into the master version. To install: - Preferences->Advanced->Plugins->Load Plugin from File - The new plugin will install new or will overwrite your existing plugin. - This plugin can always be overwritten by installing the latest LC-SRU version. |
|
|
|
![]() |
|
Similar Threads
|
||||
| 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 |