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”

Advertisements

Alphabetical Keyboard Characters in OS X

mac-os-x-finder-keyboard-character-file-name-sorting

If you, like me, use the weird symbols on your keyboard to help you sort files in the Finder, then you’ll be happy to find that I went through the trouble of not only naming a folder full of folders with top-row keyboard characters so you can see exactly how they sort, and then naming those folders so you know what key commands will produce them, but I also made it downloadable so you can just use it yourself. I put this folder on my Desktop for quick reference.

See here for a web table for every last keyboard character in alphabetical order.

Enjoy.

Automatically Create a Specific Folder Structure with Automator & Hazel

Here’s a method using Automator and Hazel to automatically create a specific folder structure within a folder. I use this for client projects, since they are always the same. With this setup, I just add a new folder to my “Clients” folder, and all the standard sub-folders I need added are auto-created by Hazel, via Automator.  Continue reading “Automatically Create a Specific Folder Structure with Automator & Hazel”

1Keyboard: Type on your iPhone or iPad with yourMac

1Keyboard is a virtual bluetooth keyboard application for Mac OS X that allows you to wirelessly connect to Bluetooth enabled devices such as your iPhone, iPad and Apple TV. It does not require a wireless Bluetooth keyboard. Works great. It went from free to being a paid app since I tried it out. There’s a free demo that lasts for 2 days so you can give it a whirl.

Assign a Keyboard Shortcut to Move Messages to a Folder in Apple Mail

Here’s a great tip on how to assign a keyboard shortcut to move messages to a folder in Apple Mail. In short, you use the Applications Shortcuts found within System Preferences > Keyboard > Keyboard Shortcuts to assign a keyboard shortcut to a specific folder in Apple Mail. Similar to my tip on a global keyboard shortcut for creating a new email message in Apple Mail.

Continue reading “Assign a Keyboard Shortcut to Move Messages to a Folder in Apple Mail”

Safari Keyword Search Extension

Safari Keyword Search is an extension for Safari that allows you to search specific sites from the address bar. As the extension’s author describes it: For example, you can search Wikipedia for information on monkeys by typing “w monkeys” in the address bar and hitting Return.

Some built-in search keywords:

  • a: amazon.com
  • d: duckduckgo.com
  • down: downforeveryoneorjustme.com
  • e: ebay.com
  • g: google.com
  • gl: google.com (“I’m feeling lucky”)
  • gm: maps.google.com
  • imdb: imdb.com
  • so: stackoverflow.com
  • w: en.wikipedia.org
  • wa: wolframalpha.com
  • y: youtube.com

There are other plugins that performa  similar function, but this is the only one I’ve found that is an actual Extension for Safari, and therefore shouldn’t affect the functionality of the browser.

Here’s an advanced multi-site-specific search that you can use with Safari Keyword Search.

Invoke PopClip Via Keyboard Using AppleScript, Automator and OS X Services

A tweet from the PopClip developer directed me to the PopClip User Guide to take advantage of a feature I’ve been wanting in the app for some time: the ability to invoke PopClip via the keyboard.

The method uses AppleScript and the code is super simple:

tell application "PopClip" to appear

The documentation suggests using a few third-party “launcher” utility apps, but I’ve discovered a way to do so with just OS X, using Automator and OS X Services. Here’s how I did it. Continue reading “Invoke PopClip Via Keyboard Using AppleScript, Automator and OS X Services”