Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-14-2020, 03:01 PM   #1
Robert78
Member
Robert78 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: May 2017
Device: none
How to delete a specific image (ad) and external links on a selection of epubs

I have some epubs with the same ad on several pages.
I'd like to get rid of them by selecting multiple books and indicating the file name to delete. Once files deleting, I'd like to have an automatic repair task to clean the dead links to the image. At the same time, external links (twitter...) could be also deleted.

today, I can do it manually, book after book and it's very slow :
1) book selection
2) edit book
3) report
4) image selection
5) image deletion
6) check and repair

Is there a way to automate this. Can a plugin do it ?

thanks a lot for your help
Robert78 is offline   Reply With Quote
Old 12-14-2020, 03:22 PM   #2
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,733
Karma: 145864619
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 some epubs with the same ad on several pages.
I'd like to get rid of them by selecting multiple books and indicating the file name to delete. Once files deleting, I'd like to have an automatic repair task to clean the dead links to the image. At the same time, external links (twitter...) could be also deleted.

today, I can do it manually, book after book and it's very slow :
1) book selection
2) edit book
3) report
4) image selection
5) image deletion
6) check and repair

Is there a way to automate this. Can a plugin do it ?

thanks a lot for your help
You do not need step 3.

What I do is delete all HTML I don't want including the ads, internal ToC, previews, copyright notice, list of the authors other books, reviews of the book, and any other rubbish. Then I check the book using Calibre's error check. I delete any unused graphics as reported. Then I remove unused CSS and Lossless compress the graphics. This fixes the steps you left out. Your way you could end up with HTML that's mostly blank because you got rid of the advert graphics. By deleting the entire HTML, you can then get rid of the graphics no longer used and also have a smaller ePub.

As for automating this, there is no way to do that.
JSWolf is offline   Reply With Quote
Advert
Old 12-14-2020, 03:59 PM   #3
Robert78
Member
Robert78 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: May 2017
Device: none
Quote:
Originally Posted by JSWolf View Post
You do not need step 3.

What I do is delete all HTML I don't want including the ads, internal ToC, previews, copyright notice, list of the authors other books, reviews of the book, and any other rubbish. Then I check the book using Calibre's error check. I delete any unused graphics as reported. Then I remove unused CSS and Lossless compress the graphics. This fixes the steps you left out. Your way you could end up with HTML that's mostly blank because you got rid of the advert graphics. By deleting the entire HTML, you can then get rid of the graphics no longer used and also have a smaller ePub.

As for automating this, there is no way to do that.
Thanks, it's a cleaner process.
But I takes me less than 30 seconds to remove sometimes the same 20 images without inspecting all the html code, sometimes in tens of sub separate html files and the visual effect is perfect. I'm not patient and html code is difficult to read

For optimal result, I'll consider your process.
Robert78 is offline   Reply With Quote
Old 12-14-2020, 04:00 PM   #4
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,733
Karma: 145864619
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
Thanks, it's a cleaner process.
But I takes me less than 30 seconds to remove sometimes the same 20 images without inspecting all the html code, sometimes in tens of sub separate html files and the visual effect is perfect. I'm not patient and html code is difficult to read

For optimal result, I'll consider your process.
HTML is not difficult to read. I suggest you learn HTML/CSS as that will help a lot to make any changes you want in an eBook.
JSWolf is offline   Reply With Quote
Old 12-14-2020, 07:31 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: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Report is just that. A report with the added benefit of linking.

Deleting the Image there, just leaves a 'broken link' at the usage point.
You could use the Editor and Debug.
Delete the Image: debug: fix the errors that caused: save
theducks is offline   Reply With Quote
Advert
Reply


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
Delete Specific Format in 3.30 cathrinerose Library Management 4 07-14-2017 05:21 AM
Delete image from multiple epubs at once redlob Editor 3 05-06-2016 01:27 PM
Convert external links to internal links sup Recipes 2 11-28-2013 09:39 AM
Font selection for epubs? RootlessAgrarian OpenInkpot 4 01-24-2010 12:16 AM


All times are GMT -4. The time now is 07:08 AM.


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