◂ back

Mobile blogging

The pinnacle of human evolution, smartphones, finally utilised in the most braindead backwards way imaginable!

After being reminded that the iPhone could run shell scripts over ssh via its Shortcuts app, I couldn't help but come up with the most idiotic possible application for that...

Mobile blogging

... and so began my quest on writing a shell script which would take the boilerplate html for a typical page in my /blog/ section, and somehow inject into it the text from my phone, along with the system date (because what good is an article if there is no date of publishing?). Now of course, there was a matter of the Shortcut on the phone itself, which turned out to be a bigger headache than the script which spits out html files containing the blog itself and updates the index file.

The Shortcut was quite a beast to wrangle, seeing as once you get used to typing code, drag-and-drop tends to feel like you are speaking some alien language where everything is oddly visual.
And on top of it, the SSH connection doesn't allow for command arguments longer than a certain amount of characters (well below the typical blog length), so certain hackery with writing to temp files, echoing them and deleting them afterwards was required to get everything working.

Alas, I am proud to announce this new era of mobile blogging, and invite you all to share my joy of reinventing the wheel!