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 05-22-2013, 12:49 AM   #1
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,843
Karma: 1089170
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
Question whatever happened to autofix closing tags ?

once upon a time - in sigil 4, 5, 6 I could regex a fix e.g. to all chapter headings
like this
find <p class "whatever" >CHAPTER
replace <h2 class "whatever" >CHAPTER
replace all
and sigil would helpfully do the closing tags to match, so no need for long complicated regex

doesn't work for me now in v7 - what default settings do I need to change or has this feature now been "upgraded" out of existence

I tried the obvious toggles for tidy/pretty print....
cybmole is offline   Reply With Quote
Old 05-22-2013, 03:33 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,002
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
What is keeping you from including the closing tag in your regex? Hoping that Tidy (who actually did that) will guess the correct end tag can lead to quite unexpected results.

Sure, the regex might become a little more complex, but it will give better predictable results.
Toxaris is offline   Reply With Quote
Old 05-22-2013, 04:27 AM   #3
exaltedwombat
Evangelist
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 438
Karma: 1703930
Join Date: Nov 2011
Device: none
Doesn't Tidy still do it? If you dare!
exaltedwombat is offline   Reply With Quote
Old 05-22-2013, 04:47 AM   #4
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,843
Karma: 1089170
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
it is much easier to let tidy do it but I could not get it to work in v7.

the reason for not doing the whole thing in regex is just complexity. you have to capture what comes after CHAPTER & embed in the replace line, plus I hate it when "Upgrades" take away stuff takes worked before.

i did one the "hard way" yesterday but then decided to ask if my old workflow could still be made to work.

stripping double embedded blockquotes is also much harder now that you can't ask tidy to do half of the work

it was very reliable before so long as you used replace all and not just replace. not just for this but also for upgrading/ downgrading header tags e.g. <h1 to <h2. I got used to doing a visual check before saving so if the book did get screwed up I'd discard & start over.
cybmole is offline   Reply With Quote
Old 05-22-2013, 05:05 AM   #5
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 cybmole View Post
it is much easier to let tidy do it but I could not get it to work in v7.

the reason for not doing the whole thing in regex is just complexity. you have to capture what comes after CHAPTER & embed in the replace line, plus I hate it when "Upgrades" take away stuff takes worked before.

i did one the "hard way" yesterday but then decided to ask if my old workflow could still be made to work.

stripping double embedded blockquotes is also much harder now that you can't ask tidy to do half of the work

it was very reliable before so long as you used replace all and not just replace. not just for this but also for upgrading/ downgrading header tags e.g. <h1 to <h2. I got used to doing a visual check before saving so if the book did get screwed up I'd discard & start over.
cyb:

Gotta say, my one big (inadvertent) experience with allowing PP to "tidy" my tags was pretty freaking disastrous, resulting in ye olden PSO'D. I would not recommend this.

Hitch
Hitch is offline   Reply With Quote
Old 05-22-2013, 05:22 AM   #6
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,843
Karma: 1089170
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
Quote:
Originally Posted by Hitch View Post
cyb:

Gotta say, my one big (inadvertent) experience with allowing PP to "tidy" my tags was pretty freaking disastrous, resulting in ye olden PSO'D. I would not recommend this.

Hitch
ah but you are a pro - you are supposed to do it the hard way

i want my fumbling amateur hack back
cybmole is offline   Reply With Quote
Old 05-22-2013, 06:38 AM   #7
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
This was brought up shortly after this latest version came out. I think meme said at that time that they would look at it, but it would take a new approach based on tags instead of what they are doing now .

I think this is their point of view...no amateur hour stuff that only half works, since the user base is pros and serious amateurs.
mrmikel is offline   Reply With Quote
Old 05-22-2013, 06:49 AM   #8
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,843
Karma: 1089170
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
hey, I am a serious amateur - I am seriously, some would say obsessively, fussy about the layout of e-books that I read & I'd seriously like this back
cybmole is offline   Reply With Quote
Old 05-22-2013, 07:08 AM   #9
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
I feel your pain every time I have to get rid of font size=-1 over and over again.

I also feel the pain of trying to regex things that take 10 regexs to get rid of what use to automatically disappear.

But I don't like sections magically disappearing as well, especially after things have just being going great and I haven't saved for half an hour. It ALWAYS happens that way.
mrmikel is offline   Reply With Quote
Old 05-22-2013, 07:47 AM   #10
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: 9,251
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by cybmole View Post
it was very reliable before so long as you used replace all and not just replace. not just for this but also for upgrading/ downgrading header tags e.g. <h1 to <h2.
The heart wants what the heart wants: I get that. But for promoting/demoting headers, I heartily recommend moving toward something like...
Find:
Code:
<(/?)h1([^>]+)?>
Replace:
Code:
<\1h2\2>

Last edited by DiapDealer; 05-22-2013 at 07:55 AM.
DiapDealer is offline   Reply With Quote
Old 05-22-2013, 09:13 AM   #11
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
Promoting and Demoting headers were sections included in the Saved Searches 'Samples'
theducks is offline   Reply With Quote
Old 05-22-2013, 09:46 AM   #12
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: 9,251
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by theducks View Post
Promoting and Demoting headers were sections included in the Saved Searches 'Samples'
Yes, they were. I just prefer a method that only (matches|captures|alters) the tags themselves and leaves the stuff between the tags completely out of the equation.

To each their own, though ... certainly.
DiapDealer is offline   Reply With Quote
Old 05-22-2013, 10:01 AM   #13
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 DiapDealer View Post
Yes, they were. I just prefer a method that only (matches|captures|alters) the tags themselves and leaves the stuff between the tags completely out of the equation.

To each their own, though ... certainly.
With your way, you could jump from H1 to H3 in a single pass by only changing 1 character
theducks 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
closing tags not auto-fixing cybmole Sigil 8 12-04-2012 08:49 AM
Word autofix; Leave dialog alone morriss003 Writers' Corner 1 07-26-2012 02:02 AM
questions on self-closing tags and legal xhtml in epubs KevinH ePub 5 04-23-2012 10:12 PM
Help with EPUb validation and closing tags book24 ePub 1 05-24-2011 05:16 PM
Release 0.7.54 - Mobi self-closing tags Moonraker Calibre 2 04-09-2011 07:35 AM


All times are GMT -4. The time now is 11:53 PM.


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