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 02-01-2010, 05:56 AM   #1321
Sischa
Evangelist
Sischa knows what time it isSischa knows what time it isSischa knows what time it isSischa knows what time it isSischa knows what time it isSischa knows what time it isSischa knows what time it isSischa knows what time it isSischa knows what time it isSischa knows what time it isSischa knows what time it is
 
Posts: 428
Karma: 2370
Join Date: Jun 2006
Location: Germany
Device: Nokia 770, Ilead, Cybook G3, Kindle DX, Kindle 2, iPad, Kindle 3, PW
Quote:
Originally Posted by kiklop74 View Post
I took a quick look, this site is really difficult for scraping. I'll see if I can do something during weekend though it is not a firm promise.
Thank you anyway. At least i am calmed now that it is not just me who has problems with the feed. I was a little bit confused why it doens't work on the first attemps but it came to my mind that i am just a little bit to stupid

I hope you'll maybe finde the time to look in this later cause its one of my favorite newspapers here in germany and their PDF epaper doesn't work in the kindle (a pitty but another story).
Sischa is offline  
Old 02-01-2010, 11:50 AM   #1322
johndoesecond
Connoisseur
johndoesecond knows what time it isjohndoesecond knows what time it isjohndoesecond knows what time it isjohndoesecond knows what time it isjohndoesecond knows what time it isjohndoesecond knows what time it isjohndoesecond knows what time it isjohndoesecond knows what time it isjohndoesecond knows what time it isjohndoesecond knows what time it isjohndoesecond knows what time it is
 
Posts: 55
Karma: 2000
Join Date: Jan 2010
Device: Kindle DX, Kindle 4, Kindle PW2
NY Times editorials

Hi,

The NY Times (subscription) recipe doesn't seem to download Editorials and Op-Eds any more.
Does anyone else have this problem?

Thanks.
johndoesecond is offline  
Old 02-01-2010, 12:22 PM   #1323
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
I just posted a possible "bug" in the tracker, and it occurs to me that this recipe thread might be a good place to get more info on whether others see it as a bug, and/or whether my proposed solution might have problems. Here is my bug track post:

Quote:
I have many books that have good author, title and series in the filenames, but poor metadata internally. When I'm adding them, I often need to turn on the Add/Save option "Get metadata only from filename." However, if I leave that option on, it takes me literally when recipes run, ignoring the good metadata a recipe provides. It appears to use a temporary filename for the recipe-based epub in the form:

appdata\local\temp\calibre_0.6.37_idcode_recipe_ou t.epub

I realize I can turn the option off off, but if I inadvertently leave it on overnight, or a recipe runs while I'm in the midst of adding books, I have to go back and fix those books or rerun the recipes. It's happened to me numerous times.

I don't know if you call this a bug or a feature, but I'm not sure why anyone would want this option to apply to recipe-based books. I only want it to apply to manually added books.

If you agree, here is a bit of code that prevents the option from applying to ebooks having a name that includes both 'calibre' and 'recipe.' AFAICT, all recipe based ebooks have those words in their temporary name, although I haven't checked this on all recipes or any other OS beyond Windows.

You might prefer some other test, even if you agree this change makes sense.
Does anyone else see this as a bug, or is there some reason why you would want the "Get metadata only from file name" option to apply to news recipes?
Starson17 is offline  
Old 02-01-2010, 04:32 PM   #1324
newsfreak
Junior Member
newsfreak began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2009
Device: Kindle 2
I'd like to get a recipe for New Straits Times (Malaysia) .
http://www.nst.com.my/

Thanks in advance.
newsfreak is offline  
Old 02-01-2010, 05:13 PM   #1325
jpc66
Junior Member
jpc66 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2010
Device: Aluratek Libre
New version of Discover and Métro Montréal

Hi,

Attached you will find the new version of Discover Magazine and Métro Montréal. These versions include the pictures related to the articles. I also cleaned the code up a little bit.

I also noticed that there is already a recipe for the Gazette called Montreal Gazette and made by Nick Redding. This is a better recipe than mine so I think you can delete my recipe. I don't see any reason to have two recipes for the same newspaper.

Regards,

