Last active
December 27, 2015 05:24
-
-
Save joechrysler/950d7360c5d523a31ea5 to your computer and use it in GitHub Desktop.
Revisions
-
joechrysler revised this gist
Sep 28, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ on run {input, parameters} set remDetails to nameObj & " " & bodyObj set timeStr to time string of compDateObj set shellTxt to "echo " & quoted form of remDetails & " | /usr/local/bin/dayone -d=\"" & dateStr & " " & timeStr & "\" new" do shell script shellTxt --delete reminderObj --uncomment this line to auto delete completed todos -
joechrysler created this gist
Sep 28, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ on run {input, parameters} tell application "Reminders" if (count of (reminders whose completed is true)) > 0 then set todoList to reminders whose completed is true repeat with itemNum from 1 to (count of (reminders whose completed is true)) set reminderObj to item itemNum of todoList set nameObj to name of reminderObj set compDateObj to completion date of reminderObj if (body of reminderObj) is not "" and (body of reminderObj) is not missing value then set bodyObj to " Notes: " & body of reminderObj else set bodyObj to "" end if set dayInt to day of compDateObj set monthInt to month of compDateObj as integer set yearInt to year of compDateObj set dateStr to ((monthInt as string) & "/" & dayInt as string) & "/" & yearInt as string set remDetails to nameObj & " " & bodyObj set timeStr to time string of compDateObj set shellTxt to "echo " & quoted form of remDetails & " | /usr/local/bin/dayone -d=" & quoted form of dateStr & " " & quoted form of timeStr & " new" do shell script shellTxt --delete reminderObj --uncomment this line to auto delete completed todos end repeat else set output to "No completed reminders" end if end tell return input end run