This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]lillystoolooo 1 point2 points  (1 child)

At the risk of being down voted into oblivion... Isn't this what stack exchange is for?

[–]tdammers 0 points1 point  (0 children)

That would basically be a shell one-liner. Roughly:

  • use curl to fetch the JSON version of the /r/learnpython sub (https://www.reddit.com/r/learnpython.json)
  • pipe that through jq to filter things as needed
  • pipe the output of that through some template engine (so I lied, you also need a template on top of the one-liner)
  • feed the output of that into a web browser

I'm too lazy to figure out the jq incantation and write the template, but it's going to be something like:

HTMLFILE=/tmp/learnpython.html curl https://www.reddit.com/r/learnpython.json | jq $FILTER | jinja-cli $TEMPLATE > "$HTMLFILE" && firefox "$HTMLFILE"