View Single Post
Old 11-03-2015, 10:33 AM   #1
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
[GUI Plugin] Library Codes

Moderator Notice
Please see also Updated Plugin for new API


[GUI Plugin] Library Codes


Functions and Features:

[1] Automatically creates new Custom Columns (if desired) for Dewey Decimal Code and/or Library of Congress Code and/or OCLC-OWI and/or FAST Tags.

[2] Derives the desired Library Codes using a book's ISBN or ISSN [Selected Books].

[3] Optionally creates Identifiers: OCLC-OWI; OCLC-WORLDCAT; and VIAF_AUTHOR_ID. This allows the use of composite Custom Columns to be shown in the Book Details as a hot-link to the respective URLs.

[4] Optionally Converts ISBN-10 to ISBN-13 [Selected Books]. This function will also automatically "sanitize" ISBNs to remove any dashes, etc. even if the ISBN is already an ISBN-13.

[5] Optionally extracts ISSNs from PDFs for Magazines and Periodicals. The other LC functionality then may be executed for the PDFs for which ISSNs were extracted. View the LC Menu ToolTips for more information.

[6] Optionally maps either a LCC or a DDC for each book to a 'Genre', and updates a Text custom column with that mapping. LC comes preloaded for DDC mappings, but a template .csv file for LCC mappings is attached below.

Please read the ToolTips in the LC customization settings.

For a full Open Source DDC listing for your own use: https://raw.githubusercontent.com/Jo...master/fdc.txt

Code décimal de Dewey en français: https://www.mobileread.com/forums/sh...4&postcount=94




Versión en español/Spanish Language version: https://www.mobileread.com/forums/sh...7&postcount=24





Requires Minimum Calibre Version: 6.0.0


Version History:
Spoiler:

Version 1.0.65 - 2023-04-16 Bug fix. Change in multiple-response re-do trigger.
Version 1.0.64 - 2023-04-15 Automatically get oclc-wi if needed to obviate need to get oclc-wi via Author/Title to re-run to download DDC et al. This automatically turns on saving all LC Identifiers, regardless of customization.
Version 1.0.63 - 2023-04-14 FAST Tags: comma replaced with semicolon.
Version 1.0.62 - 2023-04-13 Miscellany
Version 1.0.61 - 2023-04-12 Add back self.detect_isbn_changes_to_refresh.
Version 1.0.60 - 2023-04-06 LCEAD preferences and widgits removed from within Customization.
Version 1.0.59 - 2023-04-06 Miscellaneous technical improvements. Also, the LCCN Identifier values are automatically converted so that they may be used as-is with the URL to the Library of Congress Permalinks to the book's author. The format for one possible Permalink is: https://lccn.loc.gov/n80126289 where the n80126289 is the LCCN value from Library Codes. A better link to it is: https://id.loc.gov/authorities/names/n80126289.html You may set either of these links in Calibre > Preferences > Look & Feel > Book Details.
Version 1.0.58 - 2023-04-05 Enhancements to increase speed of execution of LC, plus other technical improvements.
Version 1.0.57 - 2023-04-05 Enhancement to add a new menu item to use a book's Author & Title to download its OCLC-WI Identifier, which in turn can be used in lieu of a missing ISBN/ISSN to download the same metadata (DDC, LCC, FAST Tags, etc.) that ISBN/ISSN would make available if they were not missing. Enhancements to download more metadata. Changes to ToolTips. Changes to Customization.
Version 1.0.56 - 2023-04-01 Streamlined the new "no APIs", webscraping-based version of LC, to remove deprecated functions requiring the old Worldcat API. New: added the creation of 3 Identifiers: OCLC-OWI; OCLC-WORLDCAT; VIAF_AUTHOR_ID. LC Customization revised to be consistent with both of the previous.
Version 1.0.55 - 2023-03-31 No API: Life-Support Replacement for API that requires a Key since December 2022.
Version 1.0.54 - 2023-01-18 Qt.core.
Version 1.0.53 - 2022-07-14 Enhancements to the "eBook"/"Book" criteria for multi-work responses.
Version 1.0.52 - 2022-04-19 If a return code of '4' is received, and its attributes include 'wi' (not 'owi'), create a new RC of '2' using the syntax http://classify.oclc.org/classify2/Classify?wi=nnnnnnn
Version 1.0.50 - 2020-12-22 Miscellaneous Technical changes.
Version 1.0.49 - 2020-12-15 Miscellaneous technical improvements. Minimum Calibre Version 5.7.
Version 1.0.48 - 2020-11-24 Favourites plugin accommodation.
Version 1.0.47 - 2020-08-11 Qt tweaks for small displays.
Version 1.0.46 - 2020-07-22 New menu option to remove redundant LCEAD Tags that already exist as FAST Tags for the same selected books.
Version 1.0.45 - 2020-07-17 Major webscraping rewrites due to Worldcat site changes. Configuration Dialog greatly enhanced for both validation of user settings and ToolTips.
Minimum Calibre Version remains 4.6. BeautifulSoup 3 support removed. Tested in Calibre 5 Beta 4.99.7 and required no changes.
Version 1.0.44 - 2020-07-12 Miscellaneous technical changes to customization and ToolTips.
Version 1.0.43 - 2020-07-02 Additional DEBUG statements added; Technical change to customization.
Version 1.0.42 - 2019-12-30 Technical changes after Python 3.8 testing with Calibre 4.99.2
Version 1.0.41 - 2019-04-30 Python 3 compatibility
Version 1.0.40 - 2019-04-27 Python 3 compatibility & Calibre Version 3.41.3 pdf-to-html compatibility (ISSN extraction from PDFs).
Version 1.0.39 - 2019-04-13 Removed LC's personal BeautifulSoup3. Use standard Calibre's current BeautifulSoup, and choose BS3 .findAll or BS4 .find_all dynamically based on its attributes. Both backwards and forwards compatible with Calibre.
Version 1.0.38 - 2018-10-15 Version 1.037 functionality has been removed in favor of using the Job Spy plugin's Scrub Tags tool.
Version 1.0.36 - 2018-10-12 FAST Tags: more work.
Version 1.0.35 - 2018-10-11 FAST Tags added to LC Customization. FAST retrieved as Tag-Like. Minimum Calibre now is Version 3.30.
Version 1.0.34 - 2018-05-17 Function "Find Alternatives to a Non-Responsive ISBN" has been redesigned due to current Google Search Books API restrictions.
Version 1.0.33 - 2018-05-16 Function "Extraction of ISSN from PDF periodicals" changed to reflect Calibre changes to its pdf-to-html function as of Version 3.20.
Version 1.0.32 - 2018-05-15 Technical and functional enhancements to ISBN scrubbing.
Version 1.0.31 - 2018-05-13 Enhanced scrubbing of ISBNs.
Version 1.0.30 - 2017-05-21 Technical changes.
Version 1.0.29 - 2017-05-11 Technical changes for Calibre 3.0.0 compatibility.
Version 1.0.28 - 2017-05-05 Allow themes with user-defined icons.
Version 1.0.27 - 2016-06-24 Compatibility improvement for use with Linux and OSX; now does not delete any Identifier that begins with a 'z', and also not 'doi' that is used in ZMI.
Version 1.0.26 - 2016-05-26 Bug fix.
Version 1.0.25 - 2016-05-25 Technical changes.
Version 1.0.24 - 2016-04-02 DDC Pie Charts
Version 1.0.23 - 2016-03-26 Attempt to solve OSX subprocess issue.
Version 1.0.22 - 2016-03-23 Technical changes.
Version 1.0.21 - 2016-03-22 Enhanced LCC to Genre mapping logic, plus added a corresponding template CSV file.
Version 1.0.20 - 2016-03-21 New: Updating of #genre (or any other text custom column) by mapping the DDC or LCC to Table _lc_genre_mapping, which is automatically seeded with over 2,470 DDC rows.
Version 1.0.19 - 2016-02-14 Miscellaneous enhancements.
Version 1.0.18 - 2016-02-13 Technical changes to improve performance in extracting ISSNs from PDFs.
Version 1.0.17 - 2016-02-13 New: ISSN Extraction from Magazine/Periodical PDFs for use in deriving DDC, LOC, etc.
Version 1.0.16 - 2016-01-30 Technical changes to improve performance in webscraping.
Version 1.0.15 - 2015-12-04 New Menu Option: Attempt to Substitute Non-Responsive ISBN Using Author/Title [Selected Single Book]; Technical tweaks.
Version 1.0.14 - 2015-12-02 Many enhancements, especially to using 'OCLC-OWI" to retrieve 'OCLC' which in turn is used to retrieve 'LOC_LCCN'. Menu and ToolTips changes. BISAC-type LCEAD column data for Fiction is now retrieved (Non-Fiction already was).
Version 1.0.13 - 2015-11-30 New Identifier: 'LOC_LCCN', which is the 'Library of Congress-LCCN'. For books assigned LOC LCCNs after the year 1999, they (probably) have a permalink of: http://lccn.loc.gov/NNNNNNNNNN where the LCCN is a 10-digit number starting with the year (2NNN)
Version 1.0.12 - 2015-11-25 Technical tweak.
Version 1.0.11 - 2015-11-25 Additional LCEAD using OCLC. Most useful for Factual/Non-Fiction. Since the LCEAD column is Tag-Like, any 'commas' have been replaced with the very 'comma-like' Unicode symbol 'ˏ' that does not confuse Calibre.
Version 1.0.10- 2015-11-24 New Identifier: OCLC (Not the same as OCLC-OWI). OCLC is extremely useful in retrieving LCEAD data.
Version 1.0.9 - 2015-11-23 New Optional Custom Column: LC Extra Author Details (LCEAD), which is a Tag-Like column that is updated with additional author-related information. It is automatically updated when deriving DDC/LCC, but can be separately updated via its own menu option that uses OCLC-OWI to obtain the LCEAD values.
Version 1.0.8 - 2015-11-21 Deriving ISNI and LCCN Identifiers from VIAF Author ID: speed of download improved significantly.
Version 1.0.7 - 2015-11-20 New option to delete all non-Library Codes Identifiers.
Version 1.0.6 - 2015-11-20 2 New Identifiers: ISNI and LCCN (derived via VIAF Author ID) to enable hot-linking to ISNI.org and Worldcat.org, respectively. This is done whenever a OCLC-OWI Identifier is otherwise created.
Version 1.0.5 - 2015-11-19 Creation of 2 Identifiers, VIAF.org Author ID and Library of Congress Author Name ID, whenever OCLC-OWI Identifier is otherwise created. This allows the use of composite custom columns to hot-link to the respective URLs to view extended Author and Book information.
Version 1.0.4 - 2015-11-17 New option to convert ISBN-10 to ISBN13 for selected books.
Version 1.0.3 - 2015-11-16 New option to derive DDC and/or LCC indirectly using Author/Title via OCLC-OWI Identifiers for cases where ISBN is not useful or reliable.
Version 1.0.2 - 2015-11-13 Menu changes.
Version 1.0.1 - 2015-11-12 Technical tweaks.
Version 1.0.0 - 2015-11-03 Initial release.

Attached Thumbnails
Click image for larger version

Name:	lc_20230402.jpg
Views:	1051
Size:	1.16 MB
ID:	200747  
Attached Files
File Type: txt _lc_genre_mapping_csv.txt (180.5 KB, 2577 views)
File Type: txt _lc_lcc_genre_mapping_csv.txt (7.3 KB, 2393 views)
File Type: zip library_codes.zip (314.3 KB, 40681 views)

Last edited by pdurrant; 07-12-2024 at 11:02 AM. Reason: Version 1.0.65
DaltonST is offline   Reply With Quote