Editorial Workflows

New Dated Section

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: For “diary” style documents, this workflow inserts the date at the beginning of the document as a first-level header, together with some blank lines.

Shared by: Graham Charles

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import editor
from datetime import datetime, timedelta, date

# get and format date
runningDate = date.today()
format = '%x'
dateText = runningDate.strftime(format)

# position cursor
editor.set_selection(0) # move to beginning

# insert text
editor.insert_text('# ')

# move back two characters
currentSpot = editor.get_selection()
editor.set_selection(currentSpot[0] - 2)