Last active
August 29, 2015 14:02
-
-
Save Zettt/3e105bf8972366377cac to your computer and use it in GitHub Desktop.
Do you also have tons of tasks in your inbox, which you probably never going to do? Well, then this script has been made for you! It creates a new project where it will move all inbox tasks to. After your inbox is clear that new project is set to "dropped" and all that crap is out sight, forever.
This file contains 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 default document | |
-- crate quarantined project for tasks to be moved to | |
-- name in this version is »Quarantined Inbox: YYYY-MM-DD« | |
-- some other versions provided below, e.g. »Mon: 23. 06. 2015« | |
--set quarantineDayName to do shell script "date -v +0d +'%a: %d. %m. %Y'" | |
--set quarantineDayName to do shell script "date -v +0d +'%d. %m. %Y'" | |
set quarantineDayName to do shell script "date -v +0d +'%Y-%m-%d'" | |
set quarantineProject to make new project with properties {name:"Quarantined Inbox: " & quarantineDayName} | |
log quarantineDayName | |
-- get inbox tasks and move to quarantine folder | |
set inboxTasks to inbox tasks --of default document | |
repeat with inboxTask in inboxTasks | |
--set end of oldInboxTasks to inboxTask | |
if completed of inboxTask is not true then | |
--log name of inboxTask | |
move inboxTask to end of tasks of quarantineProject | |
end if | |
end repeat | |
-- mark project as done | |
-- alternatively you can write »dropped« which is | |
-- probably more appropriate | |
set status of quarantineProject to dropped | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment