Editorial Workflows

Send to Reminders.app

public workflow

Install Workflow...

This workflow contains at least one Python script. Only use it if you trust the person who shared this with you, and if you know exactly what it does.

I understand, install the workflow!

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: This workflow searches the current document for tags in the format @due(YYY-MM-DD hh:mm) and automatically creates task entries in the iOS Reminders.app. It is based on the Taskpaper format.

I've also tweaked the [TP] Set Due Date workflow to make it set the time.

Shared by: @macedotavares

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Document Text ?
Folded Text
  • Include
  • Replace with:
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import reminders
import datetime
import re

action_in = workflow.get_input()

lines_of_text = action_in.split('/n')

r = '-\s*(.*) @.*(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2})'

#set reminders
def SetReminder(t, y, mo, d, h, mi):
	r = reminders.Reminder()
	a = reminders.Alarm()
	r.title = title
	due = datetime.datetime(y,mo,d,h,mi)
	r.due_date = due
	a.date = due
	r.alarms = [a]
	print 'Reminder '+ title + ' added.'
	return True

for line in lines_of_text:
	for title, year, month, day, hours, minutes in re.findall(r, action_in):
		year = int(year)
		month = int(month)
		day = int(day)
		hours = int(hours)
		minutes = int(minutes)
		SetReminder(title, year, month, day, hours, minutes)

#TODO: Generate the output...
action_out = action_in