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: 18
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
Wizard
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: 1,832
Karma: 4525859
Join Date: Dec 2010
Device: Kindle 3, 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
 
Enthusiast
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: 156
Karma: 86115
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: 18
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
Wizard
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: 1,832
Karma: 4525859
Join Date: Dec 2010
Device: Kindle 3, 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: 2,075
Karma: 2257905
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350: 3 Silver, 2 Blue!; Kobo Glo
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: 18
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: 18
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
Grand Sorcerer
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: 14,122
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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 offline   Reply With Quote
Old 03-05-2013, 06:36 PM   #205
theducks
Grand Sorcerer
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: 14,122
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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 offline   Reply With Quote
Old 03-05-2013, 06:53 PM   #206
ReaderRabbit
Member
ReaderRabbit began at the beginning.
 
ReaderRabbit's Avatar
 
Posts: 18
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
Grand Sorcerer
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: 14,122
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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 offline   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: 156
Karma: 86115
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: 2,075
Karma: 2257905
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350: 3 Silver, 2 Blue!; Kobo Glo
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: 18
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 11:15 AM.


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