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 05-31-2011, 03:24 AM   #1
bubak
Connoisseur
bubak began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Dec 2010
Device: kindle
Empty news feed

I've got a recipe with only one news feed which only rarely has new articles. Calibre then creates an ebook with nothing inside and emails it to me. Is it possible to prevent this? When there are no new articles, I want no ebook to be generated. Strangely enough, when I add

remove_empty_feeds = True

to the recipe, it raises the error

File "/usr/local/lib/calibre/src/calibre/web/feeds/news.py", line 880, in build_index
raise ValueError('No articles found, aborting')
ValueError: No articles found, aborting

(calibre 0.8.3). I guess this is because there are no valid feeds inside, but this looks like a bug to me - when all feeds are empty, no ebook should be generated.
bubak is offline   Reply With Quote
Old 05-31-2011, 11:04 AM   #2
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: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use remove_empty_feeds, then the book wont be created/emailed. Silently ignoring the case of all empty fields is wrong. It makes it much harder to detect when a recipe needs to be changed.
kovidgoyal is offline   Reply With Quote
Advert
Old 06-09-2011, 03:42 AM   #3
bubak
Connoisseur
bubak began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Dec 2010
Device: kindle
I can't follow your reply, have you read my whole post? The point is that when I use remove_empty_feeds, I get an error. When I add a command to ignore something, I cannot get an error that this something is not there, can I?
bubak is offline   Reply With Quote
Old 06-09-2011, 11:14 AM   #4
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: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you are getting an error when you use remove_empty_feeds that is because there are no non empty feeds. And as I said in my previous post, that is not going to change. Silently ignoring the case of no content is wrong.
kovidgoyal is offline   Reply With Quote
Old 06-14-2011, 07:38 PM   #5
bubak
Connoisseur
bubak began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Dec 2010
Device: kindle
Fair enough, so can you then add a new option to accept all feeds being empty as a normal condition that will generate/email no ebook? This will not be silent because I'll explicitly tell the program to accept this.
bubak is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a NEWS Feed irshwsky Recipes 2 04-18-2011 01:54 PM
Ignore empty RSS feed urls miwie Recipes 2 11-18-2010 01:58 PM
News Feed Covers DenverReader Calibre 4 02-06-2010 12:00 AM
The New Yorker news feed yekim54 Calibre 5 05-25-2009 09:33 PM
News feed error thibaulthalpern Calibre 4 03-22-2009 02:21 AM


All times are GMT -4. The time now is 01:02 PM.


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