Clip to DEVONthink Improvements

The current edition of the Clip to Evernote extension has some features that would be welcome in Clip to Evernote:

“Smart Filing” – Evernote suggests the destination note book based on content of the clipped article and of the notebooks. Not foolproof, but useful. With DEVONthink’s AI abilities, Clip to DEVONthink could do a lot better. (Of course this means extending “See Also and Classify” capability across all open databases and not just the current database – another change that would also be welcome.)

“Article Selection” – Ability to select part of the browser page for clipping, rather than the whole thing. Has been asked for in the past for DEVONthink – I for one would really like this improvement in Clip to DEVONthink

Also, get rid of the ugly, ugly, ugly HUD look to Clip to DEVONthink – it hasn’t aged well and is really unfriendly from a Section 508 perspective.

Amen, but I fixed it for you!

Disagree. I still like the HUD. Just my opinion.

+1-

There’s another feature that I would like to see in DT clipping extension: it could highlights if the currently viewed webpage is already captured in one of the open databases of DT (based on URL). This could be done with some visual “effects” of the button.

Of course if you captured a page as PDF it’s up to you to check if the two pages are identical or not.

I forgot: of course the extension should give the possibility to open the captured page in DT :wink:

For the time being I’m using a Keyboard Maestro macro to do this search (find it below).


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
	<dict>
		<key>Activate</key>
		<string>Normal</string>
		<key>IsActive</key>
		<true/>
		<key>Macros</key>
		<array>
			<dict>
				<key>Actions</key>
				<array>
					<dict>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>KeyCode</key>
						<integer>37</integer>
						<key>MacroActionType</key>
						<string>SimulateKeystroke</string>
						<key>Modifiers</key>
						<integer>256</integer>
						<key>ReleaseAll</key>
						<false/>
					</dict>
					<dict>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>KeyCode</key>
						<integer>8</integer>
						<key>MacroActionType</key>
						<string>SimulateKeystroke</string>
						<key>Modifiers</key>
						<integer>256</integer>
						<key>ReleaseAll</key>
						<false/>
					</dict>
					<dict>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>KeyCode</key>
						<integer>15</integer>
						<key>MacroActionType</key>
						<string>SimulateKeystroke</string>
						<key>Modifiers</key>
						<integer>256</integer>
						<key>ReleaseAll</key>
						<false/>
					</dict>
					<dict>
						<key>Action</key>
						<string>IgnoreCaseString</string>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>MacroActionType</key>
						<string>SearchReplaceClipboard</string>
						<key>Replace</key>
						<string> </string>
						<key>Search</key>
						<string>?</string>
					</dict>
					<dict>
						<key>Action</key>
						<string>IgnoreCaseString</string>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>MacroActionType</key>
						<string>SearchReplaceClipboard</string>
						<key>Replace</key>
						<string> </string>
						<key>Search</key>
						<string>*</string>
					</dict>
					<dict>
						<key>Conditions</key>
						<dict>
							<key>ConditionList</key>
							<array>
								<dict>
									<key>Application</key>
									<dict>
										<key>BundleIdentifier</key>
										<string>com.devon-technologies.thinkpro2</string>
										<key>Creator</key>
										<integer>1145992304</integer>
										<key>FileType</key>
										<integer>1095782476</integer>
										<key>Name</key>
										<string>DEVONthink Pro Office.app</string>
										<key>NewFile</key>
										<string>/Applications/DEVONthink Pro.app</string>
									</dict>
									<key>ApplicationConditionType</key>
									<string>Running</string>
									<key>ConditionType</key>
									<string>Application</string>
								</dict>
							</array>
							<key>ConditionListMatch</key>
							<string>All</string>
						</dict>
						<key>ElseActions</key>
						<array>
							<dict>
								<key>Application</key>
								<dict/>
								<key>IsActive</key>
								<true/>
								<key>IsDefaultApplication</key>
								<true/>
								<key>IsDisclosed</key>
								<true/>
								<key>MacroActionType</key>
								<string>Open1File</string>
								<key>NewFile</key>
								<string>/Applications/DEVONthink Pro.app</string>
								<key>Path</key>
								<string>/Applications/DEVONthink Pro.app</string>
							</dict>
							<dict>
								<key>Conditions</key>
								<dict>
									<key>ConditionList</key>
									<array>
										<dict>
											<key>ConditionType</key>
											<string>Menu</string>
											<key>MenuConditionSelectionType</key>
											<string>Is</string>
											<key>MenuConditionType</key>
											<string>IsEnabled</string>
											<key>MenuTitle</key>
											<string>Search…</string>
										</dict>
									</array>
									<key>ConditionListMatch</key>
									<string>All</string>
								</dict>
								<key>IsActive</key>
								<true/>
								<key>IsDisclosed</key>
								<true/>
								<key>MacroActionType</key>
								<string>PauseUntil</string>
								<key>TimeOutAbortsMacro</key>
								<true/>
							</dict>
							<dict>
								<key>IsActive</key>
								<true/>
								<key>IsDisclosed</key>
								<true/>
								<key>KeyCode</key>
								<integer>3</integer>
								<key>MacroActionType</key>
								<string>SimulateKeystroke</string>
								<key>Modifiers</key>
								<integer>768</integer>
								<key>ReleaseAll</key>
								<false/>
							</dict>
							<dict>
								<key>IsActive</key>
								<true/>
								<key>IsDisclosed</key>
								<true/>
								<key>MacroActionType</key>
								<string>Pause</string>
								<key>Seconds</key>
								<real>0.20000000000000001</real>
								<key>Time</key>
								<string>0.2</string>
								<key>TimeOutAbortsMacro</key>
								<true/>
							</dict>
						</array>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>MacroActionType</key>
						<string>IfThenElse</string>
						<key>ThenActions</key>
						<array>
							<dict>
								<key>AlreadyActivatedActionType</key>
								<string>Normal</string>
								<key>Application</key>
								<dict>
									<key>BundleIdentifier</key>
									<string>com.devon-technologies.thinkpro2</string>
									<key>Creator</key>
									<integer>1145992304</integer>
									<key>FileType</key>
									<integer>1095782476</integer>
									<key>Name</key>
									<string>DEVONthink Pro Office.app</string>
									<key>NewFile</key>
									<string>/Applications/DEVONthink Pro.app</string>
								</dict>
								<key>IsActive</key>
								<true/>
								<key>IsDisclosed</key>
								<true/>
								<key>MacroActionType</key>
								<string>ActivateApplication</string>
								<key>ReopenWindows</key>
								<false/>
								<key>TimeOutAbortsMacro</key>
								<true/>
							</dict>
							<dict>
								<key>Conditions</key>
								<dict>
									<key>ConditionList</key>
									<array>
										<dict>
											<key>ConditionType</key>
											<string>Menu</string>
											<key>MenuConditionSelectionType</key>
											<string>Is</string>
											<key>MenuConditionType</key>
											<string>IsEnabled</string>
											<key>MenuTitle</key>
											<string>as Icons</string>
										</dict>
									</array>
									<key>ConditionListMatch</key>
									<string>All</string>
								</dict>
								<key>ElseActions</key>
								<array/>
								<key>IsActive</key>
								<true/>
								<key>IsDisclosed</key>
								<true/>
								<key>MacroActionType</key>
								<string>IfThenElse</string>
								<key>ThenActions</key>
								<array>
									<dict>
										<key>IsActive</key>
										<true/>
										<key>IsDisclosed</key>
										<true/>
										<key>KeyCode</key>
										<integer>46</integer>
										<key>MacroActionType</key>
										<string>SimulateKeystroke</string>
										<key>Modifiers</key>
										<integer>256</integer>
										<key>ReleaseAll</key>
										<false/>
									</dict>
									<dict>
										<key>IsActive</key>
										<true/>
										<key>IsDisclosed</key>
										<true/>
										<key>MacroActionType</key>
										<string>Pause</string>
										<key>Seconds</key>
										<real>1</real>
										<key>Time</key>
										<string>1</string>
										<key>TimeOutAbortsMacro</key>
										<true/>
									</dict>
								</array>
								<key>TimeOutAbortsMacro</key>
								<true/>
							</dict>
							<dict>
								<key>Conditions</key>
								<dict>
									<key>ConditionList</key>
									<array>
										<dict>
											<key>ConditionType</key>
											<string>Menu</string>
											<key>MenuConditionSelectionType</key>
											<string>Is</string>
											<key>MenuConditionType</key>
											<string>IsNotEnabled</string>
											<key>MenuTitle</key>
											<string>Cut</string>
										</dict>
									</array>
									<key>ConditionListMatch</key>
									<string>All</string>
								</dict>
								<key>ElseActions</key>
								<array/>
								<key>IsActive</key>
								<true/>
								<key>IsDisclosed</key>
								<true/>
								<key>MacroActionType</key>
								<string>IfThenElse</string>
								<key>ThenActions</key>
								<array>
									<dict>
										<key>IsActive</key>
										<true/>
										<key>IsDisclosed</key>
										<true/>
										<key>KeyCode</key>
										<integer>3</integer>
										<key>MacroActionType</key>
										<string>SimulateKeystroke</string>
										<key>Modifiers</key>
										<integer>768</integer>
										<key>ReleaseAll</key>
										<false/>
									</dict>
									<dict>
										<key>IsActive</key>
										<true/>
										<key>IsDisclosed</key>
										<true/>
										<key>MacroActionType</key>
										<string>Pause</string>
										<key>Seconds</key>
										<real>0.20000000000000001</real>
										<key>Time</key>
										<string>0.2</string>
										<key>TimeOutAbortsMacro</key>
										<true/>
									</dict>
								</array>
								<key>TimeOutAbortsMacro</key>
								<true/>
							</dict>
						</array>
						<key>TimeOutAbortsMacro</key>
						<true/>
					</dict>
					<dict>
						<key>Action</key>
						<string>Click</string>
						<key>Button</key>
						<integer>0</integer>
						<key>ClickCount</key>
						<integer>1</integer>
						<key>DragHorizontalPosition</key>
						<string>0</string>
						<key>DragVerticalPosition</key>
						<string>0</string>
						<key>Fuzz</key>
						<integer>0</integer>
						<key>HorizontalPosition</key>
						<integer>50</integer>
						<key>HorizontalPositionExpression</key>
						<string>50</string>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>MacroActionType</key>
						<string>MouseMoveAndClick</string>
						<key>Modifiers</key>
						<integer>0</integer>
						<key>MouseDrag</key>
						<string>None</string>
						<key>Relative</key>
						<string>Window</string>
						<key>RelativeCorner</key>
						<string>TopLeft</string>
						<key>RestoreMouseLocation</key>
						<true/>
						<key>VerticalPosition</key>
						<integer>190</integer>
						<key>VerticalPositionExpression</key>
						<string>190</string>
					</dict>
					<dict>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>MacroActionType</key>
						<string>Pause</string>
						<key>Seconds</key>
						<real>0.10000000000000001</real>
						<key>Time</key>
						<string>0.1</string>
						<key>TimeOutAbortsMacro</key>
						<true/>
					</dict>
					<dict>
						<key>Action</key>
						<string>Click</string>
						<key>Button</key>
						<integer>0</integer>
						<key>ClickCount</key>
						<integer>1</integer>
						<key>DragHorizontalPosition</key>
						<string>0</string>
						<key>DragVerticalPosition</key>
						<string>0</string>
						<key>Fuzz</key>
						<integer>0</integer>
						<key>HorizontalPosition</key>
						<integer>50</integer>
						<key>HorizontalPositionExpression</key>
						<string>50</string>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>MacroActionType</key>
						<string>MouseMoveAndClick</string>
						<key>Modifiers</key>
						<integer>0</integer>
						<key>MouseDrag</key>
						<string>None</string>
						<key>Relative</key>
						<string>Window</string>
						<key>RelativeCorner</key>
						<string>TopLeft</string>
						<key>RestoreMouseLocation</key>
						<true/>
						<key>VerticalPosition</key>
						<integer>190</integer>
						<key>VerticalPositionExpression</key>
						<string>190</string>
					</dict>
					<dict>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>MacroActionType</key>
						<string>Pause</string>
						<key>Seconds</key>
						<real>0.10000000000000001</real>
						<key>Time</key>
						<string>0.1</string>
						<key>TimeOutAbortsMacro</key>
						<true/>
					</dict>
					<dict>
						<key>Action</key>
						<string>ByPasting</string>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>MacroActionType</key>
						<string>InsertText</string>
						<key>Paste</key>
						<true/>
						<key>Text</key>
						<string>%CurrentClipboard%</string>
					</dict>
					<dict>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>MacroActionType</key>
						<string>Pause</string>
						<key>Seconds</key>
						<real>0.20000000000000001</real>
						<key>Time</key>
						<string>0.2</string>
						<key>TimeOutAbortsMacro</key>
						<true/>
					</dict>
					<dict>
						<key>IsActive</key>
						<true/>
						<key>IsDisclosed</key>
						<true/>
						<key>KeyCode</key>
						<integer>36</integer>
						<key>MacroActionType</key>
						<string>SimulateKeystroke</string>
						<key>Modifiers</key>
						<integer>0</integer>
						<key>ReleaseAll</key>
						<false/>
					</dict>
				</array>
				<key>IsActive</key>
				<true/>
				<key>Name</key>
				<string>Search URL in DT</string>
				<key>Triggers</key>
				<array>
					<dict>
						<key>FireType</key>
						<string>Pressed</string>
						<key>KeyCode</key>
						<integer>1</integer>
						<key>MacroTriggerType</key>
						<string>HotKey</string>
						<key>Modifiers</key>
						<integer>2304</integer>
						<key>TriggerRepeat</key>
						<false/>
					</dict>
					<dict>
						<key>MacroTriggerType</key>
						<string>StatusMenu</string>
					</dict>
				</array>
				<key>UID</key>
				<string>D99F70FB-F80D-4E46-9177-119B4C10023A</string>
			</dict>
		</array>
		<key>Name</key>
		<string>Safari</string>
		<key>Targeting</key>
		<dict>
			<key>Targeting</key>
			<string>Included</string>
			<key>TargetingApps</key>
			<array>
				<dict>
					<key>BundleIdentifier</key>
					<string>com.apple.Safari</string>
					<key>Creator</key>
					<integer>1936093801</integer>
					<key>FileType</key>
					<integer>1095782476</integer>
					<key>Name</key>
					<string>Safari.app</string>
					<key>NewFile</key>
					<string>/Applications/Safari.app</string>
				</dict>
			</array>
		</dict>
		<key>UID</key>
		<string>9928BC81-42DE-4764-93CB-3E2BEFB173A6</string>
	</dict>
