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

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 12-29-2019, 04:00 AM   #1
steveredshaw
Junior Member
steveredshaw began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2019
Device: Kindle app on tablet
Editing an epub file

I need to take out all page number references from an epub file. They appear like this - <p class="calibre_"><span class="bold">Page 52</span></p>.

I can delete each one separately, but can I use a wild card term instead of the number to replace/delete all of them in one go?
steveredshaw is offline   Reply With Quote
Old 12-29-2019, 10:00 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 1,976
Karma: 12600000
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
Yes, you can. That technique is called RegEx (for Regular Expression). There are some different 'flavors' of regex depending on what software you are using, but they all generally support the basic commands.

There is a short explanation of RegEx in MR's Wiki.

You can try:
Search: <p class="calibre_"><span class="bold">Page (\d*?)</span></p>
Replace: (nothing)

Give it a try, one at a time until you are sure it isn't going to pick up something unwanted... then you can Replace All.

As always, save your epub first!

Cheers,
Turtle91 is offline   Reply With Quote
Advert
Old 12-29-2019, 10:01 AM   #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: 55,471
Karma: 51439620
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
That sort of page numbering is usually found when a PDF is converted to ePub. If that is the case, there will be more errors then just page numbers.
JSWolf is offline   Reply With Quote
Old 12-29-2019, 12:56 PM   #4
steveredshaw
Junior Member
steveredshaw began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2019
Device: Kindle app on tablet
RE: editing using regular expressions

Thank you so much. Find and Replace is so powerful in Calibre! Apply changes to all files making up the book - that is so useful!!

Once I'd got familiar with the wild card terms and the Find and Replace section of the editing page, I was able to clean up the book in very little time.

It was a pdf file, which I wanted to read on my Kindle. Pdfs are a bit clumsy and inflexible when displayed via the Kindle app (no font size control for one thing), but a bit of cleaning up (yes there were other errors which I did correct - well probably most of them) and converting to Amazon file format made the book much easier and more pleasant to read.
steveredshaw is offline   Reply With Quote
Reply

Tags
editing ebook in calibre, wild card

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
File list for editing johngross Editor 1 10-07-2019 10:29 PM
Problem editing a file Terisa de morgan Editor 2 05-01-2018 08:26 AM
Editing the file /etc/profile. How to??? Kirith Onyx Boox 0 05-05-2013 04:37 PM
Editing config file James_Wilde Sigil 4 12-11-2010 11:22 AM


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


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