The more I get comfortable with emacs and doom, the more I tend to move things to it. This means that I am getting things done faster, without the need to get bogged down in the weeds of things.
This also means that, sometimes, I get to decommission a service that I host for my own personal use. If I can do it with a text file in git, why would I host a full-on service to do it for me ?
You might say, well, then you can access it from anywhere ! Security much ?!
if I don't have my machine, I will not access my passwords. In practice, the reality is that I am tied to my own machine. On one hand, I cannot access my services online without my machine and if I am on the move it is highly unlikely for me to access my rss.
Oh yeah ! rss ! That's what we are here for right ? Let's dive in…
I hosted an instance of miniflux on a vps for my rss. Miniflux is a great project, I highly recommend it. I have used it for a number of years without any issues at all; hassle free. I love it !
But with time, we have to move on. I have had my eye on the rss configuration in the doom
init.el since I installed it. Now comes the time for me to try it out.
I will go with my process with you so you can see what I did. There might be better ways of doing things than this, if you know how ping me !
The nice thing about doom is that it is documented. The
rss is a doom
module so we will look in the doom
We can achieve this by hitting
SPC h d m and then searching for
rss. The documentation will give us a bit of informaton to get started, like for example that it uses
elfeed as a package.
The creators of elfeed describe it as.
… an extensible web feed reader for Emacs, supporting both Atom and RSS.
The project looks well documented, that's very good. It has extensions, org one… wait org one ? What does it do ?
What is this thing elfeed-org ?
Configure the Elfeed RSS reader with an Orgmode file
Sweet ! That's what I'm talking about. A neatly written org file as configuration.
It is always a good idea to go through documentation, at least quickly. Skim it over, you don't know what you would miss in there. I've been doing this for a long time, there is no way I can miss any… oh wait… I missed this…
elfeed-org-import-opmlto import an OPML file to an elfeed-org structured tree.
Alright, that sounds easy. Let's export from miniflux and import in elfeed.
Before we import and whatnot, let's figure out what we are importing and where.
After reading the documentation of both
elfeed-org, it says we need to set
rmh-elfeed-org-files which is a list.
In my doom configuration, I think I need to do the following.
(after! elfeed (elfeed-org) (setq rmh-elfeed-org-files (list "~/path/to/elfeed.org")))
This way we can guarantee where the file is, or we can go digging where the default is and copy from there. This is just another file in my org collection. Nothing special about it, it gets tagged and searched like everything else.
I added the
(elfeed-org) in the block to load
elfeed-org after I had to load it manually a few times. This made it work on my system, I might be doing it wrong so your milage may vary.
after! section is doom specific.
I also added the following line above the
(setq elfeed-search-filter "@1-month-ago")
I simply wanted to see a span of a month instead of the default 2 weeks.
The end result configuration is as follows.
(after! elfeed (elfeed-org) (setq elfeed-search-filter "@1-month-ago") (setq rmh-elfeed-org-files (list "~/path/to/elfeed.org")))
This is the time where you reload your configuration, reload emacs and then reload the world.
If you are not using doom, only
setq lines and do not forget to manually load the packages before callind them.
I think this is going to be a nightmare. It says on the page
elfeed-org-import-opml, yeah right !
Alright let's do that. It prompts for the file, we give it the file and nothing happens…
Let's look in our
elfeed.org file and whaaaa ! It's all here. That is awesome ! And here I was, the doubter, all along.
Now, let's move things around, tag them properly and categorize them as we please.
For all of you who are not importing, here's how mine, snippitized, looks like.
* Elfeeds :elfeed: ** Bloggers :blog: *** [[https://blog.lazkani.io/rss.xml][The DevOps Blog]] :personal: ** Websites *** News :news: **** General :general: ***** [[https://www.reddit.com/r/worldnews/.rss][Reddit: World News]] :world:reddit: ***** [[https://www.reddit.com/r/europe/.rss][Reddit: Europe News]] :europe:reddit: **** Technology :technology: ***** [[https://www.reddit.com/r/technology/.rss][Reddit: Technology]] :reddit: *** [[https://xkcd.com/rss.xml][xkcd]] :xkcd:
Granted, it is not much the looker in this mode but a picutre will reveal far better results, I presume. Don't you think ?
Oh yeah, now we're talking !
Why the hierarchy ?
Elfeed-org by default inherits tagging and ignores text. In this way, I can cascade tags and when it's time to sort I can search for
+xkcd and I get only xkcd posts. I can also do something similar to filter on
+general +europe for specifically getting Europe's Reddit news.
The other reason for the org integration is the documentation aspect for the future. I have only recently migrated to elfeed so the documentation is still somewhat lacking, even for me. Not to worry though, as is the custom with the other migrations so far I ended up documenting a lot of it in better ways.
The big finish ?
Okay, okay ! That's a lot of babbling let's get to it, shall we ?
Now that everything is configured the way we like. Let's reload everything and try
Yeah, I know not very impressive huh ? We didn't add any hooks to update and fetch things. I like to do that manually. The documentation, though, describes how to do that, if you like. For now, let's do it ourselves
elfeed-update. You should be greeted with something like this.
Looks nice huh ?! Not bad at all.
There was nothing hard about the setup, whatsoever. It took me a bit to go through the relevant bits of the documentation for my use cases which are, I admit, simple. I can now decommission my miniflux instance as I have already found my future rss reader.