Prepend Text File with Automator & Shell Scripts

As a followup to my earlier post about how to create a macOS Service (or a Text Expander snippet) to quickly append a text file using Hazel, Automator and Shell Scripts, here’s a way to instead prepend text to a text file using the same tools.

prepend text automator screenshot

Why would you want to do this?

My core interest in setting this up is for plain-text journaling. In a way, I am cobbling together the functionality I find extraordinarily useful in the iOS app Drafts for use on macOS.

I like to capture ideas, thoughts, errands, links, apps, articles, tasks and todos quickly, and I use a plain-text document system I’ve put together over the years. These automation setups remove friction in doing so, which make it more likely I will maintain the behavior.

With this setup and the companion append text automation setup, I can hit a keyboard combo, have a small window pop up where I type what I want to capture, hit OK and the automation goes and appends it to the right .txt file, in the right location, behind the scenes.

I will be writing about my plain-text journaling system in a future post. For now, read on to learn how to set this journaling automation up for yourself.

Continue reading “Prepend Text File with Automator & Shell Scripts”

Add Entries to Day One via Text File

I use this setup to automate the addition of new entries in Day One by saving text files via Drafts to Dropbox. You lose the location and weather info, but those can be manually added. The Mac app doesn’t even support them yet anyways. Continue reading “Add Entries to Day One via Text File”

Append Text File With Hazel, Automator & Shell Scripts

I love the Drafts app for the iPhone, and I love automating stuff. The downside to using Drafts is that the workflows I’ve set up aren’t possible with any software on the Mac. I cobbled together some methods to achieve at least the one most common task I have, appending info to a master plain-text log file on Dropbox. Here’s how I did it.

[UPDATE 2017-12-30: here’s the companion article on prepending text files]

Continue reading “Append Text File With Hazel, Automator & Shell Scripts”

Dashes to Spaces & Word Caps using TextExpander

When uploading my artwork to Flickr, I typically have a file name that I want to use for the title as well. The problem is, when doing a Save For Web from Photoshop or Illustrator, I have things set up so the filenames are web-friendly (all lowercase, and dashes instead of spaces between words). So when the files get uploaded, Flickr defaults to using those filenames and manually editing the text is a waste of time. Here’s how I streamlined that process.

Continue reading “Dashes to Spaces & Word Caps using TextExpander”