Wednesday 19 August 2015

Getting usefull subscription notices from YouTube in Akregator and sorting them


I'm a big consumer of YouTube content, it has mostly replaced a TV for me. This has been the case for several years and I've been slowly disappointed by the direction taken by YouTube with regards to managing and following subscriptions. I'm not the only one that has had problems with this, and there are numerous articles/videos/blog posts etc. out there that talk about this.

After YouTube shut down the old subscription page which displaced your subscription as a grid, I've been using YouTube Center which made the subscription page into a grid as well as improving YouTube in so many different ways. But even with this script I was noticing that I was not getting all the content from my 100+ channels and browsing individual channels is a pain.
Therefore I made the switch over to an rss reader, in my case Akregator which works well for me.

In order to get the rss feeds from YouTube one has to get the opml feed from all of your subscriptions. This is done as explained here (NB: I haven't found a way to use the single channel approach).

I had a problem that the feeds, once imported to Akregator were not displayed sorted. This is known and I fixed this by using manually sorting the opml file:

grep "title=" feeds.opml | sort -k2 > test.opml

And then go into vim and remove the lines with "title=" in the original file (feeds.opml) and insert the sorted part
:r test.opml

Now when imported into Akregator the file is sorted.