Taskpaper scripting


Continuing the discussion from TaskPaper 3.0 Preview (154):

Hi Jesse,

does this mean Taskpaper 3 will support plugins like @jamie 's filter plugin or @complexpoint 's perspectives plugin/scripts? Would it support them out of the box without modification, or support plugins “like” them, provided they were re-written in some way?

Taskpaper 3 plugins?

I don’t expect to support plugins for the 3.0 release. By “FoldingText style scripting” in my original post I mean FoldingText’s AppleScript support, not the plugin loading support.

Generally TaskPaper 3’s scripting API is broadly very similar to FoldingText’s. You have deep JavaScript access to the application. The differences would be:

  1. TaskPaper 3 is hosted in a native NSTextView… not a WebView. This means that scripts won’t have access to the DOM and won’t be able to put up UI’s as is required by Jamie’s filter plugin.

  2. TaskPaper 3’s model layer shares much of the same design as FoldingText… but it’s been rewritten a few times. Same high level design, but lots of name and API changes. So even if a FoldingText script only touches FoldingText’s model layer (no DOM) it still isn’t likely to just work in TaskPaper.

  3. Plugins such as @complexpoint 's perspectives plugin should be possible to port in a relatively strait forward manner. They will need to be move to an AppleScript file, but much of the code and logic should stay the same.

Longer term I might enable full plugins (instead of just accessing API through AppleScript). The API for the plugins isn’t really the problem. That’s already done (or well will be). The problem is the UI for managing the plugins. It takes a lot of work, and I kinda feel like the UI that I build for FoldingText is both doing to much and not enough at the same time. Anyway I’ll think more on full plugins after 3.0, but I only expect to support AppleScript access to the API for 3.0.