Friday, May 13, 2011

GTD - intake automation with Toodledo and Mail.app

I'm still in the process of converting my task workflows from Things to Toodledo, for reasons mentioned previously

One of the most important things for me is to have an automated workflow for task intake from email people send me to my task management application.

For Mail.app (my email application) I use Mail Act-On so that I can have a keyboard shortcut run an Applescript. For Toodledo I use Applescript to create a new email message to my Toodledo email address for new task creation, and I prepulate the email with the original subject, and an email body that contains information about who the email was from, when it turned up, and then a URL that will open the email in Mail.app if clicked.

I leave the message open so I can edit the Subject line (adding toodledo email syntax about when it is due and what folder to put it in etc) then I send it away and move the message out of my Mail.app inbox into a "to-process" folder where things are archived

The end result is a new toodledo task with a note that contains a link that will open the message. Fabulous.

Here's the script

Friday, May 6, 2011

GTD - migrating from Things to Toodledo - exporting Things data

I'm migrating from Things to Toodledo for task-tracking, in order to satisfy a couple of new (to me) use cases that I can't handle with Things, but that it appears Toodledo will allow me to handle.

I have more than 3500 completed tasks in Things though, and I treasure my ability to search through the completed tasks to turn up info used for new tasks. It isn't acceptable to me to lose that data in the transition, but I don't want to have multiple task apps, so I want to migrate all of my data from Things to Toodledo.

Things supports certain things Toodledo doesn't, so the first thing you have to do is alter your Things data so it's in a style Toodledo can accept, and that may be imported well.

First thing is that Toodledo doesn't really support Projects. It supports "Goals" but to tell you the truth, migrating that data isn't easy, and I didn't attempt it. I simply made my Projects into Areas on Things, and moved the tasks in Things to those Contexts.

Toodledo also doesn't support delegation the same way Things does. In order to migrate your delegates, the best way I could think of to map it was to have a "Delegated" Context, and then take the Things delegate's name and tag the thing with it. That way you can search for specific delegates on Toodledo post-migration, and you'll know something is delegated, at least.

On Toodledo, you'll need to create Folders for each Area from Things, along with the "Logged" and "Delegated" contexts.

The second thing is that Toodledo doesn't allow you to import completed tasks. This is troublesome for me because I want that history. I settled on putting all my completed tasks in a "Logged" context so at least I could get them in Toodledo, then mark them all completed later.

Finally, Things URL format in notes needs massaging in order to generate clickable links on the toodledo site, and I implemented some logic to do so.

That's about it - if you run this Applescript from within Things, once for the "Next", "Someday" and "Logbook" lists, uploading to the toodledo site each time, you'll have all your data in there.

Then you just need to mark the things in the "Logged" Context as completed, and you've finished your migration. I used TaskSurfer to do that since the interface was so fast for completion-marking.

Cheers

GTD - migrating from Things to Toodledo - why?

As mentioned previously, I'm not a strict GTD follower, but I'm not far from it and I am an obsessive task-list-maker. It's the only way I reliably get things done.

I've been using Things from Cultured Code for a long time - long enough to have created and completed 3617 tasks, actually - and it has worked fantastically for me. I love the interface, and it works well.

However, it does not have cloud sync working yet (though I understand it is in beta), and even with cloud sync it doesn't handle delegation or 3rd-party information sharing well. That was never a problem for me before, but I recently has a new use case turn up as a requirement for me and my task list: I needed to provide visibility into my tasks to 3rd parties.

To me, that means that 3rd parties should be able to look at my task list at any time, with no extra effort on my part. Requiring effort on either my part or the 3rd parties part would be too inefficient for something as constantly used and updated as my task list. Further, it should be possible to swap tasks back and forth with people if I want, with a minimum of effort. Things simply can't handle that.

Some features that Things has which I must maintain are full-featured offline functionality, a feature that eliminates most issue-tracking software like JIRA. I must be able to automate task intake from Mail.app to the task list as I had before. Finally, I must be able to access and modify my task list on my phone, in sync with the list on my desktop.

For all these reasons, I've decided to migrate to Toodledo - it appears to satisfy all these requirements, with the possible exception of good Mail.app -> Toodledo integration, but I'm aware of a couple ways to do it already just not quite as good as I like yet. At present it appears I'll use Toodledo's web site for 3rd party access, their iPhone app for phone access, and TaskSurfer for a desktop client. I'll continue to use Mail Act-On for Mail.app integration and I will either use Toodledo's email interface for task queueing from Mail.app, or I'll figure out how to drive TaskSurfer via Applescript.

The next couple posts will detail the scripts I've written in order to implement the migration from Things to Toodledo so that I don't lose my existing data from completed Things tasks as well as Things in progress.

GTD - intake automation with Things and Mail.app

I'm not a strict Getting Things Done / GTD follower, but I do try to keep my inbox from becoming my todo list. It's easy to slide into that habit, but the inbox can't tell you anything about deadlines or priorities, so I really like to have a task management program outside my mail program, where I can line up tasks based on something besides when someone sent me mail.

I use Things from Cultured Code in order to manage my tasks, and I use Mail.app as an email client. I get mail rapidly enough that the simple act of creating a task in Things in response to a mail takes a significant amount of time each day - a great target for automation.