</array>
</plist>


I was not able to upload it as a file (help appreciated here :slight_smile: ) so I pasted it as code:

  1. copy the code
  2. paste in Textedit
  3. save it as plain text file “Search URL in DT.txt”
  4. change the extension to “.kmmacros” and double click on it; it will be automatically imported in KM.

It’s just a kludge, an automation of the user interface to save some copying/pasting and clipping but it works for me.
Not being a script it could not work on your system and there’s no real debug I can do for you.
In such a case you’ll have to do some trial and error changes to the macro (time delays are usual culprits; try add some pauses between actions or increment the existing ones).

Usage:
wen you’re viewing a page in Safari press Alt-Cmd-S.
A DT full search window will pop-up showing a search for the URL of the current page.
If you captured one or more copies of that page, the records will be listed in DT windows.
Notice that DT will only search the open databases.

Thanks for the suggestion! DEVONagent Pro supports already a similar feature. If the current tab is already stored in one of the currently opened databases, then a small DEVONthink icon is displayed in the address bar.

Getting things from a browser into DT is probably one of the most frequent use-cases for DT. The Clip-to-DT window or the one that pops up when invoking one of the add-to-DT commands in the service menu are therefore likely among the most frequently used UI elements in DT. A second characteristic of DT is that such informational pieces are to be filed into groups or tagged (which is roughly the same) to keep your database organised and to utilize its lauded AI feature. Based on that, the Clip-to-Devonthink UI is enervatingly anemic. It doesn’t facilitate a quick way to file away an info piece for good in a personal DT setup that comprises a handful of databases with hundreds of groups and subgroups. I often need to store stuff in the inbox only to file it away later when I have probably forgotten where I wanted to file that info piece. Which forces me to reread that particular text. I like DT, I’m fine with most of its rare idiosyncrasies. But there’s one thing I frankly loathe: these anemic clip- or add-to-DT UI windows and the tedious filing process. Ever since I started using DT some 7 or so years ago. But I’m naively optimistic that a capable add-to UI comparable to the one in OmniFocus will be added to DT3 by 2015. :wink: