DEV Community

Fernando Tricas García
Fernando Tricas García

Posted on

So, you want a RSS feed with the activity in GitHub?

If you wanted to publish your activity in GitHub somewhere and your preferred way was to read an old, friendly RSS feed, I have some not so good news for you.

It is possible to get and RSS feed, but you need to send the adequate headers, as stated in Feeds.

curl -H "Accept: application/atom+xml"
Enter fullscreen mode Exit fullscreen mode

This means that it won't be easy to get these feeds in your feedreader (as far as I know they won't allow to modify headers and, for example, the excellent Feedly does not use this trick).

But if you want to insert this in a program it should be easy to do (in Python, for example, you could use feedparser module and, in Other HTTP Headers they explain how to do it).

For example, for the activity of yours truly, you could use:

d = feedparser.parse('', request_headers={'Accept':'application/atom+xml'})
Enter fullscreen mode Exit fullscreen mode

Et voilà:

Enter fullscreen mode Exit fullscreen mode

has the content available in the feed.

Let me know if this is of some utility for you.

Top comments (1)

artu_hnrq profile image
Arthur Henrique

The title caught me out and it was exactly what I was looking for
Thanks for the sharing!