How do I prevent TB to fetch the contents of PDFs when dragging 'n dropping from Devonthink

in addition every usage of one of those notes with the pdf—content in the textfield makes the pc unasable again for quite some time. The beachball of death being my best buddy…

Then use this script. See

2 Likes

Thanks, this is really helpful!

It would be nice if on the Devonthink side they allowed copying multiple links at a time. I use the on one at a time method to create summary notes that reference documents. Since I’ve been using TBX for many years, I’m very reluctant to embed any media files into the TBX file.

The easy way to do it is to select multiple DTP items and then use the contextual menu “Create Table of Contents”.
That creates a new note with clickable links. That note can be dragged into a TBX note providing links back to the documents, but as links with the names of files, not the plain URL links. Nicer for some uses.

You really should give the above script a try, works great for me.

Yes

After creating the TOC document in DEVONthink, which is an RTF, I suggest selecting all of its text and changing the List style to “none” so that the contents no longer is indicated with “1.”, “2.”, etc., Then copy and paste the TOC into a Tinderbox note. Afterward, you can explode the note to get a new note for every TOC entry and use a stamp to set $URL=$Text. Note: this stamp will not work. I’ll post one that does, later.

If you do not need a lot of notes, then it also works to select a URL in a Tinderbox note and drag the URL into the Outline, which creates a new note with $URL linking back to DEVONthink.

Hi Paul, thanks for that great piece of code, works like a charm.

In addition, James proposal with “Create table of contents” is a nice shortcut if only the links are needed.

Thanks a lot to all of you, great support here for newbies :slight_smile:

I was really hoping that this would somehow parse the RTF link and put that in the $URL, but it doesn’t for me. If the line of text is “tinderbox forum” and the RTF link is http://forum.eastgate.com then $URL gets set to “tinderbox forum” and is not clickable.

Am I doing something wrong?

No, I was doing something wrong by suggesting that stamp.

What actually works is to drag the RTF link from $Text to $URL – which loads the x-devonthink-item:// link into $URL.

I need to go back to the drawing board on the the stamp. Something using RunCommand will work. More later.

Ah yeah using something like nokogiri to parse the URLs would work nicely.

Tinderbox is not rendering the RTF links as HTML links when setting up an HTML export template. I thought it used to… but I also haven’t imported much RTF into Tinderbox, so maybe I’ve just used Make Web Link...

Do we expect the links from imported RTF text to be converted to HTML links on HTML export?

We might be wandering into another topic and I suggest posting this as a separate thread – just so other readers can locate it later.

I don’t know the answer, but I don’t know that I’ve ever tried this either.

For those who have TextSoap (IMO, everyone should have TextSoap :smile:) – select the text of the imported TOC document, and use TextSoap’s Extract URLs by Replacing cleaner to convert RTF links (as in the TOC document) to their original URLs.

These, of course, are all effective at getting rid of the content after it’s been imported. But, they do not prevent the content from being imported itself. This is not much of a problem when the PDFs are small, but is if they are large. It also seems like a waste to have the same information (i.e., the PDF content) ending up i two places (i.e., DT and TB). Would there perhaps be a way to only create a note that has the name of the DT item and its url when, for example, dropping with the option key pressed?

You can always make a note yourself and assign the DEVONthink URL to the note’s $URL.

Upon further consideration, I’m inclined to agree:

  1. It makes sense for Tinderbox to import the text of short pdf items.
  2. It is not particularly useful to import the text of very long pdf items.

Two design problems now confront us:

  • Where do we draw the line between “short” and “long?” (My suggestion: 2000 words. Other ideas?)
  • What (if anything) do we do to indicate that we chose not to import a long text. (For example, might we import just the opening paragraphs?)
1 Like

I am so happy to see this is took into consideration. It’s amazing how dragging “a few” DTP items with approx. 5 pages long PDFs or Websites printed as PDFs can render Tinderbox on my new iMAC unusable for quite some time.

But to answer your question: Do you really want to walk the path to let the user define the threshold between long and short? I would consider a switch PDF import yes/no as more than I dared to ask. Of course zero<value<unlimited is also ok, as long as zero is an option?

How long is “quite some time”?

I took 32 notes with PDF & Text drag and dropped from DTP into Tinderbox-Container. Size of each DTP item ist between 75 and 270kB. It took 80 seconds until Tinderbox became responsive again (beachball shown until then) And being in the container, switching from one note to the other it takes 1-2 seconds until the text-window is updated.

Model Name: iMac
Model Identifier: iMac18,3
Processor Name: Intel Core i7
Processor Speed: 4,2 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 8 MB
Memory: 32 GB

Please email a copy of these 32 notes.

Perhaps I am missing something fundamental here, but I don’t really see the utility in having TB import the contents of a PDF. The text of resulting import, being the raw content of the PDF, is essentially gibberish. I never care about the raw content, only the rendered document is of value to me. What am I supposed to do with something like the following?

I would much prefer to just get a note that links back to the corresponding DEVONthink item, and then use a collection of imported notes to build a map within TB, sort of a layer of abstraction that sits over the DT database.