text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
set maxNumClassTasks to 1 | Rebalance.applescript |
set currentNumClassTasks to 0 | Rebalance.applescript |
set maxNumExerciseTasks to 3 | Rebalance.applescript |
set currentNumExerciseTasks to 0 | Rebalance.applescript |
set isInterviewPracticeToday to false | Rebalance.applescript |
set isProgrammingPracticeToday to false | Rebalance.applescript |
set isRelationshipTaskToday to false | Rebalance.applescript |
set isRecreationalVideoToday to false | Rebalance.applescript |
repeat with t in todaysTasks | Rebalance.applescript |
if (nowHours > 10) then | Rebalance.applescript |
if (name of t = "work out") then | Rebalance.applescript |
set t's completed to true | Rebalance.applescript |
if (name of t = "run") then | Rebalance.applescript |
log my logThis(t, tomorrowDate) | Rebalance.applescript |
set t's defer date to tomorrowDate | Rebalance.applescript |
if (name of t = "do shoulder PT exercises") then | Rebalance.applescript |
if (name of t = "make green smoothie (add Omega 3)") then | Rebalance.applescript |
if (name of t = "write 3 pages") then | Rebalance.applescript |
if (context of t is not missing value) then | Rebalance.applescript |
if (name of context of t = "book") then | Rebalance.applescript |
set currentNumReadingTasks to currentNumReadingTasks + 1 | Rebalance.applescript |
if (currentNumReadingTasks > maxNumReadingTasks) then | Rebalance.applescript |
if (containing project of t is not missing value) then | Rebalance.applescript |
if (name of containing project of t = "Videos") then | Rebalance.applescript |
set currentNumVideoTasks to currentNumReadingTasks + 1 | Rebalance.applescript |
if (currentNumVideoTasks > maxNumVideoTasks) then | Rebalance.applescript |
if (name of containing project of t = "Maintenance") then | Rebalance.applescript |
set currentNumExerciseTasks to currentNumExerciseTasks + 1 | Rebalance.applescript |
if (currentNumExerciseTasks > maxNumExerciseTasks) then | Rebalance.applescript |
if (name of containing project of t = "Interview Practice") then | Rebalance.applescript |
set isInterviewPracticeToday to true | Rebalance.applescript |
if (name of containing project of t = "Practice") then | Rebalance.applescript |
set isProgrammingPracticeToday to true | Rebalance.applescript |
if (folder of containing project of t is not missing value) then | Rebalance.applescript |
if (name of folder of containing project of t = "Classes / Skills" and name of containing project of t = "Tech") then | Rebalance.applescript |
set currentNumClassTasks to currentNumClassTasks + 1 | Rebalance.applescript |
if (currentNumClassTasks > maxNumClassTasks) then | Rebalance.applescript |
if (name of folder of containing project of t = "Relationship") then | Rebalance.applescript |
set isRelationshipTaskToday to true | Rebalance.applescript |
if (name of folder of containing project of t = "Recreation / Video" and name of containing project of t = "Tech") then | Rebalance.applescript |
set isRecreationalVideoToday to true | Rebalance.applescript |
if (isInterviewPracticeToday = false) then | Rebalance.applescript |
my deferInProject("Interview Practice", 4, todayDate) | Rebalance.applescript |
if (isProgrammingPracticeToday = false) then | Rebalance.applescript |
my deferInProject("Practice", 3, todayDate) | Rebalance.applescript |
if (isRelationshipTaskToday = false) then | Rebalance.applescript |
my deferInFolder("Relationship", 7, todayDate) | Rebalance.applescript |
if (isRecreationalVideoToday = false) then | Rebalance.applescript |
my deferInFolder("Video", 4, todayDate) | Rebalance.applescript |
log "COMPLETED Rebalancing" | Rebalance.applescript |
on dateISOFormat(theDate) | Rebalance.applescript |
end dateISOFormat | Rebalance.applescript |
on getTextTask(ListItem) | Rebalance.applescript |
set theContext to missingContextStr | Rebalance.applescript |
if (context of ListItem is not missing value) then | Rebalance.applescript |
set theContext to preStr & (name of context of ListItem) & sepStr | Rebalance.applescript |
set theAction to (name of ListItem) | Rebalance.applescript |
if (containing project of ListItem is not missing value) then | Rebalance.applescript |
set theProject to (name of containing project of ListItem) & sepStr | Rebalance.applescript |
set deferDate to "" | Rebalance.applescript |
if (defer date of ListItem is not missing value) then | Rebalance.applescript |
set deferDate to sepStr & my dateISOFormat(defer date of ListItem) | Rebalance.applescript |
return theAction & deferDate -- | Rebalance.applescript |
end getTextTask | Rebalance.applescript |
on deferInProject(projectName, deferDays, todayDate) | Rebalance.applescript |
set customProject to first flattened project where its name = projectName | Rebalance.applescript |
set customTasks to (flattened tasks of customProject where completed is false) | Rebalance.applescript |
repeat with t in customTasks | Rebalance.applescript |
log my logThis(t, todayDate + deferDays * days) | Rebalance.applescript |
set t's defer date to todayDate + deferDays * days | Rebalance.applescript |
end deferInProject | Rebalance.applescript |
on deferInFolder(folderName, deferDays, todayDate) | Rebalance.applescript |
set customFolder to first flattened folder where its name = folderName | Rebalance.applescript |
set customProjects to (flattened projects of customFolder) | Rebalance.applescript |
repeat with p in customProjects | Rebalance.applescript |
set customTasks to (flattened tasks of p where completed is false) | Rebalance.applescript |
end deferInFolder | Rebalance.applescript |
on logThis(ListItem, deferDate) | Rebalance.applescript |
set toLog to "Deferring " & my getTextTask(ListItem) & " to " & my dateISOFormat(deferDate) & return | Rebalance.applescript |
return toLog | Rebalance.applescript |
set x1 to dockSize + (displayWidth - dockSize) / 2 | Upper Right.applescript |
tell application "Safari" to close front document | close-safari-tab.applescript |
logConsole("SomeProcessName", "SomeMessage") | logConsole.applescript |
set consoleMsg to coerceToString(consoleMsg) | logConsole.applescript |
set consoleMsg to replaceSimple({consoleMsg, ASCII character 0, ""}) -- ASCII 0 breaks shell scripting | logConsole.applescript |
if length of consoleMsg is 0 then | logConsole.applescript |
set consoleMsg to "[EMPTY STRING]" | logConsole.applescript |
set shellCommand to "logger" & space & "-t" & space & quoted form of processName & space & quoted form of consoleMsg | logConsole.applescript |
return shellCommand | logConsole.applescript |
tell application "htcLib" to coerceToString(incomingObject) | logConsole.applescript |
set properties of the top left screen corner to {activity:application windows, modifiers:{}} | enableHotCorners.scpt |
set properties of the top right screen corner to {activity:notification center, modifiers:{}} | enableHotCorners.scpt |
set properties of the bottom left screen corner to {activity:all windows, modifiers:{}} | enableHotCorners.scpt |
set properties of the bottom right screen corner to {activity:show desktop, modifiers:{}} | enableHotCorners.scpt |
set listOfTodos to to dos | things-to-of.applescript |
set numberOfTodos to count my listOfTodos | things-to-of.applescript |
set progress total steps to numberOfTodos | things-to-of.applescript |
set progress description to "Processing Todos..." | things-to-of.applescript |
set currentPosition to 0 | things-to-of.applescript |
repeat with aToDo in listOfTodos | things-to-of.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.