Create a dynamic “Today In History” wallpaper with AppleScript.
Okay, this one is a little more advanced than the other scripts I’ve posted and it requires the command line tool ImageMagick (free, open source) to be installed on your system.
Here’s what it does:
- Use curl to download the html source of this webpage.
- Use AppleScript’s text item delimiters to extract the text entries.
- Use the “strip” handler to remove html tags from the extracted text.
- Use the “ordinalSuffix” handler to format the date.
- Pass the collected text to ImageMagick to produce a jpeg with the text.
- Ask Finder to set the created image as the desktop wallpaper.
I’ve created a Gist with the entire code which you can copypasta into the AppleScript Editor, but you need to manually edit some portions of the script to fit your own system. Read the comments in the start of the script for detailed instructions. If you still can’t make it work, leave a comment here and I’ll see if I can help you.
