Finding outdated URLs

Is it possible to build a Smart Group which can select (and display) all webarchives, URLs etc in my database which were added so long ago (!) that they are now unreachable - and so should either be deleted or edited back into life, please?

I cannot immediately see search criteria for ‘URL’ that would allow that (e.g. is older than…) in the Smart Groups edit box.

TIA!

No. What you need is an action that checks whether a given URL is reachable. But Smart Groups don’t perform actions. What you’re looking for is a Smart Rule.

There’s a Smart Rule script Check Links that’s shipped with DEVONthink. From help:

Check Links: Check if bookmarks are valid.

I never used it so don’t know what it does. Look at the script in DEVONthink’s “Smart Rules” folder

~/Library/Application Scripts/com.devon-technologies.think3/Smart Rules

You’ll probably find all necessary info when searching the forum.

Thanks, pete31!

I can see how that would be exactly what I want :slight_smile:

There’s no script under the Help menu; nor does my version (still on the trial: new to DT) have a Check Link in ~/Library/Application Scripts/com.devon-technologies.think3/Smart Rules.

But when I can find it, I’m sure it’ll help - once I know how to run it. Do I do that from Actions in DT’s toolbar, please?

Ah, sorry. I forgot that the Smart Rule script’s functionality now is included in a standalone Smart Rule action.

Create a Smart Rule and check the Actions dropdown.

Before you start to use Smart Rules please search in DEVONthink’s help for “Smart Rule”.

pete31,

Thanks again - I can see how to create a Smart Rule and how to run an External Script now.

The DT Help, ‘Smart Rule Scripts’ does indeed suggest - as you say, thanks - that ~/Library/Application Scripts/com.devon-technologies.think3/Smart Rules should contain a script named ‘Check Links’.

As I hope is clear from my screengrab, mine does not!

Do I have to put it there; if so, where do I get it?

Could it be missing because I’m still on the Trial version?

I maybe should have written “replaced”:

No, the trial is a full version.

The script is in my Smart Rule folder because DEVONthink doesn’t remove existing scripts - but you downloaded DEVONthink after the script had been replaced by the Smart Rule action Check Links, i.e. you never got a DEVONthink version that included the script.

So

I guess the action is called Check Links.

Thanks for your patience, pete31!

Yes, I found it - as part of the Actions Dropdown.

Tested it with a nicely-constrained subset - and it found a match.

How do I use it, though, please?

Can I have DT populate a new (Smart?) Group with all URLs which - say - do not resolve properly?

No. Changing a URL doesn’t change the modification date of a record.

As mentioned above I never used the Smart Rule script nor did I use the Smart Rule action …

Thanks! I’ll try looking in the log.

pete31, as I say, new to DT this week. So I appreciate your help and patience a lot :slight_smile:

1 Like

I’ve now had chance to experiment a little.

Completely understand the concept and syntax of Smart Rules etc. Thanks! Much more familiar with DT after a week’s solid work with it (And I do love it!)

I can now get the Smart Rule to work on imported URLs by setting the Rule’s predicates to ‘Check Bookmarks’.

But…

…most of my imported web locations are webarchives - in order to have the ‘original’ content always at hand to refer to. (Though am debating whether to switch to importing PDFs instead.

Anyone know of a way to script or set up a rule etc that actually looks at the URL associated with a webarchive and checks it, please?

TIA!

1 Like