Created
May 22, 2019 15:10
-
-
Save mattpetters/bdcd1609b4dd439c779b8feff2bbca4d to your computer and use it in GitHub Desktop.
Writes Due Soon & flagged to console, I use it for easy copy paste to trello
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "OmniFocus" | |
tell front document | |
-- Get the list of tasks | |
set theDueTasks to every flattened task where its completed = false and due date is greater than (current date) and due date is less than (current date) + (7 * days) | |
set theFlaggedTasks to every flattened task where its flagged = true and completed = false | |
set dueCount to count of theDueTasks | |
set flagCount to count of theFlaggedTasks | |
if theDueTasks is not equal to {} then | |
set reportText to "Due soon: | |
" | |
repeat with theItem in theDueTasks | |
set reportText to reportText & " " & name of theItem & " | |
" | |
end repeat | |
set reportText to reportText & " Flagged: " & " | |
" | |
repeat with theItem in theFlaggedTasks | |
set reportText to reportText & " " & name of theItem & " | |
" | |
end repeat | |
return reportText | |
end if | |
end tell -- end tell front document | |
end tell -- end tell application "OmniFocus" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment