Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-10-2025, 02:26 PM   #1
Stumpy
Junior Member
Stumpy began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2025
Device: none
Trying to extract ISBN from title using action chain

Hi

I installed calibre yesterday and i try to import my books into it right now.
As my books are in german, they wont get recognized that good.
Several of my books are in pdf and the isbn is at the beginning of the title.
Because of that, i installed the plugin "action chains" and made a action to extract the isbn from the title, which works fine, as long as i only have one book selected.
if i have multiple books selected, every book gets the same ISBN.
How can i run the action chain for each of the selected books or is there and easier way?

Action Chain
Single Filed Edit
Column = identifiers

Template
Code:
program:
    title = from_selection('title');
    isbn = shorten(title,13,"",0);
    test = ("isbn: " & isbn)
Greetings Stumpy
Stumpy is offline   Reply With Quote
Old 05-10-2025, 02:42 PM   #2
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 875
Karma: 409970
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
I haven't tried the Extract ISBN plugin.
dunhill is offline   Reply With Quote
Old 05-10-2025, 02:58 PM   #3
Stumpy
Junior Member
Stumpy began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2025
Device: none
Quote:
Originally Posted by dunhill View Post
I haven't tried the Extract ISBN plugin.
hey

i tried the Extract ISBN Plugin too.
It cant find the ISBN.
As i understand the plugin, it only looks on the pages itself.
The ISBN would be on page 2 on the lower end and the plugin dosnt find it.
Maybe because its a pdf?
Stumpy is offline   Reply With Quote
Old 05-10-2025, 04:53 PM   #4
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,605
Karma: 7511185
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by Stumpy View Post
hey

i tried the Extract ISBN Plugin too.
It cant find the ISBN.
As i understand the plugin, it only looks on the pages itself.
The ISBN would be on page 2 on the lower end and the plugin dosnt find it.
Maybe because its a pdf?
Extract ISBN plugin should work if PDF is OCR'd.

To extract from titles, you could use a Python template instead, I've attached an example that worked fine for me.

Your GPM template is missing a $ in second line: isbn = shorten($title,13,"",0);
Attached Files
File Type: zip isbn extract from title.zip (51.9 KB, 32 views)
Comfy.n is offline   Reply With Quote
Old 05-10-2025, 07:21 PM   #5
Stumpy
Junior Member
Stumpy began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2025
Device: none
Quote:
Originally Posted by Comfy.n View Post
Extract ISBN plugin should work if PDF is OCR'd.

To extract from titles, you could use a Python template instead, I've attached an example that worked fine for me.

Your GPM template is missing a $ in second line: isbn = shorten($title,13,"",0);
ty alot.
adding the $ fixed the problem and i am finally able to select all files and get the isbn from the title.
Stumpy is offline   Reply With Quote
Old 05-10-2025, 11:02 PM   #6
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,605
Karma: 7511185
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by Stumpy View Post
ty alot.
adding the $ fixed the problem and i am finally able to select all files and get the isbn from the title.
Beware that, according to my tests, the GPM template would set the ISBN identifier but would replace any other preexistent identifiers.

(I forgot to tell you how to import the chain: you want to right-click Action Chains main dialog then choose import and load the zip file)
Comfy.n is offline   Reply With Quote
Old 05-11-2025, 08:21 AM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,398
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Stumpy View Post
Hi

I installed calibre yesterday and i try to import my books into it right now.
As my books are in german, they wont get recognized that good.
Several of my books are in pdf and the isbn is at the beginning of the title.
Because of that, i installed the plugin "action chains" and made a action to extract the isbn from the title, which works fine, as long as i only have one book selected.
if i have multiple books selected, every book gets the same ISBN.
How can i run the action chain for each of the selected books or is there and easier way?

Action Chain
Single Filed Edit
Column = identifiers

Template
Code:
program:
    title = from_selection('title');
    isbn = shorten(title,13,"",0);
    test = ("isbn: " & isbn)
Greetings Stumpy
Does this get the correct ISBN if the ePub has multiple ISBN numbers in the copyright page?
JSWolf is offline   Reply With Quote
Old 05-11-2025, 12:42 PM   #8
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 45,306
Karma: 168808723
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
Does this get the correct ISBN if the ePub has multiple ISBN numbers in the copyright page?
It would appear that action chain extracts the ISBN from the title and not from the body.
DNSB is offline   Reply With Quote
Old 05-12-2025, 04:11 PM   #9
Stumpy
Junior Member
Stumpy began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2025
Device: none
Quote:
Originally Posted by JSWolf View Post
Does this get the correct ISBN if the ePub has multiple ISBN numbers in the copyright page?
as DNSB already said, it only extracts the isbn if it is in the title.

@Comfy.n ty for claryfing. i didnt have any identifier yet so it was no problem that it would delete them.
now as i know how to add your chain, i will test it as soon as the current import / metadata import is complete.
Stumpy is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Extract ISBN kiwidude Plugins 548 03-04-2025 10:43 PM
Any way to automatically Extract ISBN on add ajdthomson Library Management 2 08-12-2021 02:36 PM
Extract ISBN from PDF? mdroberts Calibre 14 12-16-2016 07:32 AM
[Old Thread] Extract ISBN from file name ChristianQ Calibre 59 12-09-2015 05:08 AM


All times are GMT -4. The time now is 03:16 AM.


MobileRead.com is a privately owned, operated and funded community.