Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-15-2022, 12:07 PM   #1
OccultDemonVHS
Junior Member
OccultDemonVHS began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2022
Device: Kobo
Is there a way to delete all footnotes and associated text within an epub file?

Hello,

So, I typically like to load my Epub files into a text-to-speech reader on my phone - which is great, but sometimes the books I listen to have a plethora of foot notes and it's incredibly annoying to have TTS read each footnote number and the entire footnotes section at the end of the chapter.

I would really like to figure out if there's a way to just delete all footnotes, their associated text and hyperlink numbers in one or two clicks rather than manually editing and deleting 500+ entries throughout a book. This way I could just make an edited copy of the book for my text-to-speech app and have the regular copy for when I want to go back and check out the footnotes. Please see the attached image that shows what the file looks like.

Would anyone be able to help me understand/figure out how to do this? And if this is not the correct forum please direct me to the best place for a question like this as I'm rather new to this program and forum.

Thank you in advance

Click image for larger version

Name:	fHSC5Ly.png
Views:	246
Size:	309.0 KB
ID:	193263

Last edited by DiapDealer; 04-16-2022 at 06:28 AM. Reason: Thumbnail oversized image
OccultDemonVHS is offline   Reply With Quote
Old 04-15-2022, 09:24 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,760
Karma: 5706256
Join Date: Nov 2009
Device: many
Please follow our posting guidelines and edit and attach your large image instead of including it inline.

And yes, you can use Sigil's regular expression find and replace capabilities to first remove the footnotes and via a second pass to remove the links to those footnotes assuming the ids beginning with "fn-" and footnotes all have class of "footnote".

If you have never written or used regular expression find and replace, you should probably read up on it first. Then people here can help refine your approach into something workable.
KevinH is offline   Reply With Quote
Advert
Old 04-15-2022, 09:34 PM   #3
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: 46,176
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by OccultDemonVHS View Post
Hello,

So, I typically like to load my Epub files into a text-to-speech reader on my phone - which is great, but sometimes the books I listen to have a plethora of foot notes and it's incredibly annoying to have TTS read each footnote number and the entire footnotes section at the end of the chapter.

I would really like to figure out if there's a way to just delete all footnotes, their associated text and hyperlink numbers in one or two clicks rather than manually editing and deleting 500+ entries throughout a book. This way I could just make an edited copy of the book for my text-to-speech app and have the regular copy for when I want to go back and check out the footnotes. Please see the attached image that shows what the file looks like.

Would anyone be able to help me understand/figure out how to do this? And if this is not the correct forum please direct me to the best place for a question like this as I'm rather new to this program and forum.

Thank you in advance

Click image for larger version

Name:	fHSC5Ly.png
Views:	171
Size:	309.0 KB
ID:	193251
Congratulations on creating a message that is rather difficult to read and includes an image that exceeds the posting guidelines on image size. Please use the attach paperclip above the message input box or the Manage attachments button below the box so we only have to see a small image which can be enlarged if needed.

That being said, you might want to check into using regex to remove the links and the footnotes though you don't show a sample of the call to the footnote.

For the footnotes you show, something like find: <p class="footnote">< href=#fn(.*?)</p> and a blank replace could remove the actual footnote.
DNSB is online now   Reply With Quote
Old 04-16-2022, 12:10 AM   #4
OccultDemonVHS
Junior Member
OccultDemonVHS began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2022
Device: Kobo
I appreciate both of you for the helpful advice (even if it was in a rather unwelcoming way.) I just ended up defaulting to using RegEx find/replace commands in Notepad++ instead.

I would edit the post to correct the image issue, but I can't seem to find where they've hidden the "edit post" button on this forum.

Check out Posting Guideline #12. It's a doozy.
OccultDemonVHS is offline   Reply With Quote
Old 04-16-2022, 06:48 AM   #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
Quote:
Originally Posted by OccultDemonVHS View Post
I appreciate both of you for the helpful advice (even if it was in a rather unwelcoming way.) I just ended up defaulting to using RegEx find/replace commands in Notepad++ instead.

I would edit the post to correct the image issue, but I can't seem to find where they've hidden the "edit post" button on this forum.

Check out Posting Guideline #12. It's a doozy.
Your post count is too low (anti-spam measure) to self edit. A Mod can do it for you upon request.

Footnotes are usually LINKED. So you might use Tools:Reports:Links (on sidebar) to locate them
theducks is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Footnotes and text links... how to do? (Kobo Epub) Koboder Writers' Corner 2 02-20-2022 08:55 AM
Epub File Only Has Cover, no text. sarafina Android Devices 2 11-28-2015 01:06 PM
How to delete pages from Epub file naivebelle Editor 1 07-02-2015 09:47 PM
Converted my library and want to delete all file types except *.epub Dasgud Library Management 3 11-28-2011 09:02 PM
Kobo Read - Can't delete Text file - txt fglaysher Calibre 0 08-15-2010 06:08 PM


All times are GMT -4. The time now is 06:09 AM.


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