I have a Tumblr account called I Laughed At This Stuff. I created it as a place to reshare memes, because I didn’t want to post them here on SPJG or on my Facebook account, which have other purposes.
I posted some stuff there, but I now have a huge file of images saved from the internet (okay, mostly Facebook and Boredpanda, but Facebook and Boredpanda got at least half of them from Reddit and Tumblr) that I have always been intending to add, but never did. The farther behind I got in uploading, the less likely I was to start uploading again…
The Tumblr posts I want to create would consist of:
- The image
- The text in the image (or some sort of manual description or comment)
- The date the image was saved to my computer
- One or more category tags
Given that, since sometime in 2018, I have accumulated over 12,000 images that I might want to post (I don’t actually want to post all of them, just the best ones), manual posting is increasingly impracticable.
That’s where Perplexity comes in. It’s an AI tool that I decided to subscribe to, even though I hate subscriptions. It turns out, it’s good at helping me use software to speed up manual tasks.
Automating backdated Tumblr posting with Python
An automated process might be:
- Try to automatically recognize text regions in images and somehow perform optical character recognition (OCR) on the text, and save the resulting text in a spreadsheet in a column beside the image name and date
- Add category tags manually to the spreadsheet
- Feed the spreadsheet and file of images to the Tumblr application programming interface (API)
In fact, this is possible, and thanks to Perplexity, I don’t have to learn Python scripting or understand the Tumblr API in order to do it!
I asked Perplexity if there is free OCR software I could use. It suggested gImageReader, which I was already using—and which is actually less useful than the Copyfish browser plugin, which I discovered subsequently—but gImageReader’s built in batch processing apparently can’t populate a spreadsheet. Never mind. The obvious thing to do is write my own software in Python.
And, after installing Python, all I had to do was tell Perplexity what I wanted to do!
Perplexity gave me a script that would look in a folder and create a spreadsheet using the Tesseract Python library. After seeing the output for a few sample images, I was worried my OCR plan would simply fail. But I asked Perplexity how to tweak the script to improve the output, and after implementing the suggestion, the output was perfectly cromulent.
The script that connects to Tumblr using the Tumblr API took some setup that I didn’t understand at first, but again, I just kept asking Perplexity for more help and telling it what was working and what wasn’t, and it gave me instructions until I got the script working. I posted an image using my new automation!
Maybe you’ve heard the buzzword “vibe coding”? That’s what it means: doing programming without doing programming. I think it absolutely helps to already be trained in programming, though.
Now I just have to do step zero, which is sort through my giant file of images and decide which images I really want to post! And I should run the automation in batches, since I still have to manually add categories.
In hindsight, it would have been smarter for me to file images more specifically when I first saved them… In addition to things I don’t think are particularly funny anymore, the file also contains things that are interesting but not funny. Those go on a different Tumblr page, and for better or worse, I don’t think there’s an AI that’s smart enough to read the image content and then evaluate and categorize it for me.