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 06-09-2012, 04:26 AM   #31
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 110
Karma: 1124406
Join Date: May 2011
Location: Doncaster UK
Device: Kobo Touch, Nook Simple
I tested it last night and after I changed the date format at line 13 it worked well. I will certainly be using it.

One minor point. I have problems seing some colours, especially yellow. Could you change the highlighting of the styles to cyan or green and repost.

Thanks

Quote:
Originally Posted by mmat1 View Post
I made a small Excel-Tool wich reads the files in Sigil's "scratchpad" and covers most of the requested features.

Maybe somebody find's it useful ...

Last edited by Thasaidon; 06-09-2012 at 04:27 AM. Reason: fumble fingers
Thasaidon is offline   Reply With Quote
Old 06-09-2012, 08:32 AM   #32
mmat1
Det
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 980
Karma: 1300318
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by Thasaidon View Post
I tested it last night and after I changed the date format at line 13 it worked well. I will certainly be using it.

One minor point. I have problems seing some colours, especially yellow. Could you change the highlighting of the styles to cyan or green and repost.

Thanks
"date format at line 13" ???? What's this ? If you are talking about the date in the "FindScratchpad"-Function, you're right, i gave it a more international shape...

And now you can give the highlighting any ugly color you want , i built in a user-interface to define the colors....
mmat1 is offline   Reply With Quote
Old 06-09-2012, 12:32 PM   #33
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 110
Karma: 1124406
Join Date: May 2011
Location: Doncaster UK
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by mmat1 View Post
"date format at line 13" ???? What's this ? If you are talking about the date in the "FindScratchpad"-Function, you're right, i gave it a more international shape...

That was the one.

And now you can give the highlighting any ugly color you want , i built in a user-interface to define the colors....
Thanks very much. That will make it easier on my eyes. I have been using the spreadsheet all afternoon. I find it very useful!
Thasaidon is offline   Reply With Quote
Old 06-09-2012, 07:20 PM   #34
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 544
Karma: 64420
Join Date: Feb 2010
Device: none
FWIW, I tried it in LibreOffice v. 3.5.3.2, but it fails with an error

"BASIC syntax error. Symbol expected" at this code (among several):
Code:
Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Option Explicit
 Type file       <=== error at this line
  name As String
  size As Long
 End Type
and as far as I can tell, the syntax is right. Needless to say, I'm not much of an OO Basic or VBA programmer.
st_albert is offline   Reply With Quote
Old 06-10-2012, 03:52 AM   #35
mmat1
Det
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 980
Karma: 1300318
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by st_albert View Post
FWIW, I tried it in LibreOffice v. 3.5.3.2, but it fails with an error

"BASIC syntax error. Symbol expected" at this code (among several):
Code:
Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Option Explicit
 Type file       <=== error at this line
  name As String
  size As Long
 End Type
and as far as I can tell, the syntax is right. Needless to say, I'm not much of an OO Basic or VBA programmer.
You can be sure that the syntax is right - from the point of view of Excel.

Maybe LO doesn't support user defined types.

But the more probale reason is that it collides with the reserved names of LO. Replace "file" with "datei" (or "ficher" ) in the "Type" and in the "Dim" - declaration and see if it works.
mmat1 is offline   Reply With Quote
Old 06-10-2012, 01:13 PM   #36
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 544
Karma: 64420
Join Date: Feb 2010
Device: none
Thanks for your reply.


Quote:
Originally Posted by mmat1 View Post
You can be sure that the syntax is right - from the point of view of Excel.

Maybe LO doesn't support user defined types.
According to a couple of OpenOffice (Not LibreOffice, but still...) message boards I ran across, it does support user defined types, and with that same syntax.

Quote:
Originally Posted by mmat1 View Post
But the more probale reason is that it collides with the reserved names of LO. Replace "file" with "datei" (or "ficher" ) in the "Type" and in the "Dim" - declaration and see if it works.
I tried this also (changed it to my_file), but got the same error.

