Saving tweets into DTTG via iOS

Until this week, I have been using Tweetbot5 and the Sharesheet to save tweets into DTTG. This would result in the page title importing as the name of the bookmark. If I saved as Web Archive, it would reliably save threaded tweets. Starting earlier in the week, I get the following message “We’ve detected that JavaScript is disabled in your browser. Would you like to proceed to Legacy twitter?”

This will save the archive, but it uses the tweet id as the name and I have to go into DT3 to refresh past a Twitter screen saying “Something went wrong. Would you like to try again?”

Anybody using an app that reliably and easily saves Tweets into DTTG?

1 Like

That workflow doesn’t work very well on macOS either. Opening the tweet in Safari then printing a PDF to DT is what I typically do. Several steps, but it works.

Saving tweets is frustratingly hard in any tool. However, I find that DEVONthink has been one of the best tools for doing this. The trick (which was not obvious to me at first) is that you need to use DEVONthink as your web browser. Here’s the process I follow:

  1. Create a bookmark for the tweet in DEVONthink.
  2. View the bookmark in DEVONthink (e.g., by clicking on it). If you are not logged into Twitter from within DEVONthink, you will face the Twitter login page; log in normally, as you would in the web interface for Twitter. Thereafter, you will be able to read Twitter normally from within DEVONthink as if DEVONthink is your browser, because DEVONthink will manage sessions and cookies more or less like a regular browser.
  3. Use the menu item Tools ➜ Capture ➜ PDF, or the little gear icon next to the URL bar above the preview panel, to create a PDF version of a tweet you want to save.

Since I’m not always browsing the web from DEVONthink, I wrote a small AppleScript to shorten steps 1-2 above into a single step. The script is meant to be run from Safari; it takes the current location in the Safari browser window, tells DEVONthink to create a bookmark for it, then switches to DEVONthink and opens the bookmarked location in a new window. The code is open-source and available from one of my GitHub repositories, but it’s short enough to include here:

-- ==============================================================
-- @file    Open current Safari location in DEVONthink
-- @brief   Create a bookmark in DEVONthink & open it
-- @author  Michael Hucka <mhucka@caltech.edu>
-- @license Please see the file LICENSE in the parent directory
-- @repo    https://github.com/mhucka/devonthink-hacks
-- ==============================================================

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

global theURL
set theURL to missing value
global theTitle
set theTitle to missing value

tell application "Safari"
	try
		if not (exists window 1) then error "No window is open."
		set theTitle to get name of the current tab of the front window
		set theURL to get URL of the current tab of the front window
	on error error_message number error_number
		if error_number is not -128 then
			display alert "Safari" message error_message as warning
		end if
	end try
end tell

tell application id "DNtp"
	set theGroup to preferred import destination
	set theBookmark to create record with {name:theTitle, type:bookmark, URL:theURL} in theGroup
	open window for record theBookmark
	activate
end tell
2 Likes