View Single Post
Old 04-11-2011, 12:49 PM   #7
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by Perkin View Post
From a couple of testsd I've been able to do, I was going to copy the oeb2html and adapt it's output so instead of actual html it then output Textile code (and just as easily Markdown). With the 'inline' options of the convrsion, all the tags have the info needed for all the extra output, such as text-indent and text align, that aren't part of the normal tags.
I'll put together a simplier skeleton class later today for you. If your not going to use the lxml or the sgml parser we have a lot more flexibility. I'll show you how to use the stylizer class in the skeleton class to access the a specific style easily as you need to.

Quote:
Originally Posted by Perkin View Post
I was also thinking that...
Some ballpark figures will have to be used, such as text-indent:0.8em; would be converted to 1em which would be represented by a '(' in the paragraph/heading start tag. Probably round up >.5 and <1.5
Look at txtml. Rounded figures are used in it. You should use the same rounding to keep the outputs consistant. txtml also uses a similar class desing as the oeb2html and handles top / bottom margins for soft scene breaks.
user_none is offline   Reply With Quote