Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-23-2014, 06:56 PM   #1
fem
Member
fem began at the beginning.
 
fem's Avatar
 
Posts: 18
Karma: 10
Join Date: Mar 2014
Device: Onyx c65 Afterglow
Post [GUI Plugin] OPML Importer (RSS feeds from feedly/google reader)

This plugin has been assimilated into calibre as from version 1.32! No need for you to download this anylonger

I didn't want to manually import my 100+ RSS feeds from feedly, so I wrote this plugin.

The project page is located here: https://github.com/ingkebil/OPML2Recipe

Feel free to report issues and feature requests, and donate. 50% goes to the Free Software Foundation Europe.

Main Features

Import RSS feeds as an OPML file from feedly or google reader.
This plugin will create a recipe for each group and each remaining feed.
So far a restart is required to have the imported RSS feeds show up in custom news sources.

Version History
Spoiler:

* Version 1.0.1: Added a MessageBox when the conversion was succesful.
* Version 1.0.0: Created a working import plugin + configuration of oldest article and max articles.


Special Notes

Requires calibre version 0.7.53 or later. This plugin has been assimilated into the main calibre code base as from version 1.32!
A restart is still required once the RSS feeds have been imported!
I forgot to add a 'Import finished' message box when the import completes, that's for tomorrow.

Installation Notes

Download the attached zip file, install the plugin and restart calibre as described in the Introduction to plugins thread.
Customize the plugin via Preferences -> Plugins or through the configure button of the plugin.

Usage

Set the max articles and oldest article preferences. If not set, the defaults will be used.
Hit the 'import' button, select the OPML files you want to import.
Restart calibre to have the imported RSS feeds show up in custom news sources.

Attached Files
Attached Files
File Type: zip OPMLRecipes.zip (34.6 KB, 991 views)

Last edited by fem; 04-11-2014 at 01:55 PM. Reason: Added spoiler around version history
fem is offline   Reply With Quote
Old 03-26-2014, 05:43 PM   #2
roen.v.touli
Junior Member
roen.v.touli began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Dec 2013
Device: none
Imported feeds just fine, however, I am unable to edit them afterward. When I click on a recipe in the 'add custom news source' dialogue I get the following error:

calibre 1.25 [64bit] isfrozen: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.5
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Traceback (most recent call last):
File "site-packages\calibre\gui2\dialogs\user_profiles.py", line 167, in current_changed
File "site-packages\calibre\gui2\dialogs\user_profiles.py", line 358, in populate_options
TypeError: QSpinBox.setValue(int): argument 1 has unexpected type 'long'

Other than that, great plugin! I've been patiently waiting for one like this as I have hundreds of feeds. It would be nice if you might be able to make it where before or after import, you can choose to to combine recipe's, change feed name, add tags. Future wish: a scrolling ticker integrated into the plugin and Calibre.

Keep up the good work! Thank you.
roen.v.touli is offline   Reply With Quote
 
Enthusiast
Old 03-27-2014, 11:22 AM   #3
fem
Member
fem began at the beginning.
 
fem's Avatar
 
Posts: 18
Karma: 10
Join Date: Mar 2014
Device: Onyx c65 Afterglow
Quote:
Originally Posted by roen.v.touli View Post
It would be nice if you might be able to make it where before or after import, you can choose to to combine recipe's, change feed name, add tags. Future wish: a scrolling ticker integrated into the plugin and Calibre.
I gave this some thought while developing the plugin. Ideally, this functionality shouldn't be a plugin at all, but should be made available on the custom news souces dialog. This way all the power already implemented for that dialog (which mainly is name collision detection when importing feeds) would be made available out of the box. Added bonus: restart to import the feeds into calibre could be made redundant.

I'll look into the error tonight.
fem is offline   Reply With Quote
Old 03-27-2014, 01:42 PM   #4
roen.v.touli
Junior Member
roen.v.touli began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Dec 2013
Device: none
Quote:
Originally Posted by fem View Post
I gave this some thought while developing the plugin. Ideally, this functionality shouldn't be a plugin at all, but should be made available on the custom news souces dialog. This way all the power already implemented for that dialog (which mainly is name collision detection when importing feeds) would be made available out of the box. Added bonus: restart to import the feeds into calibre could be made redundant.

I'll look into the error tonight.
I agree this should be native to Calibre, however, I know Kovid is very busy on the project with lots on his plate. I am patient that News will have better functionality and that this will be done in the future. Lack of functionality with News is the only thing keeping me with a separate RSS aggregator.

Thanks for looking into the error fem.
roen.v.touli is offline   Reply With Quote
Old 03-27-2014, 03:01 PM   #5
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
Posts: 2,850
Karma: 4210000
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch (Wifi only)
Thumbs up

Quote:
Originally Posted by roen.v.touli View Post
I agree this should be native to Calibre, however, I know Kovid is very busy on the project with lots on his plate. I am patient that News will have better functionality and that this will be done in the future. Lack of functionality with News is the only thing keeping me with a separate RSS aggregator.

Thanks for looking into the error fem.
Kovid is never too busy to accept patches, it takes less effort to check the effects of existing code than to come up with new code.

@fem, if you integrate this into the main calibre codebase, I'm sure Kovid would use it. It sounds like something that deserves to be built-in.

eschwartz is online now   Reply With Quote
Old 03-27-2014, 03:54 PM   #6
fem
Member
fem began at the beginning.
 
fem's Avatar
 
