This post is in a way an update to the post I made regarding converting gifs to their ASCII representation.
In this post, however I have made a few tweaks. In fact, I have updated the entire source code (rewritten it). In principle it works in the exact same way, but I have precomputed the density values for all of the characters. I did this manually in photoshop from the following image (the font is Courier):
But the new major update is that I’ve made it reddit-compatible. That is, I have made it do the following:
- It downloads all .gifs from /hot in a given subreddit
- Converts all of these gifs to ASCII
- Uploads them to the image-hosting service Imgur
- Submits the links to another subreddit
It has some compatibilities, namely:
The full source code is available at this project’s GitHub page. It mostly works, but sometimes there are some errors when uploading to Imgur, which stall the bot sometimes. I have even created a subreddit specifically for this bot, /r/ASCIIConvertBot, but I’m currently having some issues uploading from my bot (it doesn’t have enough reddit karma for reddit to trust the bot spamming the subreddit). If it’s too much of a hassle to compile it, just grab the executable asciiconvertbot.jar from the GitHub page and run it like this:
java -jar asciiconvertbot.jar SUBREDDIT_FROM SUBREDDIT_TO REDDIT_USERNAME REDDIT_PASSWORD
Don’t include the /r/ when writing the names of the subreddits. So an example might be:
java -jar asciiconvertbot.jar gifs ASCIIConvertBot testaccount 123456
I had a lot of fun writing this bot, and I’ll get around to fixing some of the minor bugs eventually. I’ll probably not make a new post on this blog, but keep updated on my GitHub page if you’re interested.