03-11-2013, 05:01 AM | #1 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
force tidy to run without saving
in previous version there was a yellow broom icon but that has now gone. I cannot see any "clean this code - now" option
I do have clean set to operate on opening / saving but can find no way to force a cleanup without saving ( and in this crummy code instance - the clean on save operation hangs up...) I had a poor source where each chapter was one paragraph with double <br class=.../> separators between sentences. I tried all regexing those into<p ... > & letting tidy insert the matching end tags but could not succeed with that approach, because I could not force tidy to run on the whole book except by saving - which hung up. I could force a tidy on a per chapter basis by toggling into book view and selecting fix automatically, but there a lot of chapters & I did not want to do them individually like that; I wanted to force a clean of the entire book. I wimped out, went to calibre & did epub to mobi, then mobi back to epub,. That sorted it, but what could/should I have done ? |
03-11-2013, 08:13 AM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Not trust on Tidy to correctly insert matching end tags? When I do a RegEx S&R which includes changing tags, I always include the closing tags. Seen to many issues with Tidy not identifying the needed end tag correctly or placing it wrong.
This is especially true for nested tags... |
Advert | |
|
03-11-2013, 10:46 AM | #3 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
I agree but could see no obvious single pass regex solution for repairing this structure:
multiple chapters like this: <body> < p class =...> 1st sentence <br class =.../> <br class=.../>2nd sentence<br class =.../> <br class=.../>3rd sentence<br class =.../> .... </p> </body> NB all classes were the same - calibre4 |
03-11-2013, 01:19 PM | #4 | |
What the Dog Saw
Posts: 311
Karma: 981684
Join Date: Jul 2008
Location: Dunn Loring
Device: Sony PRS-650, Surface3
|
Quote:
1. In code view, right click anywhere in the code view window. 2. Select "Reformat HTML" 3. Click on "Clean Source" to clean the file in current tab only 4. Click on "Clean Source - All HTML Files" to clean the entire epub book |
|
03-11-2013, 01:46 PM | #5 | |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
|
|
Advert | |
|
03-15-2013, 12:05 PM | #6 |
Sigil Addict
Posts: 14
Karma: 10
Join Date: Aug 2012
Device: Apple iPad Air 2
|
I've been looking for this also. Thank you!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
'RUN, RUN, RUN' a crime thriller $1.61 | tothepoint | Self-Promotions by Authors and Publishers | 10 | 09-01-2014 12:07 PM |
Journal Not Saving Writing When Moving to a New Page or Saving it | eberhardt333 | enTourage Archive | 5 | 11-24-2010 12:47 AM |
[Apple]Java Embedding Plugin 0.9.2: Force java to run in browsers other than Safari | Zire | Lounge | 4 | 05-24-2005 09:12 PM |