Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 06-23-2010, 10:24 PM   #31
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
extra css is not used by the recipe system. You have to use the extra_css field in the recipe itself for that.
kovidgoyal is offline   Reply With Quote
Old 06-23-2010, 11:04 PM   #32
marcot
Member
marcot began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2010
Device: iPod Touch
Thanks!

It seems to me that the navigation bar style should be consistent across all recipes, no? I wonder whether it would make sense (and whether it is feasible) to modify the code so that the "extra-css" would override the recipe-defined "extra_css" field. Hummmm... (tinker, tinker).

Last edited by marcot; 06-29-2010 at 09:53 AM.
marcot is offline   Reply With Quote
Advert
Old 06-29-2010, 04:17 PM   #33
dirtygreek
Member
dirtygreek began at the beginning.
 
Posts: 18
Karma: 46
Join Date: Jun 2010
Device: Nook
OK, I feel silly for being unable to find it, but where can I edit the content server's source files? I have the newest version in Linux. Figured they'd be somewhere in /opt/calibre, but I can't find them...

EDIT: I found the stuff in the resources folder!

Last edited by dirtygreek; 06-29-2010 at 04:21 PM.
dirtygreek is offline   Reply With Quote
Old 07-16-2010, 05:55 PM   #34
thp1017
Connoisseur
thp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavens
 
Posts: 82
Karma: 13557
Join Date: Jul 2010
Location: Albuquerque, NM
Device: Kobo, KT, KGlo, H2O, Libra
removing (essentially) all formatting?

While the css generator is very cool if you are working with input files from the same source, which are well-formatted, I've had some trouble if I'm converting books from various sources into a common output style for my kobo.

Personally, I'd to have something like all text in paragraph blocks set to 1em, with the line height at 0.9-ish em, with the rest of the tags just set to default (no scaling of line height in these, actually). If my input file has font-size, class, etc tags, that can become a real pain to achieve.

What I personally would love to see, is an option where, to a certain extent, the css generator ignore *all* attributes to the various html tags - so just keep <h1>, <h2>, ..., <p>, bold, italic, and so on - and ignore any and all attributes setting widths, heights, etc, and any css files and classes specified. Then what I'd see on my kobo is fairly consistent across all books!

The question is, then, is there a way to do this currently that I'm totally missing? I've dug around in the code some, and so far I can see where you might make changes to do this (cssflat, stylizer?), but I'm totally unfamiliar with python (more of a c++/java, plus some perl and bash scripting person)... any suggestions would be appreciated!
thp1017 is offline   Reply With Quote
Old 07-16-2010, 07:21 PM   #35
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you want to neglect style information in style attibutes, the easiest way is to just stop the parsing of those attributes. Look at the __init__ method in Stylizer that's where all css from the input document is read and parsed.
kovidgoyal is offline   Reply With Quote
Advert
Old 07-16-2010, 08:41 PM   #36
thp1017
Connoisseur
thp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavensthp1017 is a rising star in the heavens
 
Posts: 82
Karma: 13557
Join Date: Jul 2010
Location: Albuquerque, NM
Device: Kobo, KT, KGlo, H2O, Libra
On the one hand, that sounds great! on the other, I'm feeling lazy and not wanting to deal with installing all of the needed packages/libraries to get things complied and running in cygwin (although I'm surprised not everything I needed was there, I did a full cygwin install!)... especially when I can put together some somewhat nasty bash scripts to do the same thing

but maybe something other people might be interested in, if I get motivated at some point...
thp1017 is offline   Reply With Quote
Old 07-16-2010, 10:44 PM   #37
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Running calibre from source is trivial, instructions are in the user manual.
kovidgoyal is offline   Reply With Quote
Old 07-22-2010, 12:46 PM   #38
fab0109
Junior Member
fab0109 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2010
Device: kobo
No NavBar

i am using with success this

extra_css = '''
.calibre_navbar {display: none;}
.calibre_navbar1 {display: none;}
.calibre_navbar2 {display: none;}
'''

Could the NoNavBar be a device parameters ?

For example kobo does not support it, at this time, i need to update every recipe that i used ...

Thanks
fab0109 is offline   Reply With Quote
Old 07-22-2010, 12:50 PM   #39
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
When you say "doesn't support it" what do you mean?
kovidgoyal is offline   Reply With Quote
Old 07-22-2010, 07:14 PM   #40
fab0109
Junior Member
fab0109 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2010
Device: kobo
No NavBar

"kobo does not support it"

AFAIK They are no way to select and follow NavBar link on the kobo eReader

In fact to follow any EPUB link

Fabrice
fab0109 is offline   Reply With Quote
Old 07-22-2010, 07:24 PM   #41
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ah well, just leave it in there, it just takes up one line of screen real estate.
kovidgoyal is offline   Reply With Quote
Old 08-28-2010, 01:20 AM   #42
WebDesignEbooks
Member
WebDesignEbooks began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Aug 2010
Location: Canada
Device: Sony
Quote:
Originally Posted by kovidgoyal View Post
calibre does not strip away styles, it consolidates them into a single stylesheet.
What happens when the original HTML file uses an external stylesheet?

All I have found so (did read some posts and the tutorial on compiling your ebook) are is references to the built in CSS screen and using internal stylesheet.

This is my first day here, sorry if I asked this in the wrong thread.
WebDesignEbooks is offline   Reply With Quote
Old 08-28-2010, 01:21 AM   #43
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That is also consolidated
kovidgoyal is offline   Reply With Quote
Old 08-28-2010, 01:32 AM   #44
WebDesignEbooks
Member
WebDesignEbooks began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Aug 2010
Location: Canada
Device: Sony
Quote:
Originally Posted by kovidgoyal View Post
That is also consolidated
Thanks for the quick reply!

Just to be clear,
Can I do all the CSS in an external stylesheet and skip the CSS screen? Have the template already all done in XHTML 1.0 Strict w/ external CSS file with the plan of recycling for each new title created.
WebDesignEbooks is offline   Reply With Quote
Old 08-28-2010, 01:36 AM   #45
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yes, provided all the html files link to the sheet
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom CSS for output deckoff Calibre 1 08-29-2010 12:55 AM
ePub with custom .css on a 505 dicknskip Sony Reader Dev Corner 3 06-10-2010 12:34 AM
User stylesheets for ePub files salty-horse Sony Reader Dev Corner 12 02-23-2010 08:44 AM
ePub conversion: override existing css with a custom one sbin Calibre 1 01-09-2010 05:03 AM
Calibre's generated css for epub brewt Calibre 7 12-29-2008 10:59 AM


All times are GMT -4. The time now is 02:26 PM.


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