I have a giant Tinderbox document with a few branches in it. One branch is an outline of my PhD thesis, each node of which pulls in markdown documents stored in DEVONthink via autofetch. While this may sound obtuse, it works well for me, as I can edit the documents on DEVONthink To Go on my iPad and then update when I get back on my mac.
One of the things I do, as a consequence of this approach, is to leave me notes to deal with later inline with the text. {xyz: a note} {q: a question}, as I don’t use these parentheses elsewhere (other than through Bookends).
I would like to build an agent to sift through the Tinderbox document, looking for these markers. What I’d love to be able to do is extract the section question as a new note, link it to the original paragraph (or note, at the least), and capture these in a separate tree in the main Tinderbox document.
Am I thinking about this all wrong? Should I instead be splitting my notes down more granularly to capture these questions and notes to make it less crazy to aggregate elsewhere? I’m happy to write code to do this, but before I embark on an unrealisable mission, I’d like to do a quick sanity check.
Thanks for insights for anyone who has approached something similar, and not done it badly!
Would it be possible to just use double brackets around the question so that would create a new note with that text as the $Name?
Personally, I find there is some value in using a complete piece of text as the $Name of a note (e.g. “depression is widespread among military personnel” rather than “depression in military”). But I’m mainly using Obsidian these days, where it might make more sense.
This genius thought had never crossed my mind; thank you for the suggestion, Martin!
Okay, I added {{q:this is a double-bracket note}} to a note (which I’m editing in iaWriter as a .txt file, which lives in a DEVONthink indexed directory, so has a unique DEVONthink URL. The note in Tinderbox is updated with the new text neartly, the {{…}} is removed, and a new note is created under this imported note. However, it takes on the name of the note it is a child of (rather than the text between {{ and }}).
It’s doing a lot of things I’d like it to do already, but I have to do some research into how this note/link extraction works in Tinderbox, which I’ve not really looked at much. There’s also some possible madness happening on my side, as child notes of the parent note undergo some transformation and inheritance as it is.
But thanks for this suggestion; it’s a great idea I’d not thought about, and possibly using what was intended for one use in Tinderbox for another. Something to squander my weekend over!
I wonder what is processing the {{... }}. I understand curly brackets are reserved characters in Markdown although they have no formalised Markdown meaning—at least in the base Markdown flavour.
The characters don’t—unless I’m mistaken—have any processing intent for Tinderbox within $Text (as discrete from any Markdown behaviour).
That might suggest some other tool in the chain is doing the substitution. I note this only because while clearly it has had good outcome, I find it useful to know what did the work if only to guide triage on the day when the process doesn’t work as expected.
Meanwhile, Tinderbox can absolutely check through $Text for {...} or {{...}} sections of body text. There is no one right way so a place to start is to make a list of the different codes you wish to detect.
Curly brackets – {…} or {{…}} – have no meaning in MultiMarkdown, which is what DEVONthink uses, so there should be no conflict with the OP’s use of DEVONthink to Go. The curly brackets have meaning in some of the more esoteric and less-commonly-used versions of Markdown. Seems unlikely that the OP would have a problem with their scheme.
Edit: there is a case for using Critic Markup in DEVONthink notes, which does rely on { } curly braces. And DEVONthink’s “transclusion in the preview” effect mentioned by @brookter below.
Sure, I’d like to figure out what’s going on with those {{}} child notes as I think that’d be a really useful aspect of this. The overall workflow is planning and outlining in TB, linking to .txt files in DEVONthink (using an indexed directory so it’s on disk, with bonus points for Hookmark linking of all three), and mapping the TB notes URL field to the DT item URLs. DT’s magic is that the URLs remain consistent, so I can edit the same files when they sync elsewhere - I’m using iaWriter on my Mac and DT itself on my iPad - and then when I sit down to neaten things up with Bookends and overall editing on my Mac, a quick DT sync and TB agent update brings everything together.
Some years ago I begged for the edit panel to show multiple notes together, and allow editing of them - this is why. I select the notes in the outline, which then gives me a huge Markdown document in the edit view, which I copy-and-paste into iaWriter for Word export into Mellel for final wrestling and citation injection.
The only real barrier is that edits have to be done through the .txt files only, as changes don’t propagate outwards from Tinderbox - I considered this at one point (someone here some years back produced a bidirectional DT system), but decided I already had enough debugging of my own without introducing a potential new set of misinteractions.
I’m hoping to get a non-decrepit mac as soon as Apple release the new machines, for the next month or so. I will hopefully have figured out what’s happening with {{}} by then, which would be great. {} is already use by Bookends for cite-as-you-write annotation, which is why I hijacked their markup for my manual annotations (which I’d need to be able to insert in plain text files, for my workflow to make sense across devices and systems).
I’m as confused as @mwra as to how {{...}} automatically creates a so-called zip-link in a note inside a watched DEVONthink group, in Tinderbox. FWIW, even if [[...]], the “normal doubled square brackets” are used in a watched note, a new linked note is not created.
Could you, @DaveM, post a small video showing this in action?
Or perhaps due to time dialation you are using some Tinderbox version from the future?
Well. I’m as surprised as everyone else about this feature. And having tested it anew, it has let me down. I’d never really used ziplinks before, and deliberately kept clear of any documentation around them, so I was unsurprised to learn that they had some magical superpowers of which I was not aware.
There is a small risk there is some residual code I had half drafted to pull out text in {{…}} blocks, which may have triggered it instead (my test earlier today ran this on plain, I prototyped notes, so I suspect that I may have half-built the extraction code earlier and forgot about it).
It was so exciting for a minute. Sorry to be a source of disappointment, particularly about my temporal manipulation skills. My thesis suffers equally from this.
I’m not sure whether this helps, but {{document name}} is the DT3 syntax for file transclusion.
From the Help file:
File Transclusion: A special feature of DEVONthink’s Markdown handling is support for file transclusion. This provides the capability of displaying the contents of one file inside the contents of a Markdown file. This supports displaying the contents of: plain text, rich text, HTML, formatted notes, sheet, or more commonly, other Markdown files. For example, you may have several chapters of a book written in individual Markdown files. Use transclusion to view them all as one document with out the need to merge or copy and paste the content between files, similar to some popular writing applications.
To use transclusion, just enter the desired document’s name or item link between double braces, e.g., {{Chapter 1}}. Transclusion supports filenames with and without extensions, relative and absolute links, as well as item links. It also supports the Obsidian syntax, e.g., ![[Chapter 2.md]].
Is it possible that this is being translated into Tinderbox’s footnote feature?
Good point, but I cannot cause the {{bracketed}} text to create a note or footnote in the case of a watched DEVONthink group. The transclusion effect occurs in DEVONthink’s markdown preview mode – it doesn’t actually occur in the source file itself. It is the source file that is watched when Tinderbox watches a DEVONthink group.
I’ve just tried and I can’t get it work either – but it’s the only place I can think that DT3 uses {{ }} so thought there may be some connection.
Interestingly, sometimes (but not always), dragging a Markdown file which includes words in double square brackets ([[example]]) from DT3 will create a new sibling note called example in Tinderbox. I presume this is expected – I’d never noticed it before.
Yes, and I’m reminded better documentation/description of that process is on the spike at aTbRef HQ. I’m aware that whilst the individual operators are usefully described discretely, they are rarely used on their own but rather as part of a chain. I’ll think on this.