Simple Popclip Snippet Extension for Devonthink Annotation/Insert Quote

A feature I find to be convenient is the “Insert Quote” dropdown under Annotations - this lets me create an Annotations file with specific quotes from a PDF as well as links to that page:

image

I wanted to figure a way to automate this a bit since there is no pre-defined keyboard shortcut for that feature. So I added that under System Preferences/Keyboard/Shorcuts:

image

It works but I would prefer to be able to activate this more easily by simply selecting text while reading a PDF inside Devonthink. So I created a Popclip extension.

The new Popclip Snippet feature makes it very easy to add a new extension. If you have Popclip loaded just highlight the text below and click when it offers the option Install Extension "Devonthink Quotes"

The result is a Popclip extension called DQ which appears when highlighting text but only appears when doing so within Devonthink 3 and not in other apps.

# popclip
name: Devonthink Quotes
icon: square DQ
Key combo: ctrl command shift Q
required apps: [com.devon-technologies.think3]
#end
6 Likes

I’ve used PopClip for years and had no idea it could do that!

I love this and had no idea that I needed it until this morning. Thanks!

Welcome

Snippets are a fairly recent and very convenient feature:

More detailed documentation here:

2 Likes

Alternative Extension which both highlights the text in the PDF and also creates an annotation:

# popclip
name: Devonthink Quotes
icon: square DQ
javascript: |
    popclip.pressKey('L', util.constant.MODIFIER_SHIFT|util.constant.MODIFIER_COMMAND)
    popclip.pressKey('Q',  util.constant.MODIFIER_CONTROL|util.constant.MODIFIER_COMMAND|util.constant.MODIFIER_SHIFT)
required apps: [com.devon-technologies.think3]
#end
1 Like

Nice!

Now, if we can just add other highlight colors to the PDF toolbar in DT… :wink:

?

Like in Preview where you can choose different colors quickly:

image

You can use the same methodology and create a different Popscript extension for each color you wish:

image

1 Like

Umm…

This is in DEVONthink’s Editing bar…
Screen Shot 2022-01-17 at 03.42.53 PM

Weird–I can see how to change the color in the Format menu–but nothing in the Editing bar…right click, option click…I get no options there…

A screen capture of what you’re looking at would possibly help.

Same question here

I can select color via the Format menu but I do not know how to make it appear as part of the editing bar.

Same here; Jim, the drop down simply doesn’t appear (this is with the Editing bar in the preview section of the main window). Ah, long-click opens the dropdown.

1 Like

I made a shortish screen recording–same behavior under both Catalina and Big Sur.

Not sure the best way to share it–so here is a YouTube link.

Learned something new!

Ahah!

After all these years… still new tricks to learn!

1 Like

Indeed, that is the case.
Class dismissed. :stuck_out_tongue::wink:

2 Likes

This looks very useful, but I do not see any place to find ‘Install Extension “DevonthinkQuotes”’. It is not in Popclip. I see no option to install any extension like this at all. Am I looking in the wrong place?
Don Spady

I don’t know what I did wrong, but I tried it again and it worked. Maybe I had not copied the whole clip.
At any rate, thanks for the extension.
Don