It should be noted that you will need to change the path in the script to match your setup, and the script assumes that the first line of your Taskpaper file is Inbox. You can also train Launchbar to launch the search query from a single letter, like T. You can now call Launchbar from whatever application you’re in and add a task to your Taskpaper Inbox. You just open the Index in Launchbar, select Search Templates and add a new template, give it a name (I’ve used ttt) and add: x-launchbar:execute?path=/path/to/launchbar_to_taskpaper.sh&argument=*Īs the search item. A little digging revealed that Launchbar has a built-in method to send a properly escaped string to a shell script, using Launchbar’s Search Template feature. The shell script worked when called directly from Launchbar, but I couldn’t get the string to escape properly and ended up putting the todo item in “” not ideal. Printf "$1" | sed 's/^/ - /' | unexpand -t4 > "$TMPFILE" || exit 1 Open the LaunchBar Press I Select 'Actions' Click 'Options' Check '/Library/Scripts/' Click 'Index' Click 'Update' to make sure your index is up-to-date. TMPFILE=$(mktemp /tmp/"$".XXXXXX) || exit 1 LaunchBar - a program launcher created by Peter Lerup.LaunchBar is a small Windows freeware program that mimics the behavior of the dockable QuickLaunch. # Important disclaimer: I have no idea what I’m doing LAUNCHBAR WHERE ARE SCRIPTS ZIP Clipboard actions: Copy as Plain Text, Copy and Paste, Copy and Paste as Plain Text, Clear Clipboard History, etc. (There is a Service that comes with Launchbar for sending items to the Taskpaper Inbox, but I wasn’t satisfied with it.) Here’s the script: #!/bin/sh This allows you to open files or URLs with a particular application, pass them to AppleScripts, move them to another folder or send them as an email attachment. LaunchBar is my preferred application/file/script launcher on OS X. I noticed that the script for sending tasks from mutt to taskpaper could be tweaked to send tasks from Launchbar to Taskpaper, so I set about doing just that.
0 Comments
Leave a Reply. |