Register Guidelines E-Books Today's Posts Search

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

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 03-03-2009, 01:46 PM   #316
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
@Kovid

May I ask why are you not adding russian recipes I posted in this thread? Should I add separate issue in trac or there is some other reason?
kiklop74 is offline  
Old 03-03-2009, 01:55 PM   #317
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: 45,379
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'll add them once calibre supports font embedding in EPUB. Otherwise users trying to use the recipes will end up with EPUB files that don't work.
kovidgoyal is offline  
Advert
Old 03-03-2009, 02:05 PM   #318
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
I see. I just have to note that recipes do work on Sony reader provided that user manually place adequate font in reader's internal memory.
kiklop74 is offline  
Old 03-03-2009, 02:09 PM   #319
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: 45,379
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yeah I know, but since a new user wont know that, I'll keep getting bug reports about the recipes.
kovidgoyal is offline  
Old 03-03-2009, 02:29 PM   #320
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
New recipe for Mexican news portal El universal:
Attached Files
File Type: zip eluniversal.zip (1.6 KB, 340 views)
kiklop74 is offline  
Advert
Old 03-03-2009, 02:31 PM   #321
jbanos
Junior Member
jbanos began at the beginning.
 
jbanos's Avatar
 
Posts: 2
Karma: 10
Join Date: Mar 2009
Location: Mexico
Device: Sony PRS-505
Gracias Kiklop74, you are very fast, I can see from your recipe where my mistke was.
jbanos is offline  
Old 03-05-2009, 11:08 PM   #322
jcastr
Junior Member
jcastr began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2009
Device: Kindle2
Hello,
If possible, could you post a recipe for the Miami Herald, http://www.miamiherald.com/rss/. Thanks in advance.

Jcastr
jcastr is offline  
Old 03-06-2009, 04:42 PM   #323
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
New recipe for Miami herald
Attached Files
File Type: zip miamiherald.zip (1.9 KB, 317 views)
kiklop74 is offline  
Old 03-06-2009, 04:54 PM   #324
jcastr
Junior Member
jcastr began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2009
Device: Kindle2
Thanks kiklop74, you're amazing.
jcastr is offline  
Old 03-07-2009, 12:30 PM   #325
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Question, how do I force page breaks in news recipes? I tried adding: extra_css = .chapter { page-break-before: always } but I think Calibre is overriding it by adding: style="page-break-before:avoid;page-break-after:avoid" to every <div class="chapter"> entry.

I also tried adding: <span style="page-break-before: always"></span> before <div class="chapter"> to the print version but it looks like those lines are just being stripped away. Pretty sure this is a news specific behavior since using the command line html2epub on the individual print version gives me a really nice epub with page breaks.

Code:

#!/usr/bin/env  python

__license__   = 'GPL v3'
__copyright__ = '2009, tifa1984'
'''
www.fanfiction.net
'''

import string, re
from calibre.web.feeds.news import BasicNewsRecipe

class FFNetFeed(BasicNewsRecipe):
	title	= u'FFNetFeed'
	__author__	= 'FanFiction.Net'
	description	= 'unleash your imagination'
	
	oldest_article = 7
	
	extra_css = .chapter { page-break-before: always }
	
	feeds	= [
		('Rurouni Kenshin - Kaoru/Kenshin', 'http://www.fanfiction.net/atom/l/355/10/0/1/1/0/410/411/0/0/')
		]
	
	def print_version(self, url):
		main, sep, rest = url.rpartition('/1/')
		rmain, rsep, storyid = main.rpartition('/s/')
		return 'http://localhost/flag/print.php?source=ffnet&format=news&storyid=' + storyid
I'm attaching the PHP scripts I used for generating the print version along with some sample HTML output. I'm trying to convert the algorithm to a Calibre recipe but alas, it's taking me a long time to do so.

Dependencies:
php5-cli
php5-curl
php5-tidy
Attached Files
File Type: zip flag.zip (12.8 KB, 311 views)
File Type: zip sample.zip (141.7 KB, 311 views)
ilovejedd is offline  
Old 03-07-2009, 12:41 PM   #326
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: 45,379
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Befor I debug this, why aren't you just fetching the stories directly from fanfiction.net?
kovidgoyal is offline  
Old 03-07-2009, 01:40 PM   #327
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
I already do if I find a specific story I like or one which shows promise. Individual fanfics get automatically converted to epub format complete with table of contents, tags and summary.

I made a recipe for Calibre to automate periodic downloads of new or updated fanfics from the categories I visit. Sort of a "sample pack" to read on my iPhone. As many gems as I've found on ff.net, I often have to wade through the muck to find them. Unfortunately, iPhone+Safari+AT&T EDGE makes wading through the muck a very unpleasant experience. Stanza is ideal in this regard since I can easily choose a different story from the table of contents. It's just that not having page breaks in between chapters is bugging me (pardon the pun).

However, I thought this would just take a simple fix in the recipe or print version. The PHP scripts and sample HTML were attached due to my obsessive-compulsive behavior to give as much information as possible.

If it will take you a significant amount of time to trace and fix this non-error, then never mind. I can live without the page breaks.
ilovejedd is offline  
Old 03-07-2009, 01:43 PM   #328
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: 45,379
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ah well yeah it would take a bit of time to debug this, so I'm going to pass.
kovidgoyal is offline  
Old 03-07-2009, 05:05 PM   #329
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 ilovejedd View Post
Question, how do I force page breaks in news recipes?
If you really want to force use of some css you need to use following method in the recipe (in case of EPUB format):

Code:
    html2epub_options = 'override_css=" <some CSS> "'
This places your css rule as the last css in every css file and thus enforces it regardless of what calibre previously does.
kiklop74 is offline  
Old 03-07-2009, 05:34 PM   #330
etherspin
Connoisseur
etherspin has a complete set of Star Wars action figures.etherspin has a complete set of Star Wars action figures.etherspin has a complete set of Star Wars action figures.
 
Posts: 79
Karma: 292
Join Date: Jan 2009
Device: none
is there a certain kind of news source / blog this is not suitable for ?
If anyone was up for the task (consider that a request !) it would be great to see treehugger or ecogeek as a news source
etherspin is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom column read ? pchrist7 Calibre 2 10-04-2010 02:52 AM
Archive for custom screensavers sleeplessdave Amazon Kindle 1 07-07-2010 12:33 PM
How to back up preferences and custom recipes? greenapple Calibre 3 03-29-2010 05:08 AM
Donations for Custom Recipes ddavtian Calibre 5 01-23-2010 04:54 PM
Help understanding custom recipes andersent Calibre 0 12-17-2009 02:37 PM


All times are GMT -4. The time now is 12:38 AM.


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