Last active
May 5, 2021 15:58
-
-
Save thespacedoctor/8c93c0370484c7103355bd768dbfc0f1 to your computer and use it in GitHub Desktop.
[MacOS Reminders to Taskpaper] convert list of uncompleted reminders and their notes to taskpaper format #taskpaper #reminders
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
-- OUTPUT A LIST OF UNCOMPLETED REMINDERS AND THEIR NOTES IN TASKPAPER FORMAT | |
tell application "Reminders" | |
set myList to "inbox" | |
if (count of (reminders in list myList whose completed is false)) > 0 then | |
set todoListNames to name of reminders in list myList whose completed is false | |
set todoListNotes to body of reminders in list myList whose completed is false | |
set output to "" | |
repeat with itemNum from 1 to (count of todoListNames) | |
set output to output & "- " & (item itemNum of todoListNames) & return | |
if item itemNum of todoListNotes exists then | |
repeat with para in every paragraph of (item itemNum of todoListNotes) | |
set output to (output & " " & para as string) & return | |
end repeat | |
end if | |
end repeat | |
else | |
set output to "" | |
end if | |
return output | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment