TaskPaper ⇄ Tinderbox import export

As for the finer-grained picture, I’m not sure which, if any, of the details interest you, but the stages are:

  • A thesaurus of all the tag names found in the TaskPaper source, each with a list of all the values they contain, and a guess of their type, in terms of the main type names available in Tinderbox,
  • a check that any userMappings dictionary settings are well-formed,
  • a default rosetta dictionary defined by any userMappings settings, with gaps filled in by reference to the thesaurus,
  • and a final check of the default rosetta dictionary against the target Tinderbox document, creating any missing attributes in that document, and reporting any type clashes.

For more confidence and clarity, we could add a further check, after each value is written to an attribute, that the value has been successfully parsed, and hasn’t been discarded in favour of a default. (logging any losses to some stream or dialog)

( As Apple-Event interfaces are a little slow, that would add some seconds to each script run, but it might be worthwhile )

Another possible phase (which I think I mentioned before), is a structural rewrite which absorbs some subset of TaskPaper leaf notes as Tinderbox $Text attributes of their parent items (tasks or projects).

(I’m not sure whether that matches your workflow)

Dear Rob,
Thank you! This is extremely helpful and a very flexible solution. I’m likely to be specifying TaskPaper tags to explicitly typed Tinderbox Attributes.

I’ll get back to you soon with more. Your last point, about absorbing the leaves as $Text attributes, is really interesting too. I’ll need to think about the consequences. Off the top of my head, I think it would actually match my workflow, because the leaves often consist of the most particular information that doesn’t lend itself to classing according to TBX attributes.

All the best,
Maurice

Dear Maurice,

This conversation is awesome, but I feel as if someone comes into it in the middle of it, he will get quickly lost. Would it be possible to condensed all of this into a new post that would be helpful to a future user like you that is looking forward to integrate Hook, Tinderbox, and TaskPaper? That will be an incredible contribution to this community and one of the things that makes TaskPaper such a good program. That it has such an amazing community that puts so much of their time to make this a better program.

1 Like

I’ve taken the liberty of moving the TaskPaper ⇄ Tinderbox import export component to its own thread here.

Once the import and export scripts have settled down, I’ll put them in the Extensions Wiki here, and (with some notes on options and implementation) on Github.

1 Like

Dear Victor, Dear Rob,
Thanks to you both for these excellent suggestions and ideas.
It’s fascinating to see how Rob manages to refine these scripts and I am sure
others will benefit too. Thanks again.

All the best,
Maurice

Dear Rob,
Apologies for my delay. I’ve been busy with publication deadlines.

This script works very well. One hiccup that I just sorted is that for some reason the Tinderbox type of URL should actually be all lowercase? One would have no way of knowing this from the documentation see e.g. ReferenceURL where the type is listed as URL not url. Once I adjusted for this in the script like so:

            // knownTBAttributeTypeNames :: () -> [String]
    const knownTBAttributeTypeNames = () => [
        'boolean',
        'color',
        'date',
        'file',
        'interval',
        'list',
        'number',
        'set',
        'string',
        'url'   //In place of 'URL'
    ];

I could then specify the type ‘url’ in the user defined attributes, and it worked well. Without your excellent error reporting built in, I never would have seen this problem.

With this matter solved, I’m going to work on figuring out how I’m going to send some of the @todo @duedate taskpaper tags to Omnifocus. I think that should be more straightforward than this.

I’ll keep tinkering with this script though to see if I can find any other of these strange cases which pop up.

Thanks again.

All the best,
Maurice

Good catch ! Thank you for all the testing work …