Whenever I watch a football or hocky game I like to pull up the Reddit threads that are discussing them to see people’s reactions. I was a pain to refresh the screen and it would be so much better if you could see the comments streaming in real time. I came up with this little script using node and you can have it running in just a few minutes.
To invoke it you just run
reddistream <URL of comments>
Thats it. The page updates every five seconds with the newest comments at the bottom.
To install Reddistream first install the Node package manager however its done on your system. That will bring in NodeJS as a dependency. Then you just need to install Reddistream:
sudo npm install reddistream -g
Now open up some Reddit comments and run Reddistream followed by the URL and watch the comments flow in.
This lets you do lots of coll stuff because its in a terminal window. You can monitor for activity. You can pipe to other commands and you can redirect your output to a file.
Edit: So I added some new features.
- It now clearly says who replied to a comment.
- Comments are indented based off how many parent comments they have
- Quotes are now italic
- You can turn off these features by putting -r to disable showing who replied to a post and -i to disable indenting comments.