Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-14-2014, 11:05 AM   #16
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Would a calibre conversion rationalize the sgc classes together?
eschwartz is offline   Reply With Quote
Old 09-14-2014, 12:41 PM   #17
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The solution to this problem is to turn OFF Tidy from munching on the code and spitting out pre-chewed code. In the preferences, you can turn off Tidy to munch on your code and just use it to pretty the code or to do nothing at all.
JSWolf is offline   Reply With Quote
Advert
Old 09-14-2014, 03:24 PM   #18
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,067
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 eschwartz View Post
Would a calibre conversion rationalize the sgc classes together?
You trying to do Humans out of a job
theducks is offline   Reply With Quote
Old 09-14-2014, 09:31 PM   #19
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by eschwartz View Post
Would a calibre conversion rationalize the sgc classes together?
Yes!

Just convert epub to epub and it pulled all the style sections out of the xhtml and now there are 20 defined in stylesheet.css, where before there was 9.

Now I can simplify and adjust the styles.

The difference I guess is that HTMLtidy was designed to process HTML files one at a time, not as a group, as a conversion must.
AlanHK is offline   Reply With Quote
Old 09-14-2014, 10:07 PM   #20
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
It is ironic that a calibre conversion would make the code easier to read.
eschwartz is offline   Reply With Quote
Advert
Old 09-14-2014, 10:08 PM   #21
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You do know that converting ePub > ePub is a really bad idea and the best idea is to start over by first turning off Tidy? Please don't listen to such bad advise as to do a needless conversion.
JSWolf is offline   Reply With Quote
Old 09-14-2014, 10:10 PM   #22
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by JSWolf View Post
You do know that converting ePub > ePub is a really bad idea and the best idea is to start over by first turning off Tidy? Please don't listen to such bad advise as to do a needless conversion.
Oh, do you have the original source?
eschwartz is offline   Reply With Quote
Old 09-14-2014, 10:12 PM   #23
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by eschwartz View Post
Oh, do you have the original source?
AlanHK should have the original source. And even if all that's available is the version modified by Tidy, just fix that. It's better then a needless conversion.
JSWolf is offline   Reply With Quote
Old 09-14-2014, 11:49 PM   #24
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by JSWolf View Post
AlanHK should have the original source. And even if all that's available is the version modified by Tidy, just fix that. It's better then a needless conversion.
Of course I don't have the original source.
I wouldn't have asked where the "sgc" styles came from as I would have known, and I wouldn't have been trying to reverse them if I could just revert.

As for "just fix that", no one had a solution aside from editing 80 files one by one.

Calibre did it in one operation with as far as I can see, no collateral damage.
Now I'm unifying and simplifying the styles, which are all defined in one file.
AlanHK is offline   Reply With Quote
Old 09-15-2014, 08:32 AM   #25
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I know 80 files to edit can seem like a lot, but it's not as difficult as it seems. Besides, doyou really want to change the code and make it harder should you want to edit something?
JSWolf is offline   Reply With Quote
Old 09-15-2014, 09:55 AM   #26
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by JSWolf View Post
I know 80 files to edit can seem like a lot, but it's not as difficult as it seems. Besides, doyou really want to change the code and make it harder should you want to edit something?
Editing 80 similar, but not exactly the same, blocks of code, I'm bound to get bored and quite likely make mistakes.

Anyway, I've already done the Calibre conversion and as I said, there is no noticeable collateral damage.
Calibre, as its wont, changed the names of some styles, but that was easily fixed when I reviewed the styles, which I could only do after they were all consolidated in the css file. The previous style names were just as arbitrary. But now they are consistent and all defined in one place.

The whole point was to make a file that was easier to edit, and it is.

I'm not destroying carefully and logically laid out book, I'm trying to make one from one rather sloppily created. Only started doing it because the quote marks were typewriter style. That shows the level of professionalism. Nitpicks to most but things I care about.


Please give an example of the kind of damage you think this has done and I will look into it.
Have you actually ever done a Calibre epub-epub conversion?
Other products of Calibre conversion may be bloated piles of spaghetti, but this one at least seems quite clean.

Example:

BEFORE
Quote:
<p class="p6 sgc-2">June 26, 1996</p>

<p class="p5"></p>

<p class="p6">Arthur Gordon stood in the darkness by the bank of the Rogue River, having walked a dozen yards away from his house and family and guests, momentarily weary of company. He stood six feet two inches in height, losing no more than an inch to a slight stoop. His hair was a dusty brown color, his eyebrows a lighter shade of the same. He had a well-proportioned frame and a sufficient amount of muscle, but he lacked any trace of fat; his muscles showed clearly beneath the skin, giving him an appearance of thinness.</p>
AFTER
Quote:
<p class="p5">June 26, 1996</p>

<p class="p4"></p>

<p>Arthur Gordon stood in the darkness by the bank of the Rogue River, having walked a dozen yards away from his house and family and guests, momentarily weary of company. He stood six feet two inches in height, losing no more than an inch to a slight stoop. His hair was a dusty brown color, his eyebrows a lighter shade of the same. He had a well-proportioned frame and a sufficient amount of muscle, but he lacked any trace of fat; his muscles showed clearly beneath the skin, giving him an appearance of thinness.</p>
In the original, "sgc-2" meant something different in each file. In the converted one, "p5" means bold throughout, and I can safely rename it to that. I had already renamed whatever the body text class was to just p after moving the definitions around.

Last edited by AlanHK; 09-15-2014 at 10:28 AM.
AlanHK is offline   Reply With Quote
Old 09-15-2014, 02:45 PM   #27
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
One thing I; have found is not every XML file got changed to have a SGC type style. So I doubt it would have been all 80 files needing edited. And even if so, just do so much at a time and stop. Then later on, go back and do more. It's not difficult and it doesn't take that long to fix. Plus, you don't then have to change all the calibre styles back to what you had before which (IMHO) is actually more work.
JSWolf is offline   Reply With Quote
Old 09-15-2014, 02:57 PM   #28
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by JSWolf View Post
One thing I; have found is not every XML file got changed to have a SGC type style. So I doubt it would have been all 80 files needing edited. And even if so, just do so much at a time and stop. Then later on, go back and do more. It's not difficult and it doesn't take that long to fix. Plus, you don't then have to change all the calibre styles back to what you had before which (IMHO) is actually more work.
Did you totally ignore the previous post?
eschwartz is offline   Reply With Quote
Old 09-16-2014, 02:09 AM   #29
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by JSWolf View Post
One thing I; have found is not every XML file got changed to have a SGC type style. So I doubt it would have been all 80 files needing edited. And even if so, just do so much at a time and stop. Then later on, go back and do more. It's not difficult and it doesn't take that long to fix. Plus, you don't then have to change all the calibre styles back to what you had before which (IMHO) is actually more work.
I'm with AlanHK on this. I had a to fix a 30 or 40 chapter book recently. About halfway through, probably about 30 minutes, I realised I'd messed up and had to start again. So, I tried a conversion first and was able to fix it all in about 10 minutes.

Yes, a calibre conversion can do some not so desirable things. But, it does it in a very controlled manner that is easily worked with in the editors.
davidfor is offline   Reply With Quote
Old 09-16-2014, 06:53 AM   #30
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Especially compared to the REAL hideousness of HTML Tidy. I would rather be cleaning a horrible per book CSS, than a really horrible per chapter CSS.
Tex2002ans is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature Request: configurable space setting for "Insert blank line" in "Look & Feel" therealjoeblow Calibre 15 07-25-2011 03:14 PM
Calibre install -- "styles" folder on my desktop? corona Calibre 2 10-17-2010 07:43 PM


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


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