Help with an adornment action, please

I have the following actions for an adornment and am dragging RTFD documents in from DEVONthink Pro Office.

$OnAdd:$AutoFetch=true;$Prototype=“Ecosystem Prototype”;$TopicType=“Chemistry”;$Color=“orange”;$KeyAttributes=“TopicType”;$Status==“Chemistry”

The EcosystemPrototype is set up to put the URL, SourceCreated, and SourceModified in the key attributes, and those show up for the dragged in notes. Also the notes do turn orange from the adornment actions. However, the TopicType doesn’t show up in the key attributes list.

Can someone please tell me what I’m doing wrong?

Also, I don’t have that many notes in this DB, but it is responding very slowly to changes, so I know something else is wrong that I’ll try to troubleshoot later.

Thanks in advance,
Bob

I assume the line breaks in the action code in your posting are an artifact of the way the forum formatted your code, and are not present in the code itself.

Are you dragging the notes from DEVONthink to Tinderbox and then dragging them onto the adornment?

$OnAdd: is not valid syntax.
$Status=="Chemistry" is also not a valid way to set the value of $Status. This "==" is a comparison operator, not an assignment operator.

What you want to be doing is open the inspector for the adornment and set Action to something like this:

If your prototype is setting key attributes and your on-add action is also setting KAs, then its possible you’ll have conflicts. The code in the example is the method to add an attribute to an existing KA list. But, I wouldn’t even do that. Set KAs with the prototype, not with the action code.

Thanks, I’ll try to work my way through this. I really appreciate it!

Bob

To clarify: if the prototype has key attributes, and the OnAdd action sets key attributes, the OnAdd action overrides the inherited values.

When I started to experiment with importing files from DevonThink I also wondered why - although I had assigned the correct prototype to these imported notes - the list of key attributes was missing several items. In fact it only included:

  • URL
  • SourceCreated
  • SourceModified

The trick here is to apply a

$KeyAttributes=;

as someone in this forum suggested. Afterwards all key attributes set by the prototype will also applied to everything imported from DT.

Thanks for all the help and comments. I seem to have it working now. I created a separate prototype for Imported from DEVONthink too. The $KeyAttributes+ worked also. Paul, in response to your question as to whether I was dragging to Tinderbox or the adornment, I was originally dragging to the adornment. Your question caused me to think that I have seen somewhere to drag them into TB before adding to the adornment. Is that correct?

My TB file is still really slow, so I need to look for whatever else I might have wrong,

Update: I’ve locked DTPO up twice now by dragging an RTFD to TB. Anyone else had this problem?

Update 2: DTPO now locks up every time I drag an RTFD into TB. It is unusable for this at this point. Any suggestions?

Send your file to Eastgate – it’s not really the kind of problem the user forum can address.

RTFDs are tricky files – because they are packages that contain images and other files. If you have sample RTFDs you can send to Eastgate, it would be helpful.

Hi Paul, it was the RTFD format. I converted them to plain text and they work. However, some of the plain text files take a long time to make a note. I’m not sure I am using TB the way it is meant to be used, frankly. Having to convert the documents to plain text makes them really hard to read. I was hoping to have them in TB to read and look for relationships that might be useful linking between them, but I’m spending all my time just getting them in. I’m thinking that many of these reports are just too big for TB, 122,000+ words and so forth. I think I’m running into a problem of incorporating TB into my workflow in a useful way and not sure that I can. Perhaps I should try to find some examples of how others are using TB in compiling information for research-type reports.

Perhaps the best way to incorporate TB would be to read the documents in DTPO (or whatever app) and just grab the most relevant snippets from the documents and put them into TB? If so, then I need to study TB some more to get a handle on how to coordinate and relate the relevant notes to one another. I thought I was doing pretty good just to get the prototype and adornments to manage the notes the way I did! LOL. Perhaps I should have considered the “what for” first, but I know why I did it. I’m determined to learn how to use this program.

Multiple 122,000+ word documents loaded into one file with pictures included would be taxing for most software.

I’d suggest exploring the numerous ways to do research note taking and annotation in DEVONtnink, then cull your notes to the essential bits and work with that smaller universe in Tinderbox.

Hi Paul, thanks so much, once again. OK, so I do the reading and annotation in DTPO and extract those important pieces from the documents. Then would you suggest that I make separate documents in DTPO from those snippets before taking them into TB? That way the links would follow I suppose. Do you have a suggestion for how to avoid losing track of the citations while in TB? Would the best way to manage that to be simply copying and pasting the original document’s DTPO link into the TB note? At the end I would like to get my notes, quotes, citations, etc. into Scrivener, but I suppose that is a question for another day in another part of the forum.

Tinderbox generally expects that individual notes will be fairly concise – that they typically are focused on one thing.

This is more of a topic for DEVONthink’s forum. There are numerous annotation methods one can explore with scripts and templates available for DEVONthink. Look for one that either includes the source document’s URL in the body of the annotation, or includes the source URL in the DEVONthink URL property for that annotation note.

If your annotations are stored in DEVONthink in a folder that you then Watch in Tinderbox, then the source URL data will be imported by the Tinderbox “watching” process.

(I realize the DEVONthink forum is difficult to search and there are tens of thousands of threads, so finding anything there is daunting. There are numerous blogs that cover the topic of note taking / annotation with DEVONthink better than the forum – Jeff Taekman’s or Chris Mayo’s for example.)

How about the halfway house of RTF, then? That way, you don’t get the problem of images messing things up, but you get the advantage of formatted text.
If there’s scope for you to do file manipulation in the Finder, you can use Terminal to do manipulations of this type:

`textutil -convert rtf -font Avenir -fontsize 16 *.txt`

(Convert all txt files in the current directory to rtf, changing the font to Avenir 16)

You could use the New Terminal at Folder Service to navigate to the relevant directory if necessary.

Another thing to consider: In DevonThink, you can select a chunk of text in a document and drag that out to a folder of your choice. (You might want to keep it in the same folder as the original document.) You could do that for multiple snippets in the same document, and then convert the snippets into the format you want for Tinderbox, going through the Finder if necessary. The snippets don’t need to be explicitly linked back to the main document, because DT’s search and See Also will notice that the text in the snippets is identical to part of the main document.

The unfortunate bottom line is that, whatever wonderful AI features DT has, at some point, with only limited time at your disposal, you need to read through something that is too big and long to be read easily. Making snippets for parts of the document that you have decided are important is a good first step at asserting some agency over the process, whether or not you take them over to Tinderbox. And, since your decision regarding which bits are important is not irrevocable—you can always go back and get another snippet from a section that you have subsequently decided is key—you can start moving snippets over to Tinderbox before you’ve finished reading the document.

I’m not sure this is helpful, but this is how I think of the DT – Tinderbox relationship currently.

Hi rickdude and everyone, thanks for your help.

rickdude, that is an interesting workflow and I’ll give it a try when I can; sounds very helpful. I didn’t know one could do that in Terminal, so that is a good thing to know. As I recall, I tried to convert the DT PDFs into RTF, but I couldn’t find a way to avoid the RTFD format, it was either that or text I think. Perhaps I’m misremembering, I teach a late class on M&W (out at 10:10 PM and then a 30 mile drive home) and am always tired the next morning (old person excuse, LOL).

The workflow I developed before I saw your comment was to open the file from DT into PDF Expert. I then marked it up in Expert and did “Export Annotation Summary” as text into a folder on iCloud (so I can access it everywhere, of course). At the end I’ll drag the whole folder into DT so it can do it’s magic and then, as needed, have Tinderbox watch the folder, etc.

You folks are all very helpful and a TB novice like myself really appreciates it!