Register Guidelines E-Books Today's Posts Search

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: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
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: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
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
Advert
Old 05-22-2013, 04:27 AM   #3
exaltedwombat
Guru
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: 878
Karma: 2457540
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: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
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: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
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
Advert
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: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
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
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
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: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
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
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
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: 28,548
Karma: 204127028
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
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: 31,019
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Promoting and Demoting headers were sections included in the Saved Searches 'Samples'
theducks is online now   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: 28,548
Karma: 204127028
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
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: 31,019
Karma: 60358908
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 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 online now   Reply With Quote
Reply


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 10:14 PM.


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