Skip to content

Instantly share code, notes, and snippets.

tell application "Finder" to set theFolderList to files of folder POSIX file "/path/to/your/folder/" as alias list
set theProjectName to "New Project"
tell application "Things3"
make new project with properties {name:theProjectName}
end tell
repeat with x in theFolderList
set thePath to POSIX path of x
@codingbulljunky
codingbulljunky / finder_tags_to_papers_keywords
Last active October 18, 2018 20:56
Gets tags associated with a physical file (article PDF), and imports them as keywords in Papers3. Also makes a Things3 to-do for the article
on hazelProcessFile(theFile)
tell application "Papers"
set todayDate to current date
set pubList to every publication item
repeat with eachPub in pubList
set theImport to import date of eachPub
set theDiff to (theImport - todayDate) div days
if theDiff is 0 then
if flagged of eachPub is false then
@codingbulljunky
codingbulljunky / papers_keywords
Created October 10, 2018 19:06
Assign keywords to publication(s) in Papers by choosing from list of existing keywords.
tell application "Papers"
activate
set theKeywordList to {"New"}
set pubList to every publication item
repeat with eachPub in pubList
set theKeywords to keyword names of eachPub
if theKeywords is not "" then
if theKeywords is not in theKeywordList then
copy theKeywords to end of theKeywordList