I also wondered if the actual error (from LO's point of view) occurred earlier in the module, and the line it indicated was merely where the interpreter realized there was an error, not the actual error itself. But messing with the two lines above the type declaration did not help either. Oh, well.
st_albert is offline   Reply With Quote
Old 06-10-2012, 02:38 PM   #37
mmat1
Det
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 980
Karma: 1300318
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by st_albert View Post
... indicated was merely where the interpreter realized there was an error, not the actual error itself. But messing with the two lines above the type declaration did not help either. Oh, well.
I got an old OO3.3 and a machine (even older) an had a look on that.

You're right, but looked into the wrong direction
It's the variable "name" (the first of each Type), which hurts.

I'll fix that for the next release, but the next problem will be to replace the "Get" somehow. In MSO, it reads the whole file into a string, in OO it's unknown (Maybe not in LO). That's probably not fixed with a simple replace...
mmat1 is offline   Reply With Quote
Old 06-12-2012, 04:23 AM   #38
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,489
Karma: 13518189
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by DiapDealer View Post
I love calibre, but If I just spent a long time getting the ePub's code into the shape I wanted, an epub to epub conversion with calibre is going to literally destroy a big chunk of my work.

Just a side-note... I'd be interested in the reverse of this idea as well: finding orphaned classes assigned to elements in the xhtml that aren't represented in the stylesheet.
+1 for orphaned classes. To me, THAT idea is far more important than deleted unused styles from a ss.

Hitch
Hitch is offline   Reply With Quote
Old 06-12-2012, 05:49 AM   #39
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 1,439
Karma: 846401
Join Date: Jan 2009
Device: KoboGlo
Quote:
Originally Posted by Hitch View Post
+1 for orphaned classes.../...
Sounds indeed very useful too. Any idea on how to implement it?

What would be the generic search strings to look for these elements in the xhtml files?
roger64 is offline   Reply With Quote
Old 06-12-2012, 06:05 AM   #40
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,489
Karma: 13518189
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by roger64 View Post
Sounds indeed very useful too. Any idea on how to implement it?

What would be the generic search strings to look for these elements in the xhtml files?
Well...the iterations would be fairly massive, I'd think.

I mean, you'd have to (I don't program, so--those with real brains, leap in) aggregate ALL the styles and elements; probably doing so from the top-down, so most-used to least-used makes the most sense; search for all instances of "p," first, and then all classes used in the ePUB--and then do a string-match in the CSS...does that sound right, ye olden programmers? I mean, it seems more efficient to do it by element and then by class, but sometimes, what seems elementary (sorry, sorry, you guys KNOW I can't resist bad punnage!) isn't.

We use something SOMEWHAT like this in two places; we have a PERL script and an NTPro script that both check for this--but it's in the HTML. I don't know how we'd adopt it to run inside Sigil, unless we took the additional steps of copying the file, merging it, and exploding it, but even so...it would be a SLICK addition in Sigil. I would infinitely rather the "used in the ePUB but not in the stylesheet" functionality than simply cleaning up the Stylesheet. I know some folks need that--and it would be nice fudge topping--but it's not as needed as the inverse. We have a House CSS that we use, so cleanup isn't as important for us, in the CSS itself...but I think everyone would love the missing classes thing.

JMHO,
Hitch
Hitch is offline   Reply With Quote
Old 06-12-2012, 01:00 PM   #41
mmat1
Det
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 980
Karma: 1300318
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Shameless selfpromothion

Quote:
Originally Posted by Hitch View Post
+1 for orphaned classes. To me, THAT idea is far more important than deleted unused styles from a ss.
Hitch
Thats what this excel-thing above actually should do (with some restrictions)...
mmat1 is offline   Reply With Quote
Old 06-12-2012, 03:09 PM   #42
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: 37,644
Karma: 18475502
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by Hitch View Post
+1 for orphaned classes. To me, THAT idea is far more important than deleted unused styles from a ss.

Hitch
It sounds like it should not be too hard to combine the two to find classes that do not exist in the CSS and CSS classes that do not exist in the XML.

A popular class used is <body class="text"> where text does not exist in the CSS. Also, dived classes are used at the beginning of a chapter that have no CSS style. I tend to remove the divs that div for the chapter title and then div for the body. No need of them at all.
JSWolf is online now   Reply With Quote
Old 06-12-2012, 03:10 PM   #43
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: 37,644
Karma: 18475502
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by Hitch View Post
Well...the iterations would be fairly massive, I'd think.

I mean, you'd have to (I don't program, so--those with real brains, leap in) aggregate ALL the styles and elements; probably doing so from the top-down, so most-used to least-used makes the most sense; search for all instances of "p," first, and then all classes used in the ePUB--and then do a string-match in the CSS...does that sound right, ye olden programmers? I mean, it seems more efficient to do it by element and then by class, but sometimes, what seems elementary (sorry, sorry, you guys KNOW I can't resist bad punnage!) isn't.

We use something SOMEWHAT like this in two places; we have a PERL script and an NTPro script that both check for this--but it's in the HTML. I don't know how we'd adopt it to run inside Sigil, unless we took the additional steps of copying the file, merging it, and exploding it, but even so...it would be a SLICK addition in Sigil. I would infinitely rather the "used in the ePUB but not in the stylesheet" functionality than simply cleaning up the Stylesheet. I know some folks need that--and it would be nice fudge topping--but it's not as needed as the inverse. We have a House CSS that we use, so cleanup isn't as important for us, in the CSS itself...but I think everyone would love the missing classes thing.

JMHO,
Hitch
I would think that finding orphaned classes and unused style classes should be the job of FlightCrew.
JSWolf is online now   Reply With Quote
Old 06-12-2012, 03:16 PM   #44
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,256
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JSWolf View Post
I would think that finding orphaned classes and unused style classes should be the job of FlightCrew.
Why? They don't break any ePub rules.

Validation tools should stick to spec stuff... not stuff that simply annoys some of us more obsessive/compulsive coders out there.
DiapDealer is online now   Reply With Quote
Old 06-12-2012, 03:19 PM   #45
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: 37,644
Karma: 18475502
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by DiapDealer View Post
Why? They don't break any ePub rules.

Validation tools should stick to spec stuff... not stuff that simply annoys some of us more obsessive/compulsive coders out there.
XML doesn't allow orphaned classes. So yes, it does break the XML rules and thus breaks the ePub rules. But, unused styles are not breaking anything.
JSWolf is online now   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
Buy Broken or unused readers for the Museum eBookLuke Flea Market 14 05-06-2012 11:30 AM
Free Broken or unused readers for the Museum eBookLuke Flea Market 0 05-22-2011 06:52 AM
How often should an unused Kobo be charged? Gary_M_Mugford Kobo Reader 2 10-30-2010 10:38 PM
Unutterably Silly Zelda's gallery of used and unused avatars Wetdogeared Lounge 40 05-16-2009 11:31 AM
iLiad The six unused connections design256 iRex Developer's Corner 10 09-13-2006 08:52 AM


All times are GMT -4. The time now is 10:14 PM.


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