As some may have read, Pocket is closing down. This was a service where you would click one button in your browser and then put the current page on a reading list which you can subscribe to by RSS.
I wonder If I can replicate the same thing with DEVONthink. Currently what I do is:
Use DEVONthink Browser Plugin to store bookmark in DT Inbox
Switch to DEVONthink, add bookmark to DT Reading list
In DT move bookmark from Inbox to some dedicated group that stores all links that are on the reading list (or have been at some point).
This seems cumbersome. Can I make it āone clickā somehow?
You could probably write a script that you can trigger with a keyboard shortcut. Alternatively, set up a smart rule that runs on import and handles bookmarks arriving in a certain group the way you want. Save the bookmark from Sorter to that group.
Edit I think that the first approach might create less friction ā provided that you use a scriptable browser, ie Safari or Chrome. In that case, something like this might work.
The code is only rudimentarily tested!
(() => {
const browser = Application('Safari'); // change to 'Google Chrome' if necessary
const tab = browser.windows[0].currentTab();
const url = tab.url();
const title = tab.name(); // use tab.title() for Chrome
const DT = Application('DEVONthink'); // change to 'DEVONthink 3' if necessary
const groupID = 'xxxxxxx'; // UUID of the group you want the bookmark moved to
const newRecord = DT.createRecordWith({name: title, URL: url, record type: 'bookmark'},
{in: getRecordWithUuid(groupID)});
if (!newRecord) {
// Handle error
return;
}
const added = DT.addReadingList({record: newRecord, url: url, title: title});
if (!added) {
// Handle Error
return;
}
})()
DEVONthink already includes a script for Safari that might satisfy you: Add current tab to DEVONthinkās reading list (found in ~/Library/Scripts/Applications/Safari)
This adds a link to DTās reading list sidebar, without creating a database record. I like that ā it lets you read before you decide if you want a more permanent record. If you also want an actual bookmark item, it should be easy to modify.
If youāre not aware of the browser scripts: To use them, you have to enable the global Script menu from the settings of Script Editor.app:
Scripts in ~/Library/Scripts always appear in this menu, but otherwise it depends on the active application. As you might have guessed, each one has itās own folder in ~/Library/Scripts/Applications
If you prefer saving an offline version straight away, you could just keep using the sorter/clipper ā but add a readlist tag, which you keep in the favorites section of the sidebar for easy access.
Or you could set up a smart rule that adds stuff to the reading list when you clip/import with a certain tag.
Sounds like you want a history even if you clear the tag or remove things from the list� In that case you could set the rule to also move or replicate items to a dedicated group. Example:
I have just recently figured out a way of using DT as a read-it-later tool, that works for me and my specific needs.
I do most of my research in the blog reader Feedly. Feedlyās Pro account lets you create an automatic backup of the articles to Dropbox. So I just index those Dropbox folders into my DT Inbox. Luckily, Feedly saves articles as nice clutter-free web archives, which are easy to read and save.
For any articles outside of Feedly that x I want to save, I use my iPhoneās share command to save its bookmark to another folder in Dropbox, which is also indexing in my DT In box.
Then in Dropbox I use smart rules to scan those folders (on import, on launch), convert any bookmarks to a web archive, and move them to a āRead and Fileā folder. I also created a new DT database for āReferencesā, where I categorize and save my favorite articles.,
Iāve been using this system for the past month, and it has been a game changer for me. Articles I used to lose or forget, are now being collected in my DT database.
Ha. That triggered my curiosity, and I came up with a single script that works with Safari, Chrome and Edge (and possibly others that are scriptable after minor additions)
function run(input, parameters) {
const SE = Application("System Events")
SE.includeStandardAdditions = true;
const frontProc = SE.processes.whose({frontmost: true})[0];
const procName = frontProc.displayedName();
// Bail out if no supported browser is currently active
if (! ['Safari', 'Google Chrome','Microsoft Edge'].includes(procName)) {
SE.displayAlert('No browser selected');
return;
}
// Get title and URL of currently active tab
const app = Application(procName);
const window = app.windows[0];
const tab = procName === 'Safari' ? window.currentTab() : window.activeTab();
const url = tab.url();
const name = procName === 'Safari' ? tab.name() : tab.title();
SE.displayAlert(`"${name}": ${url}`);
}
One can create a service using Automator with this script and assign a keyboard shortcode to it. Itāll grab the title and URL of the active tab of the frontmost browser and (as it stands now) display them. The modification to add a bookmark to DT with this information is trivial.
Christian, apologies for being a total js newbye - I copied the script and pasted it into Script Editor, pressed āRunā - I get the message saying āNo browser selectedā. I suspect I should not defocus the browser(s) and focus Script Editor, right⦠how do I make this work?
You cannot run that script from script editor because then script editor would be the foremost program ā and it is not a browser, as the script correctly deduces. The aim is to have it run while the browser is the frontmost app. The only way I know is to install it as a service via Automator (see above). There may be other ways, perhaps @bluefrog knows more.
Thanks for all replies. Iām using Firefox which apparently is not suited for these scripts.
Searching around I found this old link
And then I noticed 2 things:
I donāt even know what the reading list is. Probably some sort of smart group or just list that exists in⦠well where? How does it sync? Does it sync with global inbox?
I donāt need the reading list. It duplicates what is already there because I can just put all my āPocket Linksā in a dedicated group (or tag them)
So it seems my question is moot. Iām just a bit sad that I now have two apps to read stuff later: DT and my RSS Reader. Sure I could use DT as an RSS reader but it does not work well for that purpose⦠or well, maybe I should try that. Has anything improved with RSS and sync in the last years? Different topic, though.
I have RTFH! (read the fine handbook) but it says nothing about my questions: It is on page 136. It is non-technical and low information density: āYou can put things to read later on the reading listā. āClick āremove itemā to remove an itemā. My questions are unanswered: What is the reading list? Is it part of a database (which?) and how does it sync? What do I need to sync to sync the reading list? I assume it is the global inbox.
If you look in ~/Library/Application Support/DEVONthink 3, you will see the file ReadingList.plist (and a bunch of other .plist files). I donāt know the technical details, but itās global just like your custom metadata fields.
In DTTG you have to enable āReading positionsā in the settings for a sync location. (I honestly found the labelling unclear without the above window fresh in mind.)
And yeah, no AppleScript with Firefox. If you want to use Firefox, the browser extension with a tag and/or smart rule is still an option.
Actually, if you want a one click solution, there is also the option of using bookmarklets. DEVONtech provides some here, and you can look at the URL commands in the manual for more ideas.
For example, adding a bookmark while specifying destination and tags: