Automatically Filing PowerPoint Presentations – Automator, Hazel, AppleScript

This came from a response to a fellow traveller in the Mac Power Users Facebook group. I was about to share the Automator action and Hazel rule that make up this little scheme when it dawned on me that this is a good opportunity to share a fairly straight forward workflow you can easily automate.

This is a fairly common need among students. Most good lecturers will share their presentations with you for their classes. Automating the filing of those slides is both, a good way to save a little time, and a way to ensure a consistent and reliable filing system. I don’t know about you, but my file management can get a little haphazard when done manually.

The situation is simple. Before or after class you are either sent, or given access to download a Powerpoint presentation with the slides for that particular lecture. However, you would rather have a PDF copy – or images as my MPU colleague prefers. There are a few ways you can come at this. If you simply want a PDF copy of the presentation, you can use Hazel to call an AppleScript and convert the file, rename and move it, and you’re done. If on the other hand you want images, you could do the conversion with an Automator workflow and simply add the ‘Render PDF as Images’ action to the end. Thereafter, it is a simple matter for Hazel to move the new file to wherever you want it. I tend to have it placed in my PDF Expert folder in iCloud, so I can markup the presentation on the iPad. Here is what the two versions of Hazel rules, and the Automator workflow look like:

 

Automatically File Powerpoint Presentations With Hazel
Automator Workflow does most of the work here.  Either Hazel or Automator can rename and move the file

 

Automatically File Powerpoint Presentations
Automatically File Powerpoint Presentations

If you want to build the Automator workflow yourself — and, there is no better way to learn how to use it — there are a couple of things to look out for. If you have any version of MS Office prior to 2016, you might be able to use the built-in automator action that looks like this:

Convert Powerpoint To Pdf
Previous versions of Microsoft Office included Automator Actions. Whether or not they work will depend on what version of PowerPoint created the presentation

Whether or not that will work for you is going to depend on the version of PowerPoint used to create the presentation. There appears to be some obscure bug with passing Office file names to Automator. As far as I can tell, MS Office no longer supports Automator directly, so you have a choice of hacking what you can from the 2011 actions or using AppleScript. Rather than messing around, trying to debug incompatible actions, AppleScript is your friend here. You can download the script itself here. It is also included in the Automator workflow, which you can download below, along with the Hazel rules. Happy Automating!

Downloads

Hazel Rules

Automator Workflow

Automating Academic Workflows on a Mac – Part I

 

If ever I find myself in one of those tedious Mac versus Windows conversations I need only point to one thing that tips the balance toward the Apple machine, and that is automation. While it is true that automation software is not the exclusive domain of the Mac, Apple’s historical commitment to it has not only lowered the bar for entry to native automation, but has fostered a platform which has seen a slew of wonderful third-party tools that will allow anyone with a little time and determination to dip their toes in the automation waters. Honestly, it is embarrassing to admit the amount of time I might have saved had I have embraced some of these technologies early than I did. Admittedly, with services like IFTTT and Zapier, automation is becoming less and less platform dependant, but whether you want to go full nerd, or simply save yourself and your fingers from repetitive typing tasks, there is nothing like the Mac for getting started.

This will be another post in parts, there are far too many options for Mac automation to throw them all on a page and hope for that to be useful. The intention is to give you some ideas for getting started with this automation racket.

Text Expander

Perhaps the easiest area to begin is with text expansion. Limited support for text replacement is available natively in macOS, or you go further with apps like Typinator or aText. My favourite app for the job, and probably the most powerful of the lot, is Text Expander . Start with simple things, like commonly used email addresses, your own personal details [2], signatures or often repeated phrases.


  1. Smile took some justified heat over the introduction of a subscription model with a wildly over inflated pricing model in 2016. The subscription price has come down, but students in particular may still feel inclined to either try one of the alternatives, or use the previous version, which you can buy outright  ↩

  2. Honestly, who wouldn’t want to have forms filled in for them?  ↩

Automating Academic Workflows Macos 4
One of its many tricks, Text Expander has built in macros for automatically formatting dates

