Adding Links as HTML or Webarchive

I currently use DEVONthink only for PDF files. I am now looking for a way to quickly make web content available offline. Until now, I have been collecting it in GoodLinks, which optionally saves everything offline. However, the search function is not that great, which is why I thought, why not use DT for this?

Now the question is: How can I persuade DT to automatically archive URLs dragged and dropped into a folder instead of simply saving bookmarks? Is this really only possible by converting them afterwards using a command or rule? It would be nice if DT didn’t save the link as a bookmark in the first place, which I then have to delete.

1 Like

You could use the DT browser plug-in or the sorter, I guess. The ā€œIn & Outā€ section in the handbook is quite thorough on these things.

However, ā€œweb content offlineā€ is a very vague concept. Web content may change – should your offline version change then, too? Or parts of the content may change, think images or scripts – what is your offline content going to be then?

3 Likes

Thanks for the tip. I don’t like Plug-ins or the Sorter, but if it’s the best way, I’ll try it. I’m a drag & drop window guy, so I’ve got to learn new workflows. :wink:

Updating the offline content is not neccessary at the moment, but would be great. My main aim is to be able to work offline for some hours/days. In preparation, I would like to collect pages I want to read and research. Think of archiving some support pages from Apple and later then I search for topics like ā€œRebootā€ or ā€œiCloudā€.

1 Like

You could use a smart rule to convert the bookmarks to the desired format and move the original to the trash.

@Tekl:

And to illustrate the suggestions made here…

Also, this functions if you drag and drop a bookmark from your browser’s address bar into the targeted database.

3 Likes

Not drag-and-drop, but, my method for saving webpages and articles is: I set up a folder on Dropbox, and index it in DEVONthink. When I am reading an article I want to save in DT, I use the iOS share button to save its link to that folder. A smart rule I created in DT then converts the link to a web archive or whatever. It’s been working well for me.

3 Likes

Thanks for all your help. The smart rule seems to work. But how do I add steps to deal with the resulting PDF to rename or tag them? I would like to remove suffixes from website titles like ā€œ - Apple Support (DE)ā€.

I’ve tried ā€œConvert & Continueā€, but then I can’t delete the Bookmark.

1 Like

You could rename, tag etc. before converting?
(Or perhaps split the rule into two rules. Or use a smart rule script for even more flexibility.)

1 Like

There is only one active input in a smart rule. Convert & Continue changes the input from the originally matched document to the converted one.

You could begin with a Move to Trash then do a Convert & Continue. After that you can either use a Move or File action then Change Name or change the name before moving it out of the Trash.

1 Like

The HTML file gets the name of the website title and not the name of the bookmark. So it does not help to rename the bookmark before.

I tried it with a second rule, but I don’t know what’s the right trigger. These don’t work:

  • On Creation
  • After Saving
  • On Convert
  • On Download
1 Like

Thanks for the Idea. But how to move the converted file to the original location of the bookmark?

Does this location vary?

Currently not, but maybe in the future when dealing with multiple projects.

This would likely just require using a script action.

PS: The lowest friction option would be to clip in the desired format, e.g., PDF.

Okay, then I’ll try the clipper. Currently I don’t understand how to drag a link from Safari to the Sorter, so that it is saved as PDF. The Browser Extensions does only work when the website is visible. I want to archive URLs while reading, without opening links. I need to collect as much content as possible when I have spare online time.

I’ve seen the services menu, but it’s not very comfortable and slower than dragging.

1 Like

Currently I don’t understand how to drag a link from Safari to the Sorter, so that it is saved as PDF.

You don’t.

The Browser Extensions does only work when the website is visible.

That is the correct behavior.

I want to archive URLs while reading, without opening links.

What you are referring to is certainly unusual, especially as it’s unclear where you’re reading, e.g., Apple Support pages and just grabbing links to throw into DEVONthink?

I’ve seen the services menu, but it’s not very comfortable and slower than dragging.

There is no service to create a PDF in DEVONthink.


Here is a simple smart rule with an Apply Script action in it…

And the script…

on performSmartRule(theRecords)
	tell application id "DNtp"
		repeat with theRecord in theRecords
			if (record type of theRecord) is bookmark then -- Not required, but a good habit in case a Kind criterion is missing.
				with timeout of 3000 seconds -- Give it five minutes to work
					set newPDF to create PDF document from (theRecord's URL as string) in (location group of theRecord) with pagination
				end timeout
				if exists newPDF then
					move record theRecord to (trash group of (database of theRecord))
					set name of newPDF to ("converted_" & (name of newPDF) as string)
					beep 2 -- Just an auditory cue things went well.
				else
					log message "PDF creation failed." record theRecord
				end if
			end if
		end repeat
	end tell
end performSmartRule
2 Likes

Thank you very much.

So in conclusion: there’s no way to change the behavior of DT, how it will store URLs. Itā€˜s always bookmarks?

That’s right in case of dropped/pasted URLs. Just like dropping URLs to the desktop always creates bookmarks.

1 Like

Okay, thanks. The Desktop is not able to archive websites, but DT is, so I thought I can switch the default. Other Apps like GoodLinks or Anybox can do this. Maybe DT is not the right tool as the scripting stuff does not work on iOS.