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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-05-2013, 11:09 AM   #196
ReaderRabbit
Member
ReaderRabbit began at the beginning.
 
ReaderRabbit's Avatar
 
Posts: 24
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
Sorry, this is such an obvious question and is probably answered somewhere but I didn't find it.

What would be the best way to find and eliminate page numbers such as:

He glanced 190</p>

<p class="calibre1">up at the big clock
ReaderRabbit is offline   Reply With Quote
Old 03-05-2013, 11:29 AM   #197
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by ReaderRabbit View Post
What would be the best way to find and eliminate page numbers such as:

He glanced 190</p>

<p class="calibre1">up at the big clock
Assuming that each page number is preceded by a space, the following quick & dirty regex should work:

Code:
\d+</p>\s+<p class=".*?">
(Replace with nothing.)
Doitsu is offline   Reply With Quote
Old 03-05-2013, 11:30 AM   #198
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
Quote:
Originally Posted by Ripplinger View Post
I couldn't get that to work at all and was about to give up and then realized you didn't use the curly smart quotes. Once I changed it to smart quotes, it would work somewhat, but it will also pick up any sentence or paragraph that doesn't immediately start with a quote. So it would pick up paragraphs like this:

Pamela shuddered. “We’ve been making ourselves polite to a murderess.”

And there's usually far too many of those types of sentences to want to read through over 500 of them to find the beginning quote buried further in.
try this? it'll probably still miss some (like if the closing quote butts up against a </span> instead of a </p> for example) so you'd probably want to scan the text afterwards but it might save you some copy/pasting.

Code:
find: (<p[^>]*>)(?:\s+)?([^“]+?”)(?:\s+)?(</p>)

replace: \1“\2\3

Last edited by mzmm; 03-05-2013 at 11:38 AM.
mzmm is offline   Reply With Quote
Old 03-05-2013, 11:59 AM   #199
ReaderRabbit
Member
ReaderRabbit began at the beginning.
 
ReaderRabbit's Avatar
 
Posts: 24
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
Quote:
Originally Posted by Doitsu View Post
Assuming that each page number is preceded by a space, the following quick & dirty regex should work:

Code:
\d+</p>\s+<p class=".*?">
(Replace with nothing.)
Thanks so much! Works perfectly.

What about page numbers like this: <p class="calibre1">200</p>

I used to be able to find them with the 'Wildcard' search and replace. I am using version version 0.6.2 of Sigil. Where has that feature gone?

I ♥ brainiacs
ReaderRabbit is offline   Reply With Quote
Old 03-05-2013, 12:18 PM   #200
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by ReaderRabbit View Post
What about page numbers like this: <p class="calibre1">200</p>
Use: <p class=".*?">\d+</p>
Doitsu is offline   Reply With Quote
Old 03-05-2013, 02:02 PM   #201
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
Quote:
Originally Posted by mzmm View Post
try this? it'll probably still miss some (like if the closing quote butts up against a </span> instead of a </p> for example) so you'd probably want to scan the text afterwards but it might save you some copy/pasting.

Code:
find: (<p[^>]*>)(?:\s+)?([^“]+?”)(?:\s+)?(</p>)

replace: \1“\2\3
That's getting closer and it will pick up more, but it won't work on a sentence where the end quote isn't directly before the </p>, so it wouldn't pick up this sentence if the beginning quote was missing:

“But how would you deal with these miseries out of the past?” I asked.

Even if there were 2 regex strings to run to be able to pick up both sentence structures would still be much better than just hoping you find them all in proofing.
Ripplinger is offline   Reply With Quote
Old 03-05-2013, 02:23 PM   #202
ReaderRabbit
Member
ReaderRabbit began at the beginning.
 
ReaderRabbit's Avatar
 
Posts: 24
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
Quote:
Originally Posted by Doitsu View Post
Use: <p class=".*?">\d+</p>
This is the same command, right? I did not see a difference but it works.


Has anyone compiled a list of basic commands, such as finding book numbers? I checked: 'Useful RegEx commandos for ebook corrections' suggested earlier in this thread but did not find anything I could use.

