NASA Astronomy Picture of the Day bot for GNU Social


#1

Recently, I wrote a GNU Social bot to pick up the day’s NASA Astronomy Picture of the Day and post it to GNU Social. The bot’s account page can be found here. You can find the source code in my blog post at https://systemreboot.net/post/nasa-astronomy-picture-of-the-day-bot-for-gnu-social.

The bot is a simple bash script and uses GNU Social’s Twitter compatible API. So, I could just use curl to call the API. Other interesting tools I came across while writing the script are jq, the command line JSON parser, and pup, the command line HTML parser. Check them out if you don’t already know about them. They are very useful to do quick JSON or HTML parsing on the command line without having to write full fledged programs or struggle with sed and awk.