I’ve created a long, +300 item list of starred articles in NetNewsWire. It’s become unwieldy and I was wondering if there’s a quick way to turn each of those articles into a bookmark in DEVONThink?
Once they’re in DT I can leisurely tag and group them as I see fit.
I am asking a similar question over in the NNW slack channel to see what kind of file I can get out of NNW.
Thanks.
NetNewsWire has OPML export but I don’t know whether articles are included (and can’t test because NNW requires macOS 10.15).
DEVONthink supports OPML import.
So you could
- export from NNW
- make sure the file got an
opml
extension - create a test database
- import into DEVONthink
Here is a simple AppleScript which will add selected article in NetNewsWire to DEVONthink with tag to read"" and a group of your choice.
property GroupUUID : " " -- Put id of a group where you want to create bookmarks
tell application "NetNewsWire"
set theName to the current article's title
set theURL to the current article's url
end tell
delay 0.3
set theTag to "to read"
tell application id "DNtp"
try
set theGroup to (get record with uuid GroupUUID)
set theBookmark to create record with {type:bookmark, URL:theURL, tags:theTag, name:theName} in theGroup
end try
end tell
My AppleScript skills is not robust, so perhaps someone can step in and expand functionality to repeat with each item in starred list in NetNewsWire.
Is this supposed to be a one-time event?
Is this supposed to be a one-time event?
Hopefully, no. When I used Feedly for RSS reading, there was a tagging functionality that I used to categorize and organize saved articles. Now with NNW, which is better than Feedly in every other way, my work flow is to save articles prodigiously and then go back and review and un-star the ones I had read or lost interest in. That workflow is fast and instinctive. The result though is that slowly I have accrued a ton of articles that I want to bookmark for reference and later research uses and NNW isn’t the place to store them. Sooooooo, ideally I would get these bookmarks out of NNW and into DEVONthink and try to stop the accumulation in NNW and maybe in three years I would do it again?(no promises)
If I could get this to work it would be another aspect of DEVONthink and NNW that fits into the “any device, any time” work model that suits my current situation and needs.
EDIT:Punctuation and quote
Did you try what I suggested?
I just downloaded the app and tested this out.
NetNewsWire has a very limited dictionary as well as very limited sharing and inter-application communication options.
You can only export per account, not groups or essentially smart groups.
Also, the exported OPML doesn’t produce functional feeds when imported into DEVONthink.
@cgrunenberg: Here is the exported OPML file…
Subscriptions-OnMyMac.opml.zip (1.3 KB)
By experimenting I have discovered that the OPML from NNW only includes the subscriptions and not the starred articles. Doing some reading in NNW-land leads me to believe this is true as well due to people changing syncstore locations in recent versions and discovering that the starred files aren’t part of the OPML export when they move from say, Feedly to iCloud sync store locations.
I have, however, discovered that the contextual menu of an individual starred article has a share entry that includes “add to DEVONthink 3”. That option is not available on a selection of multiple articles though.
Next I try the AppleScript…and thanks everyone for your assistance.
DT is a real brain anti-chaos agent for me and this is another step to reduce the clutter in my brainpan.
I’m curious why you’re not just using the feeds in DEVONthink?
You can add a star rating to individual articles and even set up a smart group in the database to show any starred items, like so…
It’s a good question
When I moved my note taking from Evernote to DevonTHINK, or soon after, I gave the DEVONthink feed reader a quick test. At that time it wasn’t as useful as what I was using which I think was Google Reader or Feedly. The requirements are ease of use, speed, an interface that lets me see as much of the article as possible, and easy navigation through my morass of feeds . NetNewsWire is an open source refresh of the first RRS reader I ever used and it works simply on all my devices and sync is fast. Reading news via RSS is the way I get the majority of information and news in my day to day so how I interact with RSS is very important to me.
The shorter answer is I am using NetNewsWire more out of habit, evolution, and support for the business and software model than a rigorous comparison of all all RSS readers ( I have tried a bunch though) but I am willing to give the DT RSS functions a run through to see if it could fit into my daily workflow. I’ll give it a test over the next few days and report back.
Sounds good.
I don’t see my use of NetNewsWire as a pain in any way.
It is a great RSS reader and I like how it works.
For the last few months as I’ve been working on the very early stages of research for a personal project. I have been grabbing articles from NNW when they ring all the right bells, I open them in Safari and read them through. If they pass that test I send the link to DevonTHINK, sometimes tagging it at the time and sometimes leaving it to be tagged later.
I know this uses three piece of software for one purpose but by doing so it allows me to keep a tab open of the articles I’ve read that day in Safari available for a re-read or as a reminder to look something else up. Back in DevonTHINK I have the saved bookmarks which I can later categorize with more specificity so that I can find it later.
By beginning to work this way I’ve discovered that DT would be a better place to keep my bookmarks for the long term and that means I have to look at the +300 bookmarks I accumulated in NNW from before I started saving things in DT.
In many ways this is a testament to how good DevonTHINK is as an auxiliary mind. I can and have used it to dump notes in to and also to keep track of all the documents of a small co-operative corporation I am a member of and that’s really great (they were all in Paperless but DT is way better). But then I have read about how people are using it to organize novel and book writing projects and then I got an idea for that and tried that out. I’ve also fooled around with markdown and specifically the Fountain script writing variant and tried that in DevonTHINK.
Now this research project comes along and I can add a bunch of RSS feeds to NNW and slowly begin to acquire some direction and it becomes obvious to me that saving the articles into DT along with the first writing stems is the way to go.
In all those steps at some point I had to decide whether to go back and transfer all the scripts, for example, that had been created before I figured out the DT as central storage. That’s where I find myself now with the RSS feeds. I am still using NNW for my daily reading and first level of research but I have a basic workflow to get it into DevonTHINK if I decide that is warranted.
I think I have learnt that having DT as the place where the files live is best but having other software as points along the way helps in the processing of all the information.
A dedicated script writing application is better than writing in DevonTHINK but I can still scratch out a Fountain formatted script correction in DT on my phone and send it to someone near a printer who can bring it to set.
This was longer than I expected but I’ve been rendering graphics out of AfterEffects all this time and been waiting for the ‘ping’ that just happened. Thanks for reading and all hail DevonTHINK!
@BLUEFROG @RDK
I copied @RDK 's script into a Keyboard Maestro loop (script, arrow up). I did it this way mostly for two reasons:
- I have no AppleScript skills and,
- I was able to watch as it stepped through each starred article while it added them to DT in the background.
I got a good quick eyeball of the kinds of stories and articles I have been saving for the last few years. (i.e. lots of food and cooking stories, even before COVID lockdown had me learning how to make ramen from scratch).
I far underestimated how many articles I had in the starred section. Final count was 784. It took all of 15 minutes from copying the script from this page to being done.
Thanks again for the script @RDK. And thanks to everyone for their help and suggestions.
This script creates bookmarks for selected articles.
If you set property onlyAddNew
to true then it first checks whether the group already contains a record with a given URL.
-- NetNewsWire - Export selected articles to DEVONthink
property theGroupUUID : "" -- Set UUID or Reference URL of destination group
property theTags : {"to read", "README"}
property onlyAddNew : true -- Only add bookmark if it doesn't exist in destination group
tell application "NetNewsWire"
try
set theSelection to selected articles
if theSelection = {} then error "Please select some articles"
tell application id "DNtp"
try
set theGroup to (get record with uuid theGroupUUID)
if onlyAddNew = true then
set theChildrenURLs to URL of children of theGroup
end if
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
return
end try
end tell
repeat with thisArticle in theSelection
set thisName to title of thisArticle
set thisURL to url of thisArticle
tell application id "DNtp"
try
if onlyAddNew = true then
if thisURL is not in theChildrenURLs then
set theBookmark to create record with {name:thisName, type:bookmark, URL:thisURL, tags:theTags} in theGroup
end if
else
set theBookmark to create record with {name:thisName, type:bookmark, URL:thisURL, tags:theTags} in theGroup
end if
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
return
end try
end tell
end repeat
on error error_message number error_number
if the error_number is not -128 then display alert "NetNewsWire" message error_message as warning
return
end try
end tell
I would like to thank you very much.
In the meantime, you can simply drag the highlighted articles from NetNewsWire into the DevonThink window. This triggers the import, which is a great feature.
Welcome @Alain
Thanks for sharing this tip!
It’s worth noting that the drag and drop option ends up importing HTML of the articles and not bookmarks.
I’ve been trying to get @pete31’s loop over selection script working but it errors out at
set thisName to title of thisArticle
with
- NetNewsWire got an error: Can’t get webFeed id “feed/kottke.org”.
@RDK’s script works one at a time though. I’ve tried smushing them together and/or making the simpler one loop over a selection but have hit my scripting wall.
NB:
And yes, in the 3 years since I cleared out my +300 starred articles in 2021, I’ve climbed ever so slowly back up to +400 starred articles.
- Have you now considered switching applications, e.g., Vienna?
- Have you just tried sharing to DEVONthink from NNW? Though I just noticed, DEVONthink and other options aren’t available with multiple selected articles.
Vienna is MacOS only. I need a synced iOS and MacOS reader.
I discovered that 3 years ago as mentioned in the old posts. Would that limitation be the reason why the Applescripted attempt to process many records wouldn’t work?
Worst case scenario I can do what I did three years ago and use Keyboard Maestro to automate the script that does work and move on.
I get bogged down trying to learn AppleScript or JavaScript and lose sight of what I needed to get done in the first place. I am picking up some scripting skills but not fast enough to solve every problem I come up against. Sometimes you just have to grab the ugly solution that works now and get back to work.
This might be a good time for me to re-evaluate DevonThink as an RSS reader though. I need it to be fast and responsive in both platforms. One problem I remember is that I rely on the recently modified smart group in DTTG to show me new files across 5 databases. If that was filled with news feed items it would hamper my daily flow.
what I needed to get done in the first place
Which is… ? You previously mentioned “news” but I don’t see if this is personal, work, educational, etc. In my experience, people deluge themselves with tons of news feeds then are left with the flotsam and jetsam, with little of practical value.
I am picking up some scripting skills but not fast enough to solve every problem I come up against. Sometimes you just have to grab the ugly solution that works now and get back to work.
Well, don’t fall into the other trap: scripting isn’t the answer for every problem. Far from it.
Also, I think you (and many people) may need to decide what’s more important: inertia with an application or real automation possibilities. It’s a fortunate thing to find both, but it’s also much less common in the newer crop of apps that have come on the scene in the last 4-5 years, apps built with Electron, for example.