My first goal was simply to have a keyboard shortcut that would pop up a quick entry task creation dialog for Things in response to an email, while in Mail.app. That's easily done, but while we're automating why not make things significantly better? My definition of "better" here is to create the Things task with the email subject used as the task name, then the task notes prepopulated with a hyperlink to the email, made in a way that is stable no matter where the email is saved. Finally, I want the email automatically moved to an archive folder in Mail.app so my inbox is decluttered. The final bit of glue is the Mail.app plugin "Mail Act-On" which lets you create rules triggered by keyboard shortcuts.

I have a Mail Act-On rule set up in response to Ctrl-T that runs the Applescript I use to automate things, then moves the message to a folder.

All pretty easily done, and something I use all the time. So much in fact that I'm sharing it here - use and enjoy: NewThingsToDo2.scpt



Cheers

Saturday, September 11, 2010

Monitoring TimeMachine backups with Nagios

An automated backup strategy is the key to avoiding tears when your hard drive inevitably fails.

With Apple machines, this is typically handled at the desktop level with an external drive and TimeMachine. (Incidentally I'm partial to the OtherWorldComputing on-the-go's myself since they don't need a power adapter...)

The problem with TimeMachine and local backups, in an enterprise context, is that it's hard to tell whether people are actually backing things up or not. What if the TimeMachine drive has failed for some reason? You will keep right on living, without realizing your user (or perhaps you) aren't actually successfully backing things up.

This is exactly the sort of problem that monitoring systems are supposed to solve, and my personal choice for monitoring is still nagios (though I hear good things about OpenNMS). You don't have to use a monitoring system perhaps - you could just have the script send you mail similar to my previous MacPorts check, but I like nagios because it maintains a history of previous events and has a flexible communication infrastructure.

But how to monitor the local TimeMachine backup status of a laptop with a centralized monitoring server like nagios?

The strategy I chose is to have a script on the local machine run daily (via an /etc/periodic/ entry) that scans for successful backups, fishes out the most recent success timestamp, and uses ssh to make an entry on my nagios server in a file. Then the I wrote a quick nagios plugin that inspect a timestamp in a file and measure whether it is acceptably recent or not.

If this is interesting to you - grab both of those little scripts from the link above and enjoy.

If you have a totally different strategy for monitoring local backup status, I'd be curious to hear it - please add a comment.

Cheers

Sunday, August 22, 2010

Script to automatically check for outdated ports on Mac OS X

I use the fabulous MacPorts system to get some of the software I need for my Mac laptop.

I am also interested in keeping this software up to date, for a variety of reasons, but just to know that I'm getting the latest security patches alone has me interested in regular updates.

I hate checking for outdated ports manually over and over again though, aren't computers supposed to do that?

So I wrote a script that will periodically check if I have outdated ports, and if there are any it will send me an email with a list of the outdated ones.

You can fetch the script port-checkupdate from my website - there are some comments in the script, and it's really tiny so it should be easy to work with.

You will likely also want the mailtest self-contained mailer my friend Marek Gilbert knocked together as well - the script expects to use it

Cheers

Sunday, July 18, 2010

Mac OS X laptop and TimeMachine whole disk encryption with successful restore

At some point, if you work with sensitive information, you realize it's time to get serious about protecting the data from theft.

I'll assume you already have firewalls in place, surf the web safely and keep your software up to date. That should help reduce the risk the data is accessed while you are using your computer, but since MacBookPro laptops are portable and valuable, and TimeMachine backup drives are also portable and valuable, there is the real risk that they are physically stolen, putting your sensitive data at risk.

The solution to this is multi-part - first you need to make sure that your machine asks you for a password when it resumes from sleep or wakes up from a screensaver, and that it goes to sleep or to the screensaver quickly when unattended. This makes sure that someone can't just open the lid or move the mouse and get your data.

Now they are going to try to reboot, the second part is to make sure that you don't have auto-login enabled, so they'll have to enter a password to login after rebooting.

You are mostly safe at this point, but did you know that Mac OS X install DVDs have a feature which let you reset the root password on a laptop, if you boot from the DVD? They do. It is quite useful really - I've needed to use it - but it means that the password protection isn't worth much at this level, a thief that wants your data can easily access it.

The last part of the solution handles this problem, by using encryption to make sure your data is inaccessible even if someone has physical access to your machine. The goal is to have your whole disk encrypted, with a pre-boot password required to decrypt it and get the OS running. I use PGP Whole Disk Encryption ("PGP WDE") for this purpose - it is commercial software but doesn't cost too much compared to exposing the sensitive data, and it is easy to use.

Assuming you have installed PGP WDE and have your laptop hard drive encrypted at this point, you are mostly secure, but what about your TimeMachine backups? That little external drive next to your computer still holds all your sensitive data, but it is not encrypted - you have moved the problem around but not solved it completely yet.

The next step then is to use PGP WDE on the TimeMachine drive, so it is encrypted as well. Now your data is fully protected, but you have a new problem - if your laptop dies for some reason and you need to restore from your TimeMachine drive, you can't - the Mac OS X install DVD you would use for the restore can't access the TimeMachine drive to restore from it, because it is encrypted!

Luckily, this is a solved problem. In a nutshell, what you want to do is to re-partition your TimeMachine drive and put an OS X install on it that you can use as a rescue, and you want a copy of the Mac OS X install DVD on that rescue install. Use TimeMachine to backup to a second partition on the TimeMachine drive, and now following these excellent instructions you have a tested and working self-contained encrypted backup of your laptop with all the tools you need to restore your computer if you have problems.

Cheers