Posts: 18
Karma: 10
Join Date: Mar 2014
Device: Onyx c65 Afterglow
Quote:
Originally Posted by roen.v.touli View Post
Imported feeds just fine, however, I am unable to edit them afterward. When I click on a recipe in the 'add custom news source' dialogue I get the following error:

calibre 1.25 [64bit] isfrozen: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.5
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Traceback (most recent call last):
File "site-packages\calibre\gui2\dialogs\user_profiles.py", line 167, in current_changed
File "site-packages\calibre\gui2\dialogs\user_profiles.py", line 358, in populate_options
TypeError: QSpinBox.setValue(int): argument 1 has unexpected type 'long'
So I've tested this on the ubuntu 64bit and win7 64bit version of calibre and
I can't seem to reproduce the error. Any chance you can upload one of the resulting recipes or (a partial) OPML file that causes this error?
fem is offline   Reply With Quote
Old 03-27-2014, 04:31 PM   #7
roen.v.touli
Junior Member
roen.v.touli began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Dec 2013
Device: none
Quote:
Originally Posted by fem View Post
So I've tested this on the ubuntu 64bit and win7 64bit version of calibre and
I can't seem to reproduce the error. Any chance you can upload one of the resulting recipes or (a partial) OPML file that causes this error?
Attached is a zip with several of my recipes and the OPML in entirety for better testing. I am wondering if there are too many recipes that is overloading Calibre? Quite a few of my RSS feeds are already recipes built-in, I am just not wanting to go item by item finding duplicates...but I might have to?

Calibre was not updated as I was waiting for tomorrow but I updated to make sure that was not the cause and the error still persists.

Hope this helps and that the entire OPML is ok.
Attached Files
File Type: zip Recipes and OPML.zip (15.8 KB, 33 views)
roen.v.touli is offline   Reply With Quote
Old 03-28-2014, 09:55 AM   #8
fem
Member
fem began at the beginning.
 
fem's Avatar
 
Posts: 18
Karma: 10
Join Date: Mar 2014
Device: Onyx c65 Afterglow
The problem seems to be that the recipes have oldest_article and max_articles_per_feed set to a number with 34 digits, instead of something more reasonable like 7 and 100. I don't really know how that happened tho , as invalid values would be caught before a recipe is actually compiled and written to disk.

A quick fix would be to delete the imported recipes and reimport them making sure actual valid values have been entered in the max articles and oldest article fields. Even going so far as to just increase/decrease those values regardless of valid values being displayed.
You'll prolly want to find calibre's configuration directory and delete the last added recipes from there instead of manually going over them in the custom news source dialog.

If removing the feeds would provide too much of a hassle, I could add a 'remove imported feeds' button to the plugin to easy the pain of removing the recipes.

Let me know if this helps.
fem is offline   Reply With Quote
Old 03-28-2014, 05:36 PM   #9
roen.v.touli
Junior Member
roen.v.touli began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Dec 2013
Device: none
Quote:
Originally Posted by fem View Post
The problem seems to be that the recipes have oldest_article and max_articles_per_feed set to a number with 34 digits, instead of something more reasonable like 7 and 100. I don't really know how that happened tho , as invalid values would be caught before a recipe is actually compiled and written to disk.

A quick fix would be to delete the imported recipes and reimport them making sure actual valid values have been entered in the max articles and oldest article fields. Even going so far as to just increase/decrease those values regardless of valid values being displayed.
You'll prolly want to find calibre's configuration directory and delete the last added recipes from there instead of manually going over them in the custom news source dialog.

If removing the feeds would provide too much of a hassle, I could add a 'remove imported feeds' button to the plugin to easy the pain of removing the recipes.

Let me know if this helps.
Worked perfectly, thank you! I tried to set each of those to maximum in 'configure' but did not realize I put in so many digits. At least we now know the plugin is not catching invalid values.

I think most of us on this forum are familiar enough with Calibre to go into its directory and delete the files there; however, for new users, ease of access, and simplicity, it may not be a bad idea to have a delete feeds button where you could select multiple feeds and delete at once.

I see that Kovid does not mind you developing this into Calibre native system itself...can't wait to see how it goes. Any ideas or thoughts of what you are going to do? I think inspiration from current RSS readers and features they offer would be beneficial.
roen.v.touli is offline   Reply With Quote
Old 04-11-2014, 02:00 PM   #10
fem
Member
fem began at the beginning.
 
fem's Avatar
 
Posts: 18
Karma: 10
Join Date: Mar 2014
Device: Onyx c65 Afterglow
So, in the meanwhile, Kovid and I wrote this plugin into the calibre main code base. As from version 1.32, you have native RSS feed import support through OPML files.
No restart is required, recipes show up instantaneously. It has been made easier to overwrite already existing recipes. But deleting recipes has not been touched and neither did the recipe interface change.
fem is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking For Card-Like Page Turns (Like RSS Reader Feedly) Mickey330 General Discussions 1 02-27-2014 08:18 PM
Classic G:RSS: Optimized Google Reader (RSS) for the Nook [BETA Testers needed] Fmstrat Barnes & Noble NOOK 24 12-28-2010 12:22 PM
G:RSS: Optimized Google Reader (RSS) for the Kindle 3 (and Nook) Fmstrat Amazon Kindle 47 12-13-2010 12:20 PM
What RSS feeds are on your Reader? neilm2 Sony Reader 4 12-10-2006 01:07 PM


All times are GMT -4. The time now is 02:47 AM.


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