Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-12-2009, 05:54 PM   #1
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
How to specify command line option for epub format

I assume feeds2epub uses internaly html2epub to do the actual conversion. Therefore to control the output in a specific way we would need to pass some command line options. My question is how to do that from the recipe?

html2epub_options does not permit to put option like --linearize-tables

If I do that I receive an error
Code:
    html2epub_options = '--linearize-tables'
Is there a way to do this?
kiklop74 is offline   Reply With Quote
Old 02-12-2009, 07:14 PM   #2
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
html2epub = 'linearize_tables = True'
kovidgoyal is offline   Reply With Quote
Advert
Old 03-30-2009, 11:57 PM   #3
Hypernova
Hyperreader
Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.
 
Posts: 130
Karma: 28678
Join Date: Feb 2009
Device: Current: Boox Leaf2 (broken) Past: H2O, Kindle PW1, DXG;Pocketbook 360
I decide not to make a new thread and just asking here first, since it seems relevent to the original quesiton.

I want to change the base font size for epub format. How do I do that in recipe? I though it would be
Code:
    html2epub_options = 'base-font-size = 14'
but it isn't. I tried some other code for an hour and now out of idea.
Hypernova is offline   Reply With Quote
Old 03-31-2009, 03:34 PM   #4
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use underscores instead of hyphens
kovidgoyal is offline   Reply With Quote
Old 03-31-2009, 04:28 PM   #5
Hypernova
Hyperreader
Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.
 
Posts: 130
Karma: 28678
Join Date: Feb 2009
Device: Current: Boox Leaf2 (broken) Past: H2O, Kindle PW1, DXG;Pocketbook 360
Still not working for some reason. Did I do it right?
Code:
html2epub_options = 'base_font_size = 14'
I also tried
Code:
html2epub = 'base_font_size = 14'
as well. It doesn't work either.
Hypernova is offline   Reply With Quote
Advert
Old 03-31-2009, 04:32 PM   #6
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
should be:

Code:
html2epub = 'base_font_size="14pt"'
kiklop74 is offline   Reply With Quote
Old 03-31-2009, 05:22 PM   #7
Hypernova
Hyperreader
Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.
 
Posts: 130
Karma: 28678
Join Date: Feb 2009
Device: Current: Boox Leaf2 (broken) Past: H2O, Kindle PW1, DXG;Pocketbook 360
Still doesn't work. Here's the full recipe:
Code:
from calibre.web.feeds.news import BasicNewsRecipe
class FanFiction(BasicNewsRecipe):
    title          = u'FanFiction'
    oldest_article = 10000
    max_articles_per_feed = 10
    use_embedded_content  = False
    remove_javascript     = True
    no_stylesheets        = True
    keep_only_tags     = [dict(name='div', attrs={'id':'storytext'})]

    html2epub = 'base_font_size="14pt"'
    
    feeds          = [(u'Spiral', u'http://www.fanfiction.net/atom/l/1702/10/0/1/1/0/9281/9284/2/0/')]
Did I do something wrong?
Hypernova is offline   Reply With Quote
Old 03-31-2009, 05:31 PM   #8
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
html2epub_options
kovidgoyal is offline   Reply With Quote
Old 03-31-2009, 06:30 PM   #9
Hypernova
Hyperreader
Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.
 
Posts: 130
Karma: 28678
Join Date: Feb 2009
Device: Current: Boox Leaf2 (broken) Past: H2O, Kindle PW1, DXG;Pocketbook 360
Code:
from calibre.web.feeds.news import BasicNewsRecipe
class FanFiction(BasicNewsRecipe):
    title          = u'FanFiction'
    oldest_article = 10000
    max_articles_per_feed = 10
    use_embedded_content  = False
    remove_javascript     = True
    no_stylesheets        = True
    keep_only_tags     = [dict(name='div', attrs={'id':'storytext'})]

    html2epub_options = 'base_font_size="14pt"'
    
    feeds          = [(u'Spiral', u'http://www.fanfiction.net/atom/l/1702/10/0/1/1/0/9281/9284/2/0/')]
doesn't work either. BTW, the conversion through GUI interface has no problem.
Hypernova is offline   Reply With Quote
Old 03-31-2009, 06:52 PM   #10
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
my bad the option name is base_font_size2
kovidgoyal is offline   Reply With Quote
Old 03-31-2009, 11:33 PM   #11
Hypernova
Hyperreader
Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.Hypernova solves Fermat’s last theorem while doing the crossword.
 
Posts: 130
Karma: 28678
Join Date: Feb 2009
Device: Current: Boox Leaf2 (broken) Past: H2O, Kindle PW1, DXG;Pocketbook 360
That does it, thank you!
Code:
from calibre.web.feeds.news import BasicNewsRecipe
class FanFiction(BasicNewsRecipe):
    title          = u'FanFiction'
    oldest_article = 10000
    max_articles_per_feed = 10
    use_embedded_content  = False
    remove_javascript     = True
    no_stylesheets        = True
    keep_only_tags     = [dict(name='div', attrs={'id':'storytext'})]

    html2epub_options = 'base_font_size2=14'
    
    feeds          = [(u'Spiral', u'http://www.fanfiction.net/atom/l/1702/10/0/1/1/0/9281/9284/2/0/')]
Hypernova is offline   Reply With Quote
Old 04-01-2009, 03:14 PM   #12
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by kovidgoyal View Post
my bad the option name is base_font_size2
It would be nice if you could set a page in documentation specifying all possible options recipe writer can pass to html2epub or html2lrf.
kiklop74 is offline   Reply With Quote
Old 04-01-2009, 03:38 PM   #13
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by kiklop74 View Post
It would be nice if you could set a page in documentation specifying all possible options recipe writer can pass to html2epub or html2lrf.
I will the problem is that both html2lrf and html2epub options are going to go in the new conversion system. Once that is in place, the documentation will be written for it.
kovidgoyal is offline   Reply With Quote
Old 05-12-2010, 06:14 PM   #14
davotibarna
Member
davotibarna began at the beginning.
 
davotibarna's Avatar
 
Posts: 17
Karma: 10
Join Date: Dec 2009
Location: Oslo, Norway
Device: Nook
Hi, I'd like to apply the --linearize-tables CLI option on a scheduled news recipe. It works perfectly if I run it on the command line, but I'd like to run this via the calibre scheduler.

I tried both (added into the recipe):
html2epub_options = 'linearize_tables = True'
and
html2epub = 'linearize_tables = True'
... but no effect.

What did I wrong?
davotibarna is offline   Reply With Quote
Old 05-12-2010, 06:18 PM   #15
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
conversion_options = {'linearize_tables':True}
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any command line to edit epub meta data? bthoven Calibre 1 03-25-2010 07:26 AM
Any command line to edit epub meta data? bthoven ePub 2 03-25-2010 04:15 AM
Where are the command line tools? PaulChernoch Calibre 17 10-23-2009 12:08 PM
Why use the command line? slantybard Calibre 6 07-22-2009 12:17 PM
Errors on Command Line drnkusv Calibre 11 11-07-2008 02:59 PM


All times are GMT -4. The time now is 05:07 AM.


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