Last active
November 14, 2016 02:55
-
-
Save craigeley/9469798 to your computer and use it in GitHub Desktop.
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
-- enabling the next line will delete your current entries so that the creates new ones. I would enable it, but make a backup of your files on first run to be sure. | |
-- do shell script "rm -rf /Users/Path/to/Files/*.taskpaper" | |
tell application "Reminders" | |
set output to "" | |
repeat with i from 1 to (count of (reminders whose completed is false)) | |
set theReminder to reminder i of (reminders whose completed is false) | |
set reminderName to name of theReminder | |
set theList to name of container of theReminder | |
set dueDate to due date of theReminder | |
if (dueDate is not missing value) then | |
set output to date string of dueDate | |
set dayInt to text -2 thru -1 of ("00" & day of dueDate) | |
set monthInt to text -2 thru -1 of ("00" & ((month of dueDate) as integer)) | |
set yearInt to year of dueDate | |
-- Listacular due dates have to have a time associated with them. You can change 23:00 in the following line to anything you want | |
set output to "- " & reminderName & " " & "@due" & "(" & yearInt & "-" & monthInt & "-" & dayInt & " 23:00)" & return | |
-- Change the next line to the path to your Listacular folder | |
do shell script "echo " & quoted form of output & " >> /Users/USERNAME/Path/to/Files/" & theList & ".taskpaper" | |
end if | |
if (dueDate is missing value) then | |
set output to "- " & reminderName & return | |
-- Change the next line to the path to your Listacular folder | |
do shell script "echo " & quoted form of output & " >> /Users/USERNAME/Path/to/Files/" & theList & ".taskpaper" | |
end if | |
end repeat | |
return output | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment