![]() |
#1 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,973
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Template: ISBN10 to ISBN13
With the upcoming migration to Qt6, I was looking into whether I could use Action Chains single-field edit to replace the ISBN conversion feature in the (possibly now unmaintained
![]() According to this, here's the steps I would need to take: 1. Take the ISBN-10. (Also remove any dashes/spaces from that.) 2. Drop the last digit. 3. Add "978" to the beginning. 4. Calculate the check digit. Steps 1-3 seem to be easy enough (I'm working on pulling it together in the template tester) but calculating the check digit seems to be the sticky part and I'm not entirely sure how to do it. From the link above: Quote:
![]() Last edited by ownedbycats; 01-04-2022 at 03:31 PM. |
|
![]() |
![]() |
![]() |
#2 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,973
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Interesting - Library Code's implementation of the ISBN conversion (lines 1528 - 1599 of ui.py) uses something that looks very similar to the Python code I linked to. Not sure if this means anything though.
|
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Template: Converting a search & replace into a template | ownedbycats | Library Management | 11 | 03-26-2021 04:32 AM |
Keeping ISBN10 when downloading metadata | ownedbycats | Library Management | 8 | 11-06-2018 02:02 PM |
Using built-in template functions in a custom template function | ilovejedd | Library Management | 4 | 01-28-2018 12:20 PM |
ISBN13 support | LGN | Calibre | 4 | 11-09-2010 04:45 PM |