Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-18-2011, 09:09 PM   #1
joeindallas
Enthusiast
joeindallas began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2011
Device: Kindle 3
Problem with Dallas Morning News

Greetings from a new Kindle owner/new Calibre user (and thanks for all the good info here!)

I looked at the FAQS, stickies, past threads, used the search feature, and although I found several references to the creation of the Dallas Morning News recipe that is included in the version of Calibre I downloaded - I couldn't find my issue discussed. (probably because nobody else is dumb enough to do whatever it is that I'm doing wrong!)

When I add the Dallas Morning News feed and look at it with the Calibre viewer or on my Kindle 3, I get what looks like some kind of markup language in a txt editor. (not formatted articles like I was expecting). As a test, I added the USA Today feed, and it looked/worked fine.

Any ideas/ is this something really dumb?

Thanks!
joeindallas is offline   Reply With Quote
Old 01-19-2011, 10:36 AM   #2
joeindallas
Enthusiast
joeindallas began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2011
Device: Kindle 3
Making progress: For grins I installed on a different machine, and it just works! The first machine was Windows XP 64 bit; the 2nd plain old XP. Not sure if that made the difference. Now my only issue is that only three of the feeds return data (and 3 or 4 don't), and there isn't a feed for sports. Would it be appropriate to ask in this forum for a new/fixed recipe?
joeindallas is offline   Reply With Quote
Advert
Old 01-19-2011, 11:31 AM   #3
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,322
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Oh I committed a partial fix for this recipe, if you try it on your old computer it will work as well now.

I don't have the time to fix it properly, but if you want more sections, it should be very easy for you to add them yourself, just add new rss feeds to therecipe, see the user manual on how to get started editing news recipes.
kovidgoyal is online now   Reply With Quote
Old 01-19-2011, 11:40 AM   #4
joeindallas
Enthusiast
joeindallas began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2011
Device: Kindle 3
Thanks! I"ve been trying to add new feeds with some success, but am still having problems. Where would I find this latest fix?

Thanks again!
joeindallas is offline   Reply With Quote
Old 01-19-2011, 11:41 AM   #5
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,322
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It will be in the next release, on Friday
kovidgoyal is online now   Reply With Quote
Advert
Old 01-19-2011, 01:23 PM   #6
joeindallas
Enthusiast
joeindallas began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2011
Device: Kindle 3
Wow - thanks again!
joeindallas is offline   Reply With Quote
Old 01-21-2011, 06:56 PM   #7
joeindallas
Enthusiast
joeindallas began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2011
Device: Kindle 3
The new recipe works on my 1st machine! I have some questions, but not sure if they should go in another thread or here, so...

I played with all the tutorials and successfully modified some existing recipes. Most of them make sense to me - as in: you can cut-and-paste a feed from the recipe into a browser and see what it returns and go from there, but the ones in the Dallas Morning News feed redirect my browser to http://www.dallasnews.com/site-map/ ? I don't see how they return articles at all but they do.

Also, is there a way to see the processed feed before it's converted to mobi so I can tell what tags correspond to different pieces of an article? I tried to left justify the "body" and "articlebody" in a recipe to bring in 3 feeds from the dallas morning news sport section (cowboys, rangers, and mavericks) :

import re
from calibre.web.feeds.recipes import BasicNewsRecipe


class AdvancedUserRecipe1295487944(BasicNewsRecipe):
title = u'DMN Team RSS Sports Feeds'
oldest_article = 7
max_articles_per_feed = 100

remove_tags = [dict(name='div', attrs={'class':'categoryGroup'})]
remove_tags.append(dict(name = 'div', attrs = {'class': 'archivesGroup'}))

feeds = [(u'Rangers RSS', u'http://rangersblog.dallasnews.com/index.xml'), (u'Mavericks RSS', u'http://mavsblog.dallasnews.com/index.xml'), (u'Cowboys RSS', u'http://cowboysblog.dallasnews.com/index.xml')]

but whatever I do the main part of the article ends up being center justified. Is this the right place to ask, or should I post a new thread?

Thanks again, and this is fun for someone who hasn't done any serious coding in a long time!

Joe
joeindallas is offline   Reply With Quote
Old 01-21-2011, 07:51 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: 45,322
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
rss feeds typically have multiple links per article, calibre tries to guess the buest one.

You can see intermediate output by using the --debug-pipline option Instructions fo rdoing that are at the end of the news recipe writing section of the user manual
kovidgoyal is online now   Reply With Quote
Old 02-04-2011, 10:20 AM   #9
erichoch
Junior Member
erichoch began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2010
Device: Kindle
WOuld you share?

If you could share what you have developed so far, I have some time today and plan to study what you have done and hope to enhance it. Thanks.

Quote:
Originally Posted by joeindallas View Post
The new recipe works on my 1st machine! I have some questions, but not sure if they should go in another thread or here, so...

I played with all the tutorials and successfully modified some existing recipes. Most of them make sense to me - as in: you can cut-and-paste a feed from the recipe into a browser and see what it returns and go from there, but the ones in the Dallas Morning News feed redirect my browser to http://www.dallasnews.com/site-map/ ? I don't see how they return articles at all but they do.

Also, is there a way to see the processed feed before it's converted to mobi so I can tell what tags correspond to different pieces of an article? I tried to left justify the "body" and "articlebody" in a recipe to bring in 3 feeds from the dallas morning news sport section (cowboys, rangers, and mavericks) :

import re
from calibre.web.feeds.recipes import BasicNewsRecipe


class AdvancedUserRecipe1295487944(BasicNewsRecipe):
title = u'DMN Team RSS Sports Feeds'
oldest_article = 7
max_articles_per_feed = 100

remove_tags = [dict(name='div', attrs={'class':'categoryGroup'})]
remove_tags.append(dict(name = 'div', attrs = {'class': 'archivesGroup'}))

feeds = [(u'Rangers RSS', u'http://rangersblog.dallasnews.com/index.xml'), (u'Mavericks RSS', u'http://mavsblog.dallasnews.com/index.xml'), (u'Cowboys RSS', u'http://cowboysblog.dallasnews.com/index.xml')]

but whatever I do the main part of the article ends up being center justified. Is this the right place to ask, or should I post a new thread?

Thanks again, and this is fun for someone who hasn't done any serious coding in a long time!

Joe
erichoch is offline   Reply With Quote
Old 02-04-2011, 11:53 PM   #10
joeindallas
Enthusiast
joeindallas began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2011
Device: Kindle 3
Here's what I did to get the cowboys, rangers, and mavericks from the DMN site. I had much less luck with the DMN recipe itself:

Spoiler:
import re
from calibre.web.feeds.recipes import BasicNewsRecipe


class AdvancedUserRecipe1295487944(BasicNewsRecipe):
title = u'DMN Team RSS Sports Feeds'
oldest_article = 7
max_articles_per_feed = 100

no_stylesheets = True
extra_css = '''
h1{text-align:left;font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
h2{text-align:left;font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
p{text-align:left;font-family:Arial,Helvetica,sans-serif;font-size:small;}
body{text-align:left;font-family:Helvetica,Arial,sans-serif;font-size:small;}
'''

remove_tags = [dict(name='div', attrs={'class':'categoryGroup'})]
remove_tags.append(dict(name = 'div', attrs = {'class': 'archivesGroup'}))

feeds = [(u'Rangers RSS', u'http://rangersblog.dallasnews.com/index.xml'), (u'Mavericks RSS', u'http://mavsblog.dallasnews.com/index.xml'), (u'Cowboys RSS', u'http://cowboysblog.dallasnews.com/index.xml')]

joeindallas is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Texas Instruments article in Dallas morning news CribQuilter News 2 01-07-2010 01:40 PM
The Dallas Morning News: 'The end' for schoolbooks? Lady Blue News 5 03-07-2009 08:21 PM
Problem with News Feeds Sydney's Mom Calibre 10 03-07-2009 02:54 PM
Getting Red Sox news in the morning neilm2 Amazon Kindle 5 06-25-2008 12:01 PM
Favorable review by Dallas Morning News TadW Sony Reader 2 08-31-2007 01:40 PM


All times are GMT -4. The time now is 10:53 AM.


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