I’m well aware, but it often works as long as one reads along and checks it.
-- Download URLs as clutter-free PDF documents (Paginated)
-- Adjusted for use with DEVONthink smart rule.
-- Original script by Christian Grunenberg.
on performSmartRule(BookmarktoPDF)
tell application id "DNtp"
if BookmarktoPDF is not {} then
try
show progress indicator "Downloading..." steps (count of BookmarktoPDF)
repeat with BookmarktoPDF in BookmarktoPDF
set theName to name of BookmarktoPDF
set theURL to URL of BookmarktoPDF
step progress indicator theName
if theURL begins with "http:" or theURL begins with "https:" then
set theParents to parents of BookmarktoPDF
set theCopy to create PDF document from theURL name theName in (item 1 of theParents) with pagination and readability
repeat with i from 2 to (count of theParents)
replicate record theCopy to (item i of theParents)
end repeat
set creation date of theCopy to creation date of BookmarktoPDF
set comment of theCopy to comment of BookmarktoPDF
set rating of theCopy to rating of BookmarktoPDF
set label of theCopy to label of BookmarktoPDF
set state of theCopy to state of BookmarktoPDF
end if
end repeat
hide progress indicator
on error error_message number error_number
hide progress indicator
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
end try
end if
end tell
end performSmartRule