Created
February 10, 2021 23:27
-
-
Save fatbattk/451e5508619288ecc6c8bac8343da1ad to your computer and use it in GitHub Desktop.
Automate deleting completed iOS Reminders w/o confirmation prompt.
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
// NOTE: to be used with Scriptable + iOS Shortcuts. | |
// Using this skips reminder removal confirmation prompts. | |
// uncomment to debug. QuickLook.present(JSON.stringify(args.shortcutParameter)); | |
// expects the Reminder List name. | |
const argsFirst = | |
typeof args.shortcutParameter === 'object' | |
? args.shortcutParameter[0] | |
: args.shortcutParameter; | |
const reminderList = argsFirst; | |
const cal = await Calendar.forRemindersByTitle(reminderList); | |
const reminders = await Reminder.allCompleted([cal]); | |
for (let i = 0; i < reminders.length; i++) { | |
let reminder = reminders[i]; | |
reminder.remove(); | |
} | |
Script.complete(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment