Editorial Workflows

Print Org TODOs

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: Scan org files for lines containing todo keywords. Create an on-the-go todo list.

Shared by: @john_chris_c

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Run Python Script ?
Source Code
# Be sure to delete GTD.txt before running the workflow, or else the workflow will pick up its text 

#coding: utf-8
import workflow
import os

rootDir = '../Dropbox/org'

workflow_states = [
action_out = ""
for dname, dirs, files in os.walk(rootDir):
	# search .org files for TODO items
	for fname in files:
		# ignore old GTD files generated by workflow
		if 'GTD' in fname: 
		fpath = os.path.join(dname, fname)
		# print filename as a heading
		action_out += '\n' + fpath + '\n'
		with open(fpath) as f:
			s = f.read()
			# loop by state to group accordingly
			for state in workflow_states:
				for line in s.splitlines():
					if state in line:
						if 'DONE' in line:
						action_out += str(line) + '\n'
#Generate the output
Create Document ?
Open in Editor