JC
Attached Files
File Type: zip Recipes.zip (1.6 KB, 190 views)
jpc66 is offline  
Old 02-01-2010, 09:13 PM   #1326
PerErik87
Junior Member
PerErik87 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2010
Device: none
Recepies

I found a list of all Nordic feeds. or most of them.
http://www.djh.dk/ejour/arkiv/RSS.html#Norge
If you want me to I can try to create recepies for them for you so you can add them easy. please tell me how you like them if you want me to do this.

Per Erik

Last edited by PerErik87; 02-01-2010 at 09:17 PM.
PerErik87 is offline  
Old 02-01-2010, 11:58 PM   #1327
cypherslock
Groupie
cypherslock is a glorious beacon of lightcypherslock is a glorious beacon of lightcypherslock is a glorious beacon of lightcypherslock is a glorious beacon of lightcypherslock is a glorious beacon of lightcypherslock is a glorious beacon of lightcypherslock is a glorious beacon of lightcypherslock is a glorious beacon of lightcypherslock is a glorious beacon of lightcypherslock is a glorious beacon of lightcypherslock is a glorious beacon of light
 
cypherslock's Avatar
 
Posts: 178
Karma: 12392
Join Date: Nov 2009
Location: Canada
Device: Kobo Vox
PS3 Center.net

There was a very nice gentleman who was working on a recipe that I requested: That of www.ps3center.net. I'd still like to have this if possible, and don't know how to do it myself otherwise I'd would.
cypherslock is offline  
Old 02-02-2010, 01:09 PM   #1328
snlu178
Member
snlu178 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2010
Device: PRS-900
Quote:
Originally Posted by lorenzov View Post
try this one and customize the feeds as you wish
Thanks, this works great and was added in the new Calibre push. Much appreciated.
snlu178 is offline  
Old 02-02-2010, 01:55 PM   #1329
JaClar
Junior Member
JaClar began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2009
Device: PRS 600
TAZ Recipe

Quote:
Originally Posted by Baumi View Post
My recipe wish is a little bit unusual in that I don't requite: The German newspaper taz already provides an epub edition (without DRM) for subscribers. When you go to http://www.taz.de/epub and enter valid credentials in the htaccess-form, the most current epub is automatically downloaded. To read it on my Cybook Gen3 with 1.5 firmware, I then use calibre to convert it, tag it as "News" and upload it to the reader.

...

Thanks for any infos.
I made a recipe for TAZ following the suggestions of kovidgoyal to rewrite the build_index() method:

Code:
#!/usr/bin/env  python
# -*- coding: utf-8 -*-

__license__   = 'GPL v3'
__copyright__ = '2010, Lars Jacob jacob.lars at gmail.com'
__docformat__ = 'restructuredtext de'

'''
www.taz.de/digiabo
'''
import os, re, urllib2, zipfile, tempfile
from calibre.web.feeds.news import BasicNewsRecipe

class TazDigiabo(BasicNewsRecipe):
	
	title = u'Taz Digiabo'
	description = u'Das EPUB DigiAbo der Taz'
	language = 'de'
	lang = 'de-DE'
	
	__author__ = 'Lars Jacob' 
	needs_subscription = True
	
	conversion_options = {
		'no_default_epub_cover' : True
	}
	
	def build_index(self):
		if self.username is not None and self.password is not None:
			domain = "http://www.taz.de"
			
			url = domain + "/digitaz/.digiabo"
			
			index = urllib2.urlopen(url)
			
			reg = "<a href=\"([^\"]*)\">taz_[0-9]{4}_[0-9]{2}_[0-9]{2}\.epub</a>"
			
			find = re.search(reg,index.read())
			
			issue = domain + find.group(1)
			
			auth_handler = urllib2.HTTPBasicAuthHandler()
			auth_handler.add_password(realm='TAZ-ABO',
									  uri=issue,
									  user=self.username,
									  passwd=self.password)
			opener = urllib2.build_opener(auth_handler)
			urllib2.install_opener(opener)
			
			try:
				f = urllib2.urlopen(issue)
			except urllib2.HTTPError as e:
				self.report_progress(0,_('Can\'t login to download %s.')%issue)
				return
			
			tmp = tempfile.TemporaryFile()
			self.report_progress(0,_('downloading epub'))
			tmp.write(f.read())
			
			zfile = zipfile.ZipFile(tmp, 'r')
			self.report_progress(0,_('extracting epub'))
			
			zfile.extractall(self.output_dir)
			
			tmp.close()
			index = os.path.join(self.output_dir, 'content.opf')
			
			self.report_progress(1,_('epub downloaded and extracted'))
			
			return index


