palobo Posted January 20, 2013 Share Posted January 20, 2013 TaskPaper ActionsIs intended to be a set of actions for TaskPaper. For the time being, it has only my previous actions ported but I will be expanding on this as time passes in order to further functionality. Included Actions Extended Notes; Time Tracking with TicToc InstallationEither download the workflow from here or use AlfPT to install/update UsageExtended Notes Configuring this action is a simple matter of choosing your desired values and configuring the worklist variable. The variable is a list in the manner of: set workList to {{"note", "outline"}, {docPath:"/Users/pedro/Dropbox/Notes/", ext:"txt", appname:"nvALT"}, {docPath:"/Users/pedro/Dropbox/Outliner/", ext:"opml", appname:"Mindnode Lite"}} Breaking it down we have: Item 1 is a list of your tags. In my case I have “Note” and “Outline” Item 2 onwards is a list of records pertaining to each tag. So in the above example, item 2 is a list of the path where you place docs related to your Note tag and the extension of your Note tag (some may prefer txt, md, mmd etc.). Finally we have the app with which you want to open the note (must be apps exact name, correct caps and all) Item 3 pertains to tag outline.If you prefer more tags/document types then just expand on this. NOTE: If a document with the specified name doesn’t exist it will be created (Text file types only so far…) TimeTrackingYou need to have TicToc installed for this particular action. Before the first run it is important you customise the script with your preferred tags. @tictoc is the default “tracking” tag. The Value of this tag has to be the name of your task in TicToc. Take the following example: I would then have to have tasks in TaskPaper as: - Complete readme.md for script @tictoc(TaskPaper Timetracking) - Complete some random test @tictoc(test) NOTE: This is case insensitive so no need to be too fussy @running is the default for tasks being “tracked” After the first run you can set registered to true. It’s only needed on first run in order to register the script with Growl. ErrorsIn this first version, the script will output errors in the following situations: Entry selected is not a task; Entry selected doesn’t have a tracking tag (@tictoc default); Tracking tag is either empty or it’s value doesn’t correspond to a task/event in TicToc Caveats Unfortunately Tictoc’s AppleScript support is still rather limited and therefor I have no way of telling if a task is being tracked/timed except by the @running tag. This means that if you start a task in TPM and then stop it in TicToc, I have no way yet of syncing those changes (updating @running tag in TPM) so therefore all starting and stopping should be done in TPM. It is also not yet possible to create new tasks/events in ticToc with AppleScript so they will have to either already exist or be manually created beforehand. You MUST configure TicToc to allow tracking of multiple tasks otherwise things will get confused real quick Link to comment
palobo Posted January 20, 2013 Author Share Posted January 20, 2013 RoadMap Will update soon. ChangeLog Link to comment
canadaduane Posted January 25, 2013 Share Posted January 25, 2013 It took me 3 readings of the instructions to realize that the array elements of the first array {"note", "outline"} element correspond, in order, to the following 2 array elements of the outermost array. Why not just use an associative array, like this: {"note": {docPath:"/Users/pedro/Dropbox/Notes/", ext:"txt", appname:"nvALT"}, "outline": {docPath:"/Users/pedro/Dropbox/Outliner/", ext:"opml", appname:"Mindnode Lite"}} ? Link to comment
palobo Posted January 27, 2013 Author Share Posted January 27, 2013 It took me 3 readings of the instructions to realize that the array elements of the first array {"note", "outline"} element correspond, in order, to the following 2 array elements of the outermost array. Why not just use an associative array, like this: {"note": {docPath:"/Users/pedro/Dropbox/Notes/", ext:"txt", appname:"nvALT"}, "outline": {docPath:"/Users/pedro/Dropbox/Outliner/", ext:"opml", appname:"Mindnode Lite"}} ? Thanks for the suggestion, but I'll be reworking this now that there is non-volatile storage for workflow data. That way you don't loose anything when updating the workflow. This will be stored in a plist with interface for adding and removing options. Much more flexible. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now