ckampfe/russ

[FEATURE] Import / Export a list of feeds

Closed this issue ยท 11 comments

Is there an existing issue for this?

  • I have searched the existing issues

Feature description

First, love russ! Simple, nice to read, all around great tool.

It would be nice to be able to export a list of rss feed links for backup. Nothing fancy - even just printing them out to terminal would work fine. Ditto for import, being able to bulk-add a list of feeds would be nice.

I'd be happy to put together a pull request if you were amenable.

Thanks again for a great tool!

@matthewauld Thanks for the kind words, I'm glad you find it useful!
With regard to exporting feed links for backup, as a first pass, I'd recommend pulling the links from Russ' database directly with SQL. Russ' database is SQLite and not obfuscated/encrypted at all (it's your data!) so you can write SQL directly against it. If I'm understanding what you're asking, it should be more or less something like this as a start:

sqlite3 your_russ_feeds.db "select feed_link from feeds;"

This will output a list of links to the terminal.
You can of course then embed the SQL itself in a Python script or similar and automate the backing up.

As this is the first time someone has asked for a feature like this, I'd like to wait a bit to see if it is of interest to others before building something into Russ directly.

As for import, that should be doable, I think. What kind of input format were you imagining for import?

Same here. I have A LOT of feeds in an OPML file. And I would like to be able to import them all in a whim.

Thanks for a very good software

As this is the first time someone has asked for a feature like this, I'd like to wait a bit to see if it is of interest to others before building something into Russ directly.

Interested as well, export and import as OPML.

I could potentially work on this. How about changing the command structure to have the default command run russ normally, but also allow commands like russ import and russ export? So that you can do russ import -d <db-file-if-needed> opml <opml-file> or something?

If anyone cares to share some OPML files they want to use, that would be useful as I don't have any examples of how other RSS tools create these on export.

@stevenroose here's an example of an OPML file export from Fluent Reader where I had one group (category) called news with one source, wired.com. I have formatted it, but it generally exports with no spacing. It default exports as Fluent_Reader.opml Hope this helps ๐Ÿ’™

<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
    <head>
        <title>Fluent Reader Export</title>
    </head>
    <body>
        <outline text="news" title="news">
            <outline text="Wired" title="Wired" type="rss" xmlUrl="https://www.wired.com/rss"/>
        </outline>
    </body>
</opml>

Hey @matthewauld @verajosemanuel @Cyrix126 @stevenroose @jessebot , I'm mentioning you all because you've all expressed interest about this feature.

I've implemented an initial WIP version of OPML import for russ, you can find it on this branch: https://github.com/ckampfe/russ/tree/opml-import

As I don't use OPML myself, I'd appreciate it if you all could clone that branch and try testing it with your workflow and the OPML feeds you wish to use to see if it works for you, and report back. Note that this is not a final implementation so I'm less concerned with feedback about code quality, and more concerned with feedback about functionality/robustness of the feature itself. Thanks!

@matthewauld @verajosemanuel @Cyrix126 @stevenroose @jessebot I added another commit cleanup up the OPML import implementation significantly and adding better progress reporting. Assuming a few of you can test and confirm that it works with your use cases it's probably ready to merge. Thanks all.

Folks, I have merged in #32, which adds the import of OPML files. I'm going to consider this issue complete. Let me know if you have any problems with it as implemented. If anyone is still interested in OPML export, please open a new issue.

@ckampfe tested successfully with:

russ import --opml-path /home/jessebot/Fluent_Reader_Export.opml

Thanks for this feature! ๐Ÿ’™

@jessebot thank you for the report!