Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book General > General Discussions

Notices

Reply
 
Thread Tools Search this Thread
Old 09-14-2014, 02:54 PM   #31
doubleshuffle
Unicycle Daredevil
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 13,944
Karma: 185432100
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
Quote:
Originally Posted by gbm View Post
This one works in my test.
Code:
( <a id="page_([0-9]+)"></a> )
In the Calibre Editor? Rejected it as invalid when I tried it.
doubleshuffle is offline   Reply With Quote
Old 09-14-2014, 03:08 PM   #32
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by doubleshuffle View Post
Indeed. I'm generally rather clueless about Regex myself, but RegexBuddy and Mobileread together are a great lifesaving outfit...
Or their (RegexBuddy's) free guide here: http://www.regular-expressions.info/

The most helpful regex tutorial I have come across, it is my go-to reference.
eschwartz is offline   Reply With Quote
Old 09-14-2014, 03:12 PM   #33
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,189
Karma: 8888888
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by doubleshuffle View Post
In the Calibre Editor? Rejected it as invalid when I tried it.
Yes, see screenshot.

bernie
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2014-09-14 15:09:17.png
Views:	353
Size:	13.2 KB
ID:	128354  
gbm is offline   Reply With Quote
Old 09-14-2014, 03:17 PM   #34
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,592
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by eschwartz View Post
Or their (RegexBuddy's) free guide here: http://www.regular-expressions.info/

The most helpful regex tutorial I have come across, it is my go-to reference.
I'll second that. Got that puppy on speed-dial.

It would seem to me that none of the parentheses in the expressions being bandied about are actually necessary. Surely
Code:
 <a id="page_\d+"></a>
would suffice (a space preceding and following)? Replace it with nothing.

Last edited by DiapDealer; 09-14-2014 at 03:26 PM.
DiapDealer is offline   Reply With Quote
Old 09-14-2014, 03:18 PM   #35
doubleshuffle
Unicycle Daredevil
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 13,944
Karma: 185432100
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
Quote:
Originally Posted by gbm View Post
Yes, see screenshot.
Ah, upon a closer look I saw that yours is a little different from HYPE's. Yours works for me too.
doubleshuffle is offline   Reply With Quote
Old 09-14-2014, 03:44 PM   #36
Joques
Addict
Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.
 
Posts: 294
Karma: 107414
Join Date: May 2013
Device: Kobo Glo
Thank you very much for all your input! I'll try it out tomorrow. Just one more question, even if it is a bit to the side of the main point of complaining about lackluster proofing and formatting on the part of certain publishers:

Is it possible, in Calibre, to search/replace globally in an entire book, as opposed to in individual chapter files like I'm doing now?
Joques is offline   Reply With Quote
Old 09-14-2014, 03:47 PM   #37
doubleshuffle
Unicycle Daredevil
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 13,944
Karma: 185432100
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
Quote:
Originally Posted by Joques View Post
Is it possible, in Calibre, to search/replace globally in an entire book, as opposed to in individual chapter files like I'm doing now?
Of course. You have to select "All text files" in one of the dropdown menus (see gbm's screenshot a few posts above.)
doubleshuffle is offline   Reply With Quote
Old 09-14-2014, 03:54 PM   #38
Joques
Addict
Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.
 
Posts: 294
Karma: 107414
Join Date: May 2013
Device: Kobo Glo
Thank you again. Who ever said that whining never accomplishes anything?
Joques is offline   Reply With Quote
Old 09-14-2014, 03:59 PM   #39
doubleshuffle
Unicycle Daredevil
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 13,944
Karma: 185432100
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
And isn't it great for the lazy publishers that they have a whole team here to correct their mistakes?
doubleshuffle is offline   Reply With Quote
Old 09-14-2014, 04:01 PM   #40
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,792
Karma: 103362673
Join Date: Apr 2011
Device: pb360
Doesn't even the most rabid command line hater have to admit that copy and pasting:

Code:
unzip file_name.epub
sed -ie 's; <a id="page_[0-9]*"/> ;;g' *.html
zip -u file_name.epub *.html
is the simplest and easiest way, provided unzip, zip, and sed are installed? (The unzipped files would then need to be deleted, but that should not be a problem.)
j.p.s is offline   Reply With Quote
Old 09-14-2014, 05:21 PM   #41
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,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Code:
Randy has spent al <a id="page_540"/> most no time around military people.
Code:
Randy has spent <a id="page_540"/> almost no time around military people.
If you have any of the two situations in the same eBook, you cannot use regex to fix it as you'll be removing spaces you want to keep. So unless you are 100% sure the regex won't be getting rid of spaces, go for it. But even if .01% unsure, don't do it.

Last edited by JSWolf; 09-14-2014 at 05:25 PM.
JSWolf is offline   Reply With Quote
Old 09-14-2014, 05:33 PM   #42
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,792
Karma: 103362673
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by JSWolf View Post
Code:
Randy has spent al <a id="page_540"/> most no time around military people.
Code:
Randy has spent <a id="page_540"/> almost no time around military people.
If you have any of the two situations in the same eBook, you cannot use regex to fix it as you'll be removing spaces you want to keep. So unless you are 100% sure the regex won't be getting rid of spaces, go for it. But even if .01% unsure, don't do it.
That is a good point. It seems very unlikely that this page count thingy would always be in the middle of a word.
j.p.s is offline   Reply With Quote
Old 09-14-2014, 06:06 PM   #43
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,592
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I don't think anyone's recommending blindly doing a Replace All. I Know the Cryptonomicon is pretty dang large, but once you get in a rhythm, it wouldn't take that long to step through and verify every occurrence. Once through and you're done.

It's pretty safe (not to mention smart) to assume that no regex is "Replace All"-safe. That assumption is why many of these errors creep in to begin with ... too much confidence in one's own S&R skills.
DiapDealer is offline   Reply With Quote
Old 09-14-2014, 07:08 PM   #44
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,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
But given that that's page 540 that's showing and the book is over 1000 pages, that's going to be a lot of manual search/replace.
JSWolf is offline   Reply With Quote
Old 09-14-2014, 07:18 PM   #45
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,592
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Hour and forty-five minutes. Tops.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
0.7.1 acting different than 0.6.2 Gregg Bell Sigil 9 03-26-2013 09:35 PM
Publishers Now Offering Agency Pricing 2.0 (big win for Publishers) Top100EbooksRank News 24 12-20-2012 12:47 PM
Tired of being patient amo Kobo Reader 13 04-13-2011 05:17 PM
My DX is acting up. Again. Scott Nielsen Amazon Kindle 4 02-27-2010 02:33 PM


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


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