![]() |
#316 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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? |
![]() |
![]() |
#317 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
Advert | |
|
![]() |
#318 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
#319 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
#320 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
New recipe for Mexican news portal El universal:
|
![]() |
Advert | |
|
![]() |
#321 |
Junior Member
![]() 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.
|
![]() |
![]() |
#322 |
Junior Member
![]() 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 |
![]() |
![]() |
#323 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
New recipe for Miami herald
|
![]() |
![]() |
#324 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Mar 2009
Device: Kindle2
|
Thanks kiklop74, you're amazing.
|
![]() |
![]() |
#325 |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
![]() Dependencies: php5-cli php5-curl php5-tidy |
![]() |
![]() |
#326 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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?
|
![]() |
![]() |
#327 |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. ![]() |
![]() |
![]() |
#328 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
#329 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
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> "' |
![]() |
![]() |
#330 |
Connoisseur
![]() ![]() ![]() 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 |
![]() |
![]() |
|
![]() |
||||
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 |