|  02-12-2009, 05:54 PM | #1 | 
| Guru            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' | 
|   |   | 
|  02-12-2009, 07:14 PM | #2 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			html2epub = 'linearize_tables = True'
		 | 
|   |   | 
|  03-30-2009, 11:57 PM | #3 | 
| Hyperreader            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' | 
|   |   | 
|  03-31-2009, 03:34 PM | #4 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			Use underscores instead of hyphens
		 | 
|   |   | 
|  03-31-2009, 04:28 PM | #5 | 
| Hyperreader            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' Code: html2epub = 'base_font_size = 14' | 
|   |   | 
|  03-31-2009, 04:32 PM | #6 | 
| Guru            Posts: 800 Karma: 194644 Join Date: Dec 2007 Location: Argentina Device: Kindle Voyage | 
			
			should be: Code: html2epub = 'base_font_size="14pt"' | 
|   |   | 
|  03-31-2009, 05:22 PM | #7 | 
| Hyperreader            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/')] | 
|   |   | 
|  03-31-2009, 05:31 PM | #8 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			html2epub_options
		 | 
|   |   | 
|  03-31-2009, 06:30 PM | #9 | 
| Hyperreader            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/')] | 
|   |   | 
|  03-31-2009, 06:52 PM | #10 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			my bad the option name is base_font_size2
		 | 
|   |   | 
|  03-31-2009, 11:33 PM | #11 | 
| Hyperreader            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/')] | 
|   |   | 
|  04-01-2009, 03:14 PM | #12 | 
| Guru            Posts: 800 Karma: 194644 Join Date: Dec 2007 Location: Argentina Device: Kindle Voyage | |
|   |   | 
|  04-01-2009, 03:38 PM | #13 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			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.
		 | 
|   |   | 
|  05-12-2010, 06:14 PM | #14 | 
| Member  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? | 
|   |   | 
|  05-12-2010, 06:18 PM | #15 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			conversion_options = {'linearize_tables':True}
		 | 
|   |   | 
|  | 
| Thread Tools | Search this Thread | 
| 
 | 
|  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 |