Thanks again
ReaderRabbit is offline   Reply With Quote
Old 03-05-2013, 04:30 PM   #203
ReaderRabbit
Member
ReaderRabbit began at the beginning.
 
ReaderRabbit's Avatar
 
Posts: 24
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
Is there a command to fix this type of error?

<p class="calibre1">“That makes her sound like an ungrateful victim,”</p>

<p class="calibre1">Peggy said.</p>
ReaderRabbit is offline   Reply With Quote
Old 03-05-2013, 06:32 PM   #204
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: 29,689
Karma: 54369090
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 Doitsu View Post
Use: <p class=".*?">\d+</p>
Just watch out if your chapters are also a digits only and NOT coded to a h#. fix those first, then clean
theducks is online now   Reply With Quote
Old 03-05-2013, 06:36 PM   #205
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: 29,689
Karma: 54369090
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 ReaderRabbit View Post
Is there a command to fix this type of error?

<p class="calibre1">“That makes her sound like an ungrateful victim,”</p>

<p class="calibre1">Peggy said.</p>
Use the Saved search: Join Paragraphs (included by default )
theducks is online now   Reply With Quote
Old 03-05-2013, 06:53 PM   #206
ReaderRabbit
Member
ReaderRabbit began at the beginning.
 
ReaderRabbit's Avatar
 
Posts: 24
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
Quote:
Originally Posted by theducks View Post
Use the Saved search: Join Paragraphs (included by default )
Join Paragraphs did not work on this example.
ReaderRabbit is offline   Reply With Quote
Old 03-05-2013, 07:04 PM   #207
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: 29,689
Karma: 54369090
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 ReaderRabbit View Post
Join Paragraphs did not work on this example.
Got it (The why): Comma Quote not quote comma (I think that nees to be fixed, then it would work
theducks is online now   Reply With Quote
Old 03-06-2013, 05:20 AM   #208
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
Quote:
Originally Posted by Ripplinger View Post
That's getting closer and it will pick up more, but it won't work on a sentence where the end quote isn't directly before the </p>, so it wouldn't pick up this sentence if the beginning quote was missing:

“But how would you deal with these miseries out of the past?” I asked.

Even if there were 2 regex strings to run to be able to pick up both sentence structures would still be much better than just hoping you find them all in proofing.
this should work.

Code:
(<p[^>]*>)(?:\s+)?([^“”]+?”)(.*?)(?:\s+)?(</p>)

\1“\2\3\4
mzmm is offline   Reply With Quote
Old 03-06-2013, 06:54 AM   #209
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
Quote:
Originally Posted by mzmm View Post
this should work.

Code:
(<p[^>]*>)(?:\s+)?([^“”]+?”)(.*?)(?:\s+)?(</p>)

\1“\2\3\4
That worked like a charm! It caught all instances no matter where the ending quote was located.

Thanks!
Ripplinger is offline   Reply With Quote
Old 03-06-2013, 10:57 AM   #210
ReaderRabbit
Member
ReaderRabbit began at the beginning.
 
ReaderRabbit's Avatar
 
Posts: 24
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
Quote:
Originally Posted by mzmm View Post
this should work.

Code:
(<p[^>]*>)(?:\s+)?([^“”]+?”)(.*?)(?:\s+)?(</p>)

\1“\2\3\4
Thanks so much! Don't know how you all figure this stuff out. It's way beyond me but I like my books to be as correct as possible.

I ♥ brainiacs
ReaderRabbit is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Examples of Subgroups emonti8384 Lounge 32 02-26-2011 06:00 PM
Accessories Pen examples Gunnerp245 enTourage Archive 15 02-21-2011 03:23 PM
Stylesheet examples? Skitzman69 Sigil 15 09-24-2010 08:24 PM
Examples kafkaesque1978 iRiver Story 1 07-26-2010 03:49 PM
Looking for examples of typos in eBooks Tonycole General Discussions 1 05-05-2010 04:23 AM


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


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