elfeed icon indicating copy to clipboard operation
elfeed copied to clipboard

Subscribe to opml

Open zngguvnf opened this issue 8 years ago • 5 comments

Does elfeed provide an option to subscribe to a opml file?

I tried the following, but it did not work.

(setq elfeed-feeds
      '(("https://github.com/mimoo/crypto_blogs/blob/master/blogs.xml" crypto)))

zngguvnf avatar Aug 03 '17 10:08 zngguvnf

That's an OPML file, so it's simple:

M-x elfeed-load-opml

skeeto avatar Aug 04 '17 19:08 skeeto

Thanks, elfeed-load-opml forks fine.

But I'm wondering if there's an option to subscribe to an opml file to get updates (new blogs). The idea is based on this blog entry.

zngguvnf avatar Aug 06 '17 15:08 zngguvnf

There's no built-in mechanism for this, but it wouldn't be difficult to rig it up for yourself using something like url-retrieve. Write a little function that fetches the OPML with url-retrieve, saves the result to a file, and runs elfeed-load-opml on it.

The hard part: If the OPML has a feed removed, should Elfeed also unsubscribe from it? If so, you would either need to track this information (see elfeed-meta), or avoid adding feeds permanently from these OPMLs.

To make this sort of thing easier, I should update elfeed-load-opml to work on buffers so that you can skip writing it to a file. I should also extract some new functions from it, allowing you to parse the OPML yourself. For example, there could be a function to return a list of feeds from an OPML without doing anything in particular with that list. You could enqueue these feeds yourself (elfeed-update-feed) rather than add them to elfeed-feeds. There's really not much special about elfeed-feeds except that it's hooked up to "G" in the search buffer, autotagging, and elfeed-export-opml. If you use your own feed queuing mechanism you could basically ignore that variable.

skeeto avatar Aug 06 '17 23:08 skeeto

Thanks, I'll look into it.

zngguvnf avatar Aug 08 '17 06:08 zngguvnf

Apologies in advance; I couldn't find another way to contact @zngguvnf.

Were you able to come up with a solution for this? I had a glance at your dotemacs.org file, but couldn't find anything that looked likely.

daraul avatar May 30 '21 15:05 daraul