Workflow of notes in Devonthink Spotlight comments

Dear all,

I have a workflow of taking notes on cybersecurity topics to blog about, write articles and use as references for talks.

My workflow involves using Devonthink to store the relevant articles. While reading on the IPad I store relevant information in Devonthinks “Spotlight Comment” field.

Using an adapted version of Pauls TSV export script ([Script to Export Certain DEVONthink Metadata in a TSV for Tinderbox Import] I can import my DTP notes into Tinderbox. I changed the script to include the for me relevant information and changed it to .csv as on the hurry I wasn’t in the mood to figure out how Tinderbox evaluates the .tsv to create multiple notes, that might become important later on.

My notes in TBX look the following:

I have a reference-Prototype which includes the Tags I gave in DTP and the URLs to DTP and to the source. In addition I created a quotation-prototype which will be automatically linked to the corresponding reference and which copies the KAs relevant for me, e.g. the tags which I can the edit.

My idea is to have each reference cut down into small (quotation) snippets which I than can use in documents, link to … so that I do not only know which reference I used but also which information from it. I plan to do that with Links and in addition by giving every reference a unique ReferenceID which is copied to the child-quotation and would be used where I use the quotation.

So my 1st question would be, what do you think about that workflow? Comments, ideas, room for improvement?

The bigger problem comes now: I have a few hundred notes in DTP with comments in the spotlight comments. If I transfer a single note into Tinderbox I would
change the prototype to my reference prototype.
that will move the comment to $Text
I will manually explode the node
move the results of the explosion one level up out of the exploded container as child under the reference
so that the children automatically by the ref.prototype-onadd have the quote-prototype and are linked to their parent

That works like a charm for a few notes but imagine doing that for hundreds? Now I am stuck as I can not think about an agent doing the explosion and moving the aliases …

Any ideas? All help is welcome :wink:

Best regards,
Michael

What aliases?

Meanwhile…

Pasting in. If dragging drag in so as to be child of a container whose $OnAdd sets the correct ‘reference’ prototype. If pasting, it’s not possible to 'paste-as-child, but a workaround is to open your receiving container in a new tab and set it to Map view then paste into the map, making the pasted notes children of the container thus invoking the $OnAdd.

Explode. Currently there is no way to automate this though such a feature has been requested. However, the Explode dialog does remember last used settings in the session which means you only ned to set up the dialog once and thereafter just invoke and apply Explode.

Exploded Notes prototype. This gets added to your doc the on first time you do an Explode and is then applied to every Explode-generated ‘exploded notes’ container. So a good tip if designing a workflow using Explode, if this prototype isn’t already present do a quick text Explode and then delete it so as to ensure the prototype is added to your doc.

Exploded item’s prototype (see above): the - ‘Exploded Notes’ prototype can have its $OnAdd set to apply the quote prototype to its children - i.e. the newly-exploded notes.

Moving the newly exploded items up a level. Again use the same prototype’s $OnAdd:

$Prototype="Event";
$Container=$Container(parent);

Removing the empty ‘exploded notes’ container. Action code can’t delete notes, but it can move them. So you could make a ‘trash’ note and move the notes there and occasionally empty the latter manually. Anyway options here are:

  • Delete manually after explode. The empty container will be the first child so easily seen (in Outline, at least) selected and deleted.
  • A stamp or edict to move the empty container: $Container="/Trash"; - note the path to your ‘Trash’ note must reflect where it is in your doc (and what you named it if not ‘Trash’). For a stamp, select the empty container and apply the stamp; for an edict let the code just run and eventually the container will get moved. I think a rule is overkill in terms of unnecessary code overhead but you can force-invoke an edict via File menu → Update Agents now (as that also runs all edicts once). Don’t forget you can set the edit (or rule) via the Reference prototype as the parent of an explode will be a Reference note, as per your workflow.
  • An agent that looks for ‘exploded notes’ containers with no children and moves those to your ‘Trash’ note.Again, I think this is slight overkill unless you’re constantly importing/exploding notes.

… my suggestion - a stamp or edict.

Does that help? Note prototypes are doing the heavy lift. There’s no real need for agents.

I had the strange idea in my mind that an agent might dissect the imported note into pieces and then move the agents-aliases into the original reference container. Knowing that the moving might be tricky and reading your recommendations (which I have to understand fully and then I’ll come back) I should have made that clearer as an idea. Sorry.

No problem. :smile: I just wanted to be sure I’d not missed an important step or assumption.

Getting to know prototypes and their power is a real boost, even if it may be a bit perplexing at first. FWIW, I’ve no coding background so I’ve trodden this path before.

Those two ideas really seem to be the gamchanger! I didn’t realize that “exploded notes” is a prototype based container. Changing it properties and not to have to do the moving and deleting of notes/empty containers is a great timesaver.

It helps a lot, thanks! I spent quite some time in finding a way of commenting my references on the ipad and transferring these notes into Tinderbox, so this was what it seemed the last part of the puzzle. Ok, it never will be, but there’s hope :wink:

1 Like

Just to give a quick update: While the solution worked pretty nice I have the impression the .csv importer is pretty sensible. I managed now a few times to crash Tinderbox with a .csv and after exporting other notes from DTP it crashed by copying the “spotlight comments” to $Text. The last time with leaving the data in the file inaccessible. I am not really feeling like getting the last 1% out of the software and having such severe errors there is more than frustrating… So at least I hope Eastgate is able to recover the data and doesn’t let me go back to a backup…

If you haven’t already, please contact support, info@eastgate.com, as this is the quickest way to resolve such matters. I do a lot of ingest (my own and testing others’ data) and I’d note that non-loading files are rare. Clearly something in the imported text has resulted in data Tinderbox can’t read. Such examples are worth reporting as it enables the app to grow more robust defences to such input.

Your file contained an invalid Unicode character, probably because its original source encoded it incorrectly. The repaired file has already been sent to you.

Hi, and thanks a lot for your help which was much faster than anybody could ask for. 69 minutes until I got a repaired file back with an explanation. Wow!

1 Like