• Some Magic with Merlin

    When I was preparing for my thesis committee meeting earlier this year, one of the things I did was prepare a project timeline. In order to do that, I spent ages testing out project management software again, because working with FastTrack Scheduler was so frustrating and unrewarding. After a lengthy but rushed evaluation of several products, I ended up going with a relatively new product called Merlin from a German company. While Merlin isn’t perfect, it at least wasn’t frustrating to use and its import/export facilities meant that I could overcome some of its reporting deficiencies through the judicious application of other applications.

    The biggest reporting deficiency I immediately found was that I wanted to produce a nice list of milestones organized by month and year, so that it was easy to see at a glance what deliverables I was supposed to have at any given point. The first sticky bit was that I didn’t have a way to do a search for just the milestones in Merlin. I could define milestones, yes, but the interface didn’t allow me to search for them. To overcome that, I had to manually add the word “Milestone” as a comment to all the milestones. When you do a “search”, you can then say “Milestone” and a list of Milestones will be retrieved as a “report”. Unfortunately, this is pretty ugly and useless because it didn’t include any of the date information, although you could see if something was late (red flag):


    So instead I hit upon the idea of creating a “workspace view” for the Milestones which included the kind of information I would need to produce a nicely formatted list: The milestone activity name, its end date (due date), its “path”, and its “subtitle” (the comment field which says “Milestone”. The “path” is the a string showing the outliner path of a specific activity. For example, it’s writing a chapter in the thesis, the path is “Ph.D./Thesis Writing/Chapter 1″ where “Ph.D.” is the overall project name, “Thesis Writing” is the enclosing activity container, and “Chapter 1″ is the actual activity. Here’s what this view looks like:

    Unfortunately, there wasn’t a way to only include just the Milestones. So if you go down the list, it actually includes everything, but the other items don’t have a Subtitle of “Milestone.”

    Once you have this view, you can export the view as a comma-separated values file. Actually, it’s a semicolon-seperated values file, but let’s not be too picky. That gives you something that looks like:

    Title;Group Path;End Date;Subtitle
    Ph.D.;;04/25/2007 15:00;
    No Assigned Resources;;;
    "Michelle ""Ein"" Hoyle";;;
    CVS/Subversion everything;/Ph.D./Organization;09/23/2005 17:00;Milestone
    Analysis summary of Exp 1 and Exp 2;/Ph.D./Statistics;12/16/2005 17:00;Milestone
    WordNet lit. review document;/Ph.D./Literature Review;07/25/2005 18:00;Milestone
    IR/SE lit. review document;/Ph.D./Literature Review;12/09/2005 16:00;Milestone
    Semantic net lit. review document;/Ph.D./Literature Review;03/22/2006 18:00;Milestone
    Modified prototype;/Ph.D./Formula Work;02/03/2006 13:00;Milestone
    Revised analysis summary document for Exp 1 & 2;/Ph.D./Formula Work;02/08/2006 18:00;Milestone
    Analysis summary document for Exp 3;/Ph.D./Experiment 3: Semantic Web;11/08/2006 18:00;Milestone
    Thesis committee 2006 report;/Ph.D./Communication/Thesis Committee 2006;05/24/2006 17:00;Milestone
    Published CSR document;/Ph.D./Communication/CSR Paper 2005;12/23/2005 15:00;Milestone
    Semantic web document;/Ph.D./Communication/Semantic Web Paper 2006;11/15/2006 16:00;Milestone
    Other: Copyright Clearance;/Ph.D./Thesis Writing;02/04/2007 11:00;
    Prepare Appendix 7;/Ph.D./Thesis Writing/Appendices/Appendix 7: NLP tagging;06/01/2006 17:00;
    Prepare Appendix 5;/Ph.D./Thesis Writing/Appendices/Appendix 5: Exp. 3 Documents;11/23/2006 18:00;
    Prepare Appendix 4;/Ph.D./Thesis Writing/Appendices/Appendix 4: Exp. 2 Machine/people data;06/22/2006 17:00;

    When I originally did this, I was having trouble with the date format in Merlin. Merlin was using European date formats and everything else in my computer was using the System-defined date method of mm/dd/yyyy and not dd/mm/yyyy. Before I could use this data elsewhere, I needed to fix the dates, so one of the first patterns I wrote was one to strip out the times and flip the month and day fields around. I eventually fixed that, so the flipping isn’t necessary, but one of the first steps in a BBEdit Text Factory is still to strip out the times. Before that, though, I need to remove the non-milestone entries. They’re the ones that end with a ; instead of “;Milestone”. The regular expression pattern “(^.*;\r)” will search for lines that end with a ; and replace the entire line. When I used “(^.*;$)”, I ended up with multitudes of empty lines.

    The next thing to do is get rid of the “;”. If I import it into another application, tabs would be better than ;. The pattern “;” replaced by “\t” solves that admirably, leaving the file more or less ready for the bulk of the manipulations that need to occur. Here’s an annotated list of the operations that the BBEdit Text Factory performs:

    Step Search Pattern Replace Pattern Comment
    1 (^.*;\r) “” Remove non-milestone entries from the list.
    2 ; \t Separate the fields with a tab instead of a semicolon
    3 (\d{2})\/(\d{2})\/(\d{4}) \d{2}:\d{2} \1\/\2\/\3 Remove the timestamp. Could be shorter!
    4 (\s)\/Ph.D.\/([^\/\t]+)(\t\d) \1\2\3 Split apart path info to grab overall activity type
    5 (\s)\/Ph.D.\/([^\/]+)\/.*(\t\d) \1\2\3 Something similar to above but works on remaining ones
    6 \tMilestone Remove Milestone comment as not needed
    7 \t$ Removing any trailing tabs

    Before doing all this, I need to manually remove the first four lines at the top of the file. I was able to write a regular expression to find/remove the first four lines, but then it would “replace all” What I needed was a “replace once” action, but that doesn’t seem to be a possibility in BBEdit at the moment. I should probably suggest it. The end result was something like this:

    CVS/Subversion everything                              Organization                09/23/2005
    Analysis summary of Exp 1 and Exp 2                    Statistics                  12/16/2005
    WordNet lit. review document                           Literature Review           07/25/2005
    IR/SE lit. review document                             Literature Review           12/09/2005
    Semantic net lit. review document                      Literature Review           03/22/2006
    Modified prototype                                     Formula Work                02/03/2006
    Revised analysis summary document for Exp 1 + 2        Formula Work                02/08/2006
    Analysis summary document for Exp 3                    Experiment 3: Semantic Web  11/08/2006
    Thesis committee 2006 report                           Communication               05/24/2006
    Published CSR document                                 Communication               12/23/2005
    Semantic web document                                  Communication               11/15/2006
    Chapter 1 document                                     Thesis Writing              01/04/2007
    Chapter 2 document                                     Thesis Writing              04/06/2006
    Chapter 3 document                                     Thesis Writing              04/20/2006
    Chapter 5 document                                     Thesis Writing              06/14/2006
    Chapter 6 document                                     Thesis Writing              07/12/2006

    The new version of OmniOutliner Pro is quite cool. They added many new column types to it to help people use it for things like David Allen’s Getting Things Done and building to-do lists with due dates, etc. As a result, it was possible to build an OmniOutliner document which contained months and years entered as top-level items with “due dates” as the first of the appropriate month/year and tell it to sort the document based on the “due date” column. Any items you added with due dates would then be sorted correctly. I set up a template with just this information in and formatted and spaced out the way I wanted. Then I could paste in my BBedit output. I’d end up with something like:

    Output after pasting into OmniOutliner

    Everything was at the same level. However, everything I’d just pasted in was still selected. I discovered that if I just hit the tab key, it made all the selected items subordinate to the items above them. Since the items above them were always the month/year headers, I got a perfectly arranged list like:

    Properly formatted and levelled OmniOutliner output

    Ta-da! How cool is that? Of course, it did take quite a bit of work to figure all that out. Now that I know how to do it, though, it’s easy-peasy to produce a similarly-formatted list. Here’s the set of steps in order, with a list of resources required at the end.

    Program Step Activity Resource
    Merlin 1 View->Workspaces->Milestones for Export Workspace view
    2 File->Export->Current View as CSV (Cmd-Alt E)
    3 Give it a file name and put it somewhere convenient output.csv
    BBEdit 1 Open the file output.csv
    2 Remove first 4 lines
    3 Text->Apply Text Factory->merlinMilestones ~Library/Application Support/BBEdit/
    Text Factories/merlinMilestones
    4 Copy result to clipboard
    OmniOutliner 1 File->New From Template->MerlinPhDMilestones /Data/Research/Timing/MilestoneReport_
    2 Paste clipboard into document
    3 With pasted content selected, hit the tab key
    4 Insert a date at <insert date> at bottom
    5 File->Save