Reeywhaar / want-my-rss

RSS features for Firefox
Other
113 stars 10 forks source link

Option to open in standalone app #23

Open ghost opened 5 years ago

ghost commented 5 years ago

Is it possible to add the option to subscribe to the feed via a local rss feed (such as QuiteRSS)?

Reeywhaar commented 5 years ago

There is an option in preferences already: screenshot 2019-02-15 at 20 56 01

ghost commented 5 years ago

It does not allow to subscribe through QuiteRSS (or any feed reader that is not part of the web browser), no matter what you put in the preferences.

Reeywhaar commented 5 years ago

Oh, I must be mistaken it with just any website based reader. Am I understand right that QuiteRss is standalone app, like Reeder for example? Yeah, need to think about it. Great if such apps could have some protocol url registered, like quiterss:subscribe=http://example.com/feed, It could have make everything easier

ghost commented 5 years ago

Yep, It's a standalone app but I couldn't find documentation about how to add a feed from an external web browser, however before firefox removed support for rss feed it was possible to subscribe directly by clicking the "subscribe" button on the RSS preview.

Maybe Firefox was creating an .xml file of the feed and opening it with QuiteRSS. Not sure if it's still possible with the current implementation of plugins in Firefox but that could be the best (or only) way to support standalone feed reader.

Reeywhaar commented 5 years ago

Yeah, there was way, but it was removed with rss support: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/2/Adding_feed_readers_to_Firefox also, it was a duty of an reader app to register itself. As for now, there is a way, to communicate with standalone app via native messaging but it requires app to have native manifest. WebExtensions being web extensions, a lot of security limitations here.

The other way as I said, is to have own registered protocol as I said above.

whoizit commented 5 years ago

we lost this mime types in browser settings, maybe possible return it back?

application/rss+xml
application/x-rss+xml
application/atom+xml
application/rdf+xml
x-scheme-handler/feed
bolocholo commented 5 years ago

I can easily subscribe to my local RSS feeds client, Liferea, by clicking on the feed's URL link (on top of the RSS feed page created by this extension) and selecting "Liferea" in the dialog that Firefox presents (that also allows to save the file locally). I can customize this dialog in "Preferences > General > Applications" (look for the row with "feed" in the "Content Type" column). I use Firefox 65.0.2 in a fully updated Manjaro Linux box.

ghost commented 5 years ago

Unfortunately it doesn't work with QuiteRSS. Maybe QuiteRSS was using an API that Firefox had put in place to subscribe to feed reader rather than just opening a .rss or .atom file with it.

whoizit commented 5 years ago

@bolocholo can't find feed in the "Content Type" column on my Firefox 65.0.1 from Void Linux. I have Liferea too, but it's not works for me. I click on subscribe in rss page opened by this addon, but nothing happens

Reeywhaar commented 5 years ago

So, I've been looking on this issue and still solution is unclear:

tasadar2 commented 4 years ago

For those still interested, I managed to set this up with my local feed application. As @Reeywhaar mentioned, the application needs to handle a url protocol. Many old rss apps register rss and/or feed. I use feed:%s in this extension to open in a local application.

If the application doesn't register a protocol itself, but takes commandline arguments, you can add it manually, see http://kb.mozillazine.org/Register_protocol. And it looks like quietrss does support arguments passed from non-primary instances to the primary instance, https://github.com/QuiteRSS/quiterss/blob/0e9b869423/src/application/mainapplication.cpp#L135

Only trouble I had was some applications expect the raw address and this extension encodes it, https://github.com/Reeywhaar/want-my-rss/blob/3f33c014c3/ts/storage.ts#L106. An option to not encode the url or just a second replacement key like %url would be convenient.

ghost commented 4 years ago

Any update on when this fix will be merged?

beroal commented 3 years ago

I can easily subscribe to my local RSS feeds client, Liferea, by clicking on the feed's URL link (on top of the RSS feed page created by this extension) and selecting "Liferea" in the dialog that Firefox presents (that also allows to save the file locally). I can customize this dialog in "Preferences > General > Applications" (look for the row with "feed" in the "Content Type" column). I use Firefox 65.0.2 in a fully updated Manjaro Linux box.

I also use Liferea on ArchLinux. This method does not really work. Firefox downloads a feed file to a local file system, then Liferea shows a feed referring to this local file. The local file will not be updated when the feed is updated and will disappear after a reboot because it resides in /tmp.

beroal commented 3 years ago

Only trouble I had was some applications expect the raw address and this extension encodes it, https://github.com/Reeywhaar/want-my-rss/blob/3f33c014c3/ts/storage.ts#L106. An option to not encode the url or just a second replacement key like %url would be convenient.

Thank you for the suggestion. It seems to me that the URI syntax does not allow two schemes, and non-encoded “URI” has two schemes. For example, feed:http://example.com has the feed and http schemes. So passing a non-encoded “URI” is fragile since any program through which it passes (Firefox, desktop environment) may reject the non-encoded “URI” as invalid. I suppose we need to fix feed readers. 😓

Update. Actually, RFC 3986 may support such strings in a perverse way. Relevant parts from the RFC are:

URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
hier-part   = path-rootless
path-rootless = segment-nz *( "/" segment )
segment       = *pchar
segment-nz    = 1*pchar
pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"

So feed is scheme, http: is the first segment segment-nz, then an empty segment, then example.com as another segment.