I have to say that i'm a little bit underwhelmed with the result. Calibre reformats the whole book, which actually works quite well, but destroys the header quite a bit... Would be much nicer if Calibre supports the direct download of epub and other ebook files.

cheers,
jaclar
JaClar is offline  
Old 02-02-2010, 03:10 PM   #1330
for_give
Junior Member
for_give began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2009
Device: prs-505
Request

Adbusters Magazine?

www.Adbuster.org

I gave it a go and failed.
for_give is offline  
Old 02-02-2010, 04:44 PM   #1331
PerErik87
Junior Member
PerErik87 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2010
Device: none
easier way

i ran into quite a few

usles divs
<!-- google_ad_section_start -->
thethingsineed
<!-- google_ad_section_end-->
usles divs
<!-- google_ad_section_start -->
thethingsineed
<!-- google_ad_section_end-->

How do i take advantage of these.
i think the answer is here somewhere.
http://docs.python.org/library/re.html#re-syntax
PerErik87 is offline  
Old 02-02-2010, 04:49 PM   #1332
LondoMolari
Junior Member
LondoMolari began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2010
Device: PRS 300
Scinexx

Hi,

i tried Scinexx, a science magazine from german Springer Verlag. Its kinda raw, but more or less working...

Code:
from calibre.web.feeds.news import BasicNewsRecipe

class AdvancedUserRecipe1265145870(BasicNewsRecipe):
    title          = u'Scinexx.de'
    language = 'de'
    __author__ = 'JSuer'
    oldest_article = 14
    max_articles_per_feed = 100
    no_stylesheets = True

    feeds          = [(u'Scinexx.de', u'http://feeds.feedburner.com/scinexx')]

    remove_tags = [{'class':['text1fett']}]
    remove_tags = [{'href':['javascript:window.print()']}]

    def print_version(self, url):
        murxb = url.rfind('2010') - 6
        murxc = url[murxb :-5]
        murxx = 'http://www.scinexx.de/inc/artikel_drucken.php?id=' + murxc + '&a_flag=1'
        return murxx
LondoMolari is offline  
Old 02-02-2010, 08:54 PM   #1333
srvean
Junior Member
srvean began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2010
Device: none
Generic recipe
Do we have a generic recipe? Say I go to a blog site and I'm interested in an article which I want to store in my ebook reader. Currently what I do is Fetch News -> Add custom news source, create a new recipe using the GUI then go to Fetch news, and finally download the page. Too much work.

It would be wonderful if we had "Generic Recipe" - enter the URL at the Recipe and download the article; done.

Sort of what we would do using web2disk http://xxyy.com but would like to have this feature on the GUI.
srvean is offline  
Old 02-02-2010, 09:34 PM   #1334
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 srvean View Post
Generic recipe
Do we have a generic recipe? Say I go to a blog site and I'm interested in an article which I want to store in my ebook reader. Currently what I do is Fetch News -> Add custom news source, create a new recipe using the GUI then go to Fetch news, and finally download the page. Too much work.

It would be wonderful if we had "Generic Recipe" - enter the URL at the Recipe and download the article; done.

Sort of what we would do using web2disk http://xxyy.com but would like to have this feature on the GUI.
You can accomplish that task by using instapaper.com. Calibre has a recipe for that site. Go to the website, register and start adding articles you want to read. Once you are ready download them using calibre instapaper recipe. No coding involved at all.
kiklop74 is offline  
Old 02-03-2010, 12:18 AM   #1335
eolake
Enthusiast
eolake began at the beginning.
 
eolake's Avatar
 
Posts: 41
Karma: 10
Join Date: Jan 2010
Device: Kindle
TidBITS Mac magazine

Is there a recipe for TidBITS.com? (The world's longest-running and possibly best Macintosh newsletter.)
eolake 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 02:23 PM.


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