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 10-21-2013, 09:21 PM   #46
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,839
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by automa View Post
In this case, what code do you use for find field?
Whatever it takes for YOUR source.

Note I distrust using the 'tokenize' function in search. It can match way too much


Post a complete Sample of the chapter Head block. (start at <Body>)
Color what you want gone RED
Color what you want on the first line Blue
Color what you want on the second line Green

It really is not (usually) difficult
theducks is offline   Reply With Quote
Old 10-25-2013, 10:18 AM   #47
automa
Connoisseur
automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.
 
automa's Avatar
 
Posts: 93
Karma: 972092
Join Date: Jan 2012
Device: iPhone
I just tried finding this (?i)<p([^>]+)>(.*?)Chapter(.*?)</p>
and replacing it with this: <h2\1>\2Chapter\3</h2>

The screen changed to showing all the codes and when I did CTRL+T it didn't show the list of chapters.
automa is offline   Reply With Quote
 
Enthusiast
Old 10-25-2013, 10:25 AM   #48
automa
Connoisseur
automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.
 
automa's Avatar
 
Posts: 93
Karma: 972092
Join Date: Jan 2012
Device: iPhone
Quote:
Originally Posted by theducks View Post
Whatever it takes for YOUR source.

Note I distrust using the 'tokenize' function in search. It can match way too much


Post a complete Sample of the chapter Head block. (start at <Body>)
Color what you want gone RED
Color what you want on the first line Blue
Color what you want on the second line Green

It really is not (usually) difficult
What does tokenize mean? I see there in the options "DotAll", "Minimal Match", "Auto-Tokenize", and "Wrap." And the "Wrap" option is checked by default. What does it do?
automa is offline   Reply With Quote
Old 10-25-2013, 10:30 AM   #49
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,839
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by automa View Post
I just tried finding this (?i)<p([^>]+)>(.*?)Chapter(.*?)</p>
and replacing it with this: <h2\1>\2Chapter\3</h2>

The screen changed to showing all the codes and when I did CTRL+T it didn't show the list of chapters.
Are you sure the code is 100% valid (try switching to Book view. Sigil will hollar if anything is invalid code syntaxwise)

Did the TOC editor open on a different monitor?
Try the entry on the tools menu, just in case the Keyboard shortcut is glitched
theducks is offline   Reply With Quote
Old 10-25-2013, 10:33 AM   #50
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,839
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by automa View Post
What does tokenize mean? I see there in the options "DotAll", "Minimal Match", "Auto-Tokenize", and "Wrap." And the "Wrap" option is checked by default. What does it do?
Why not try it and learn . Where is your sense of adventure

JUST DON'T click Replace(all) unless you are 100% satisfied with what you NOW see in the Search box
theducks is offline   Reply With Quote
Old 10-25-2013, 10:34 AM   #51
automa
Connoisseur
automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.
 
automa's Avatar
 
Posts: 93
Karma: 972092
Join Date: Jan 2012
Device: iPhone
I just tried finding
Quote:
(?i)<p([^>]+)>(.*?)Chapter(.*?)</p>
and it says no-matches found. How should it be tweaked?
automa is offline   Reply With Quote
Old 10-25-2013, 11:41 AM   #52
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,839
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by automa View Post
I just tried finding and it says no-matches found. How should it be tweaked?


If you selected text and clicked the search BUTTON (will copy that into the search box), then right click the tokenize selection, it should find at least ONE

Note: You may need to reset the insert point above to find that instance

did you set the search mode to REGEX?
theducks is offline   Reply With Quote
Old 10-25-2013, 12:37 PM   #53
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 644
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD
Quote:
Originally Posted by automa View Post
I just tried finding this (?i)<p([^>]+)>(.*?)Chapter(.*?)</p>
and replacing it with this: <h2\1>\2Chapter\3</h2>
How about changing it to
finding: (?i)<p(.*?Chapter.*?</)p>
replace: <h2\1h2>

Do you get any matches then?
Perkin is online now   Reply With Quote
Old 10-25-2013, 12:44 PM   #54
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,989
Karma: 4633978
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by automa View Post
I just tried finding

Code:
(?i)<p([^>]+)>(.*?)Chapter(.*?)</p>
and it says no-matches found. How should it be tweaked?
The above regex will obviously only work if the initial <p> tag has at least one attribute. I.e. it won't find:

Code:
<p>Chapter 1</p>
BTW, posting a regular expression without the exact text it's supposed to match is rather pointless.
Doitsu is offline   Reply With Quote
Old 10-25-2013, 01:35 PM   #55
automa
Connoisseur
automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.
 
automa's Avatar
 
Posts: 93
Karma: 972092
Join Date: Jan 2012
Device: iPhone
Quote:
Originally Posted by theducks View Post


If you selected text and clicked the search BUTTON (will copy that into the search box), then right click the tokenize selection, it should find at least ONE

Note: You may need to reset the insert point above to find that instance

did you set the search mode to REGEX?

Select what text? What does tokenize supposed to do?

How do you go into REGEX mode?
automa is offline   Reply With Quote
Old 10-25-2013, 01:55 PM   #56
automa
Connoisseur
automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.
 
automa's Avatar
 
Posts: 93
Karma: 972092
Join Date: Jan 2012
Device: iPhone
Quote:
Originally Posted by Doitsu View Post
The above regex will obviously only work if the initial <p> tag has at least one attribute. I.e. it won't find:

Code:
<p>Chapter 1</p>
BTW, posting a regular expression without the exact text it's supposed to match is rather pointless.
What would be an example of a an attribute?
automa is offline   Reply With Quote
Old 10-25-2013, 02:00 PM   #57
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,839
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by automa View Post
What would be an example of a an attribute?
You need to stop and learn a little HTML and CSS if you don't know the answer to that question
theducks is offline   Reply With Quote
Old 10-25-2013, 02:59 PM   #58
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,480
Karma: 13517271
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by theducks View Post
You need to stop and learn a little HTML and CSS if you don't know the answer to that question
I believe that Diap was trying to make that same point in this reply in this thread: http://www.mobileread.com/forums/sho...1&postcount=45

The time hath come for the questioner to take the time to learn some of this, instead of just asking us for solutions. If s/he doesn't know what an attribute is, giving him/her regex solutions just...it's the putting the horse two miles ahead of the carriage.

Hitch
Hitch is offline   Reply With Quote
Old 10-25-2013, 09:50 PM   #59
mrmikel
Book Twiddler
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,086
Karma: 1444487
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Quote:
Originally Posted by automa View Post
What would be an example of a an attribute?
Go to http://w3schools.com/

They have online tutorials about html and css and try it for yourself sections where you can change things and see how they work.

A search for the word attribute gives you many uses of it and starts off with how to use in html.
mrmikel is offline   Reply With Quote
Old 11-03-2013, 12:01 PM   #60
automa
Connoisseur
automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.automa ought to be getting tired of karma fortunes by now.
 
automa's Avatar
 
Posts: 93
Karma: 972092
Join Date: Jan 2012
Device: iPhone
Should I learn HTML5 and CSS3 too?
automa 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
Sigil 0.5.3: Remarks on search function DrChiper Sigil 8 10-12-2012 01:43 PM
Is it possible to turn off all automation in Sigil? Iznogood Sigil 7 06-13-2012 04:05 AM
Sigil Save As... Fabe Sigil 5 01-20-2012 08:55 PM
0.7.1 Save to Disc function fixed? grizedale Calibre 9 06-07-2010 04:49 PM
Save to Disk Function Lady Fitzgerald Calibre 8 06-07-2010 10:06 AM


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


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