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).
Redditor TinyLebowskishares an AppleScript that, once configured and run, will allow you to switch to another iTunes account in 2 seconds, without typing anything. This is particularly useful for people like me who own several iTunes accounts (especially for App Store and iTunes movie releases) and think iTunes should have an option to “fast switch” between accounts — even on different international Stores. This AppleScript works as advertised and, if you are switching to an international store, you’ll just have to hit the Ok button. If the Store is the same, you won’t have to hit anything and the login process will be automatic.
Beware, though: your Apple ID and password are stored in plain text inside the script. Of course this is meant to be saved on your local machine, assuming only you have access to that. However, saving the script as an “application” bundle might provide an additional security measure (that is, someone will have to “show package contents” and navigate through folders to see the main script).
Also from Reddit, a nice little hack that allows you to automatically add a downloaded file’s URL as a Spotlight comment to the file itself. Spotlight comments are useful because they add metadata to a file, and they are supported across many 3rd party applications such as DEVONthink, Leap and Launchbar.
Spotlight comments are searchable, and having a URL automatically attached to a downloaded file can come in handy when you remember the website you downloaded something from, but you can’t find the file. (more…)
How To Setup A Home Surveillance System Using FaceTime
Run this script on your Mac when you leave the house, you can call your Apple ID from your iPhone 4 phone number. The script will auto answer the FaceTime call, allowing you to check in on things. When you hang up, FaceTime will quit, and the script will continue to listen for incoming calls. When you get home, stop the script and FaceTime will no longer auto-answer your calls.