-
-
Save n8henrie/c3a5bf270b8200e33591 to your computer and use it in GitHub Desktop.
--taken from http://benguild.com/2012/04/11/how-to-import-tasks-to-do-items-into-ios-reminders/#comment-1346894559 | |
--set theFileContents to (read file "Users:n8henrie:Desktop:Reminders.txt") -- Change this to the path to your downloaded text file with your tasks in it! (Note the : instead of a / between folders) Or, just name them Reminders.txt and put them in your downloads folder | |
--set theLines to paragraphs of theFileContents | |
set theLines to {"task name 1", "task name 2"} | |
repeat with eachLine in theLines | |
tell application "Reminders" | |
set mylist to list "Your List Name" | |
tell mylist | |
make new reminder at end with properties {name:eachLine, due date:date "7/10/2014 3:00 PM"} | |
end tell | |
end tell | |
end repeat | |
(* | |
-- Properties that can be set for each task | |
name (text) : the name of the reminder | |
id (text, r/o) : the unique identifier of the reminder | |
body (text) : the notes attached to the reminder | |
completed (boolean) : Is the reminder completed? | |
completion date (date) : the completion date of the reminder | |
container (list, r/o) : the container of the reminder | |
creation date (date, r/o) : the creation date of the reminder | |
due date (date) : the due date of the reminder | |
modification date (date, r/o) : the modification date of the reminder | |
remind me date (date) : the remind date of the reminder | |
priority (integer) : the priority of the reminder | |
*) |
The due date is the actual due date, a piece of info; the remind me date is when your phone will alert you of the reminder. In the Reminders app, they are consolidated into one field, and changing this field will set both the due date and the remind me date, so they are never different. Other apps that hook into your reminders are free to set them separately.
Great script! I use this for my grocery list.
There is one problem with reminders on the iPhone, it doesn't let you order on name or any other way. It is ordered by the moment it was added.
My list is an already sorted list with groceries.
To solve this I added a delay for every line it adds. This way I know for sure it is getting ordered the way I want it to.
So:
make new reminder at end with properties {name:eachLine}
delay 10
Is there a way to script the "show" aspect of a reminder item?
What do you mean?
Thanks a lot for this example!
Helped me a lot with importing Omni-Focus CSV Export into Reminders! Added another Array with the description and copied the corresponding lines from csv into the script. Worked like a charm for about 200 entries.
since I searched for it a bit, I wanna add that you can also set the property allday due date (date)
to create a reminder that has not a specific time.
Thank you @chrisgrieser! I was bashing my head trying to get rid of the time component. The allday
keyword was the unlock.
Thank you for the property names! "notes" is "body", got it. This really helped.
Thanks everyone!
Is there a way to read the repeat value of a task?
And what is the difference between
due date
andremind me date
? Looks like the same value to me.