Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 12-14-2020, 02:51 PM   #1
Robert78
Member
Robert78 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2017
Device: none
Delete a specific image and external links- Modify ??

I have a lot of epubs with a crap file '*.png" and external links often dead that I'd like to remove (twitter,...) on a large selection.
Is there a way to clean these epubs by entering filename criteria and selecting clean external links.

I know how to do it manually for the image, book after book.
1) edit book
2) report -> list of images
3) delete of the image
4) calibre repair function for dead reference
Robert78 is offline  
Old 12-14-2020, 03:20 PM   #2
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by Robert78 View Post
I have a lot of epubs with a crap file '*.png" and external links often dead that I'd like to remove (twitter,...) on a large selection.
Is there a way to clean these epubs by entering filename criteria and selecting clean external links.
Not with this plugin.
Rev. Bob is offline  
Advert
Old 12-14-2020, 03:57 PM   #3
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: 73,887
Karma: 128597114
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 Robert78 View Post
I have a lot of epubs with a crap file '*.png" and external links often dead that I'd like to remove (twitter,...) on a large selection.
Is there a way to clean these epubs by entering filename criteria and selecting clean external links.

I know how to do it manually for the image, book after book.
1) edit book
2) report -> list of images
3) delete of the image
4) calibre repair function for dead reference
You cannot blanket remove what you want to remove. There's no way to know what you are removing is something you want or not. You'll have to do it all by hand in the editor.
JSWolf is offline  
Old 12-14-2020, 04:04 PM   #4
Robert78
Member
Robert78 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2017
Device: none
Quote:
Originally Posted by JSWolf View Post
You cannot blanket remove what you want to remove. There's no way to know what you are removing is something you want or not. You'll have to do it all by hand in the editor.
I this case it's always the same filename.
I don't give up and I will developp it if I don't find a plugin to do it.
Robert78 is offline  
Old 12-14-2020, 07:37 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Twitter (and other Social) uses the same ICONs, but the link is per account holder.
OK, you could use a wildcard for the account part, but my slight experience on those pages is, the Paragraph/block coding varies all over the place and your goal seems to be want a Clean solution.
theducks is online now  
Advert
Old 12-14-2020, 08:07 PM   #6
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: 73,887
Karma: 128597114
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 Robert78 View Post
I this case it's always the same filename.
I don't give up and I will developp it if I don't find a plugin to do it.
Maybe the filename is the same and maybe not. But even if you could automate removing the icon, you have created an error that now needs fixing.
JSWolf is offline  
Old 12-14-2020, 08:47 PM   #7
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by Robert78 View Post
I this case it's always the same filename.
I don't give up and I will developp it if I don't find a plugin to do it.
”It’s always the same” – until it isn’t.
Rev. Bob is offline  
Old 12-14-2020, 08:53 PM   #8
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: 73,887
Karma: 128597114
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 Rev. Bob View Post
”It’s always the same” – until it isn’t.
I've seen plenty of Twitter graphics logos in eBooks and they are not always the same name.
JSWolf is offline  
Old 12-15-2020, 02:09 AM   #9
Robert78
Member
Robert78 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2017
Device: none
Quote:
Originally Posted by JSWolf View Post
I've seen plenty of Twitter graphics logos in eBooks and they are not always the same name.
In my selection, it's always the same name.
Another way, more simple, is to delete all images with size less than 150 : always crap
Robert78 is offline  
Old 12-15-2020, 05:33 AM   #10
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: 73,887
Karma: 128597114
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 Robert78 View Post
In my selection, it's always the same name.
Another way, more simple, is to delete all images with size less than 150 : always crap
Not always. Some are section break markers, lines, and other things.

You cannot assume. You have to go into the code and deal with it manually.
JSWolf is offline  
Old 02-14-2021, 03:16 PM   #11
Robert78
Member
Robert78 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2017
Device: none
Delete an image with accurate parameters

I've identified a particular image with identical parameters in my whole collection.

Click image for larger version

Name:	1001eBooks.png
Views:	134
Size:	12.8 KB
ID:	185391

It will take me years of my existence to remove these thousands files manually. Sometimes, the same 25 files in one epub.
Is there a possibility you insert a new function to delete an image with a set of very specific parameters ? Name, size, resolution...

Thanks for your help.
Robert78 is offline  
Old 02-15-2021, 02:37 PM   #12
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by Robert78 View Post
I've identified a particular image with identical parameters in my whole collection.

It will take me years of my existence to remove these thousands files manually. Sometimes, the same 25 files in one epub.
Is there a possibility you insert a new function to delete an image with a set of very specific parameters ? Name, size, resolution...

Thanks for your help.
As a rule, plugins generally don’t get modified to handle such a specific, practically unique situation. In this particular situation… ebooks usually include images for a reason, such as to divide sections of text or display fancy chapter headers. It’s a really bad idea to automate such removal, and an even worse idea to do so in a widely-used application where end users can specify the parameters. That’s just… uh, no.
Rev. Bob is offline  
Old 02-15-2021, 02:53 PM   #13
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: 73,887
Karma: 128597114
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 Rev. Bob View Post
As a rule, plugins generally don’t get modified to handle such a specific, practically unique situation. In this particular situation… ebooks usually include images for a reason, such as to divide sections of text or display fancy chapter headers. It’s a really bad idea to automate such removal, and an even worse idea to do so in a widely-used application where end users can specify the parameters. That’s just… uh, no.
This could be a case of the the same section break graphic being duplicated fr every section break. I've seen that before. The thing is without this graphic, you could lose the section break and to remove all the duplicates, you need to edit the code.

As said above, removing these graphics is not something that should be automated.
JSWolf is offline  
Old 02-17-2021, 12:32 PM   #14
Robert78
Member
Robert78 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2017
Device: none
Quote:
Originally Posted by JSWolf View Post
This could be a case of the the same section break graphic being duplicated fr every section break. I've seen that before. The thing is without this graphic, you could lose the section break and to remove all the duplicates, you need to edit the code.

As said above, removing these graphics is not something that should be automated.
Quote:
Originally Posted by Rev. Bob View Post
As a rule, plugins generally don’t get modified to handle such a specific, practically unique situation. In this particular situation… ebooks usually include images for a reason, such as to divide sections of text or display fancy chapter headers. It’s a really bad idea to automate such removal, and an even worse idea to do so in a widely-used application where end users can specify the parameters. That’s just… uh, no.
So I'll hire a freelance developper to do the job in Python without risk.
I can't imagine manually edit thousands epubs
Robert78 is offline  
Old 02-17-2021, 02:01 PM   #15
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: 73,887
Karma: 128597114
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 Robert78 View Post
So I'll hire a freelance developper to do the job in Python without risk.
I can't imagine manually edit thousands epubs
This issue does not happen in thousands of ePub. I cannot see anyone attempting to automate this for you.
JSWolf is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make external link to a specific page/section in a E-book degn Editor 13 02-14-2023 12:01 AM
How to delete a specific image (ad) and external links on a selection of epubs Robert78 Editor 4 12-14-2020 07:31 PM
Convert external links to internal links sup Recipes 2 11-28-2013 09:39 AM
Delete specific format coase Library Management 1 04-20-2012 09:13 AM
how to modify style of specific p classes? clemens14 ePub 10 11-27-2011 04:21 PM


All times are GMT -4. The time now is 08:19 PM.


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