View Single Post
Old 02-13-2023, 02:24 AM   #1
LostOnTheLine
Connoisseur
LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.
 
Posts: 72
Karma: 800000
Join Date: Jun 2021
Device: Kindle Paperwhite (PW1|PW3|PW4), Kindle Voyage
Automate Ad Page removal by filename

I've found a bunch of books that I'm adding contain a distributor ad at the end of the book.
  • The ad page is always the same filename signup.xhtml
  • They contain different text but always have the words "Sign up for our mailing list" on the page

I ran into another distributor who has the same signup.xhtml but the page is completely different.

In any case I always want to remove the page. So far I do it by manually [right-click] > [delete] but since it's the same page name there should be an easier way for me to add it to my automation list.

I currently run an automation list on just about every book I add, with things like
  • RunSavedSearchReplaceAll ' and ' to ' & '
  • RunSavedSearchReplaceAll 'have ourselves a cake & eat a cake' to 'have ourselves a cake & eat it too'
  • RunSavedSearchReplaceAll <<REPEATED WITH A DOZEN SIMILAR COMMON TRANSLATION ERRORS>>
  • ImgShrinker
  • MedPrettifyHTML
  • StandardizeEpub
Is there any way to add a removal of all files named signup.xhtml?

I know the default tools I can add have options for DeleteUnusedMedia & DeleteUnusedStyles & RemoveNCXGuideFromEpub3 & there's the MendHTML & MendPrettifyHTML would it be possible to perhaps modify one of those to do it? I assume not since they won't even change books that have the files stupidly named .html instead of .xhtml but maybe it's possible. There's also the option to call plugins, maybe there's a plugin that has the ability to (even if it's not the intent of the plugin) delete a page by name?

My hope is that once I get this to work I'll put it in my automation list, then after it it'll remove unused media & get rid of the images on the ad pages as well, but even if it can't do that I'll consider it a success if I can delete the page.
LostOnTheLine is offline   Reply With Quote