This Week's Sponsor:

Incogni

Put an End to Spam, Scams, and Robocalls on Your iPhone


Logging with Day One and Alfred

Yesterday, Brett Terpstra posted a fantastic little script to leverage Day One’s built-in CLI (command line interface, more information available here) to create new journal entries from the Terminal or an app launcher. Brett has posted instructions on how to use Launchbar with the script, or skip the app launcher part altogether and go with the Mac’s Terminal instead:

Day One already has a quick entry palette in the menubar. It also has a command line interface (/usr/local/bin/dayone)1 which provides some geeky options (try dayone in Terminal) and the flexibility needed to replace my current logging system. You can create entries quickly with either method, but I wanted just a little bit more out of it. I built a quick script which allows a basic syntax for starring entries and defining dates (using natural language) inline in the entry itself. It can be used from the command line, from LaunchBar (or similar) and can be incorporated into just about any scriptable workflow.

I wanted to make the script work with Alfred, my app launcher and navigation tool of choice, and it turns out the effort to modify Brett’s script is equal to zero. I simply replaced “on handle_string(message)” with “on alfred_script(q)” and “end handle_string” with “end alfred_script” to make it work in Alfred. Obviously, you’ll need to fill in the path to your script after you’ve followed Brett’s instructions.

The three Day One entries above were created (and starred) using Alfred.

Before you create a new Applescript extension in Alfred, don’t forget to download Brett’s script and make it executable in your desired location, and create a symlink for Day One’s CLI (Show Package Contents on Day One, then navigate to Contents/MacOS/dayone - that’s the CLI you have to symlink) in your usr/local/bin/ directory.

You can check out Brett’s post here, and catch up on our coverage for the latest version of the app, Day One 1.5 (Mac and iOS).

Access Extra Content and Perks

Founded in 2015, Club MacStories has delivered exclusive content every week for nearly a decade.

What started with weekly and monthly email newsletters has blossomed into a family of memberships designed every MacStories fan.

Learn more here and from our Club FAQs.

Club MacStories: Weekly and monthly newsletters via email and the web that are brimming with apps, tips, automation workflows, longform writing, early access to the MacStories Unwind podcast, periodic giveaways, and more;

Club MacStories+: Everything that Club MacStories offers, plus an active Discord community, advanced search and custom RSS features for exploring the Club’s entire back catalog, bonus columns, and dozens of app discounts;

Club Premier: All of the above and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.