Add extractTexttoDevonthink.scpt

This commit is contained in:
thanhtl 2025-05-23 15:45:51 +07:00
parent 08a54cc087
commit c7d350e63c

View File

@ -0,0 +1,16 @@
tell application id "DNtp"
set theSelection to selection
if theSelection is {} then
display dialog "Please select one or more PDF files first." buttons {"OK"} default button "OK"
return
end if
repeat with theItem in theSelection
if type of theItem is PDF document then
set pdfText to plain text of theItem
add custom meta data pdfText for "Tinderboxtext" to theItem
end if
end repeat
display dialog "Text extraction complete!" buttons {"OK"} default button "OK"
end tell