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
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 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
Zealot
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: 110
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
Advert
Old 10-25-2013, 10:25 AM   #48
automa
Zealot
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: 110
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
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 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
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 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
Advert
Old 10-25-2013, 10:34 AM   #51
automa
Zealot
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: 110
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
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 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: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
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 offline   Reply With Quote
Old 10-25-2013, 12:44 PM   #54
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 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
Zealot
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: 110
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
Zealot
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: 110
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
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 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: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
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: https://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
Color me gone
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,089
Karma: 1445295
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
Zealot
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: 110
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 02:12 PM.


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