Programming
An alternative method for keyboard input switching on macOS
Stripping diacriticals from Russian text
A Simple Styling Shortcode for Hugo
Creating year and month groups in DEVONthink Pro Office using AppleScript
Scripting thumbnail image file creation on macOS
_q suffix for the less than 500px image.] is used to signify classes of image size. I wrote the following script to automate the process of scanning a source folder and creating four thumbnail sizes to an output directory.
Sunday, September 16, 2018
Regex 101 is a great online regex tester.
Speaking of regular expressions, for the past year, I’ve used an automated process for building Anki flash cards. One of the steps in the process is to download Russian word pronunciations from Wiktionary. When Wiktionary began publishing transcoded mp3 files rather than just ogg files, they broke the URL scheme that I relied on to download content. The new regex for this scheme is: (?:src=.*:)?src=\"(\/\/.*\.mp3)
Serious audio processing on the command line
AppleScript and iTerm2
Among the many reasons I use iTerm2 in lieu of the macOS Terminal is its AppleScript support.
I recently had the need to automate some tasks on my Amazon Web Services EC2 server in a way that takes advantage of iTerm2 AppleScript functionality.
Use case
I’ve found recently, that my screen sessions were disappearing. Although I haven’t completely excluded other causes, some have suggested that infrequently-reconnected sessions can be cleaned up. Since I’m not a Unix sysadmin, I’m not sure about this. However, I decided to test the hypothesis by writing an AppleScript that logs into my EC2 server, attaches to each screen session, detaches and closes the connection.