Something I have found particularly useful is converting clumsy English spelling of non-English words and names. For example, my thesis contains a number of Māori words that have macrons for long vowels, Text Expander makes sure I neither forget nor mess up the spellings of those words. Likewise for accented European names like Zupancic to Zupančič. The more you use text expansion, the more you will start to notice commonly used text you can automate, and this is to barely scratch the surface of what a tool like Text Expander can do for you.

Smile’s Text Expander Blog is full of examples of how to use snippets in your workflow. One specifically research based use case is to setup snippets for common web searches. For more ideas on how to get started, Zapier have a nice write up on their blog you might like to check out.

Automator

Automator can seem a little daunting at first, and to be fair the user interface is not all that enticing. But, don’t let that stop you from messing around with it. Just as there are many text based tasks that you might not know you can automate, there are many more fiddly and tedious jobs littered throughout most people’s workflows. Academic workflows, in particular, are usually littered with tasks ripe for automation, and this is in no way limited to university work itself. If you are a blogger, an artist, or even a social-media junkie, chances are there is something you do regularly that you can reclaim significant time from. Having said that, like anything the problem is knowing where to start. There are a number of good Automator resources available, but you will never go wrong by starting with Sal Soghoian – the undisputed Jedi Master of Mac automation – at his Mac OS X Automation site.

In the meantime, here are a couple of basic examples to get you started. One of the most commonly cited examples of a basic Automator workflow combines selected PDF files into one document, like so:

Automating Academic Workflows Macos
Automator workflows can be setup as services to manage repetitive actions with a right-click

Another quick and dirty example of an Automator workflow is the one I use to resize images for blog posts. I have it setup as a service, so when I right click on an image and select the service, it simply scales the image, converts it, and renames the file. It looks like this:

Automating Academic Workflows Macos 2
Automator Workflows don't need to be complex, all this does is resize images, and rename the files. You can download a copy of this workflow below

You can even setup Automator do some of your research for you by setting up a feed with keywords and collecting the URLs for the articles it returns. This article has an example of one such workflow, along with a means for downloading images and video, and setting up a native, standalone web application for sites you have to keep open.

Hazel

Something all students and academics have to deal with a constant influx of digital documents. Whether they be absurdly arcane forms, journal articles, ebooks, expense claims, or whatever, they never stop piling up. Enter Hazel, put a little time into this thing and you can wipe your hands of repetitive file management and processing tasks. And, it’s not just the mundane and simple jobs either, Hazel can encode media, manage your photo library, add music to iTunes, use pattern matching to rename and file documents based upon their contents, run scripts, take care of your desktop, trash and downloads – in fact, like most good automation, it is more limited by a user’s ability to think of how to use it than by its own features. A little imagination and you can chain all kinds of services together, for example, there are party people who like to trigger their own welcome home soundtracks by using Hazel with Dropbox and IFTTT.

There is nothing overly difficult about setting up Hazel, start out simple and go from there. If you have ever setup a smart folder on iTunes, or in the Finder, then you will already have a sense of how to put an action together. If you haven’t, it looks like this:

Automating Academic Workflows Macos 3
Trigger Hazel actions by setting up conditions as you would in a Smart Folder

The Noodlesoft forum is among the most active developer forums I have come across, and the Hazel user base is full of helpful and proactive people willing to chip in if you get stuck. The forum is also full of inventive Hazel actions that other users willingly share with newbies. Finally, if you are getting stuck and you are the kind of person who likes a visual guide, you can either checkout the innumerable videos on Youtube or David Sparks has a detailed [3] Video Field Guide available.


  1. Smile took some justified heat over the introduction of a subscription model with a wildly over inflated pricing model in 2016. The subscription price has come down, but students in particular may still feel inclined to either try one of the alternatives, or use the previous version, which you can buy outright  ↩

  2. Honestly, who wouldn’t want to have forms filled in for them?  ↩

  3. And epically long!  ↩

Downloads

Scale Images Automator Service

Combine PDF Images Automnator Workflow