Editorial Workflows

New Timestamp Title File

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: Creates a new TXT file in Dropbox named with the current time stamp and a user entered string. Also sets a markdown date header with the time stamp and a title header with the user entered string.

Made by Macdrifter.com

Shared by: http://www.macdrifter.com/2013/08/create-new-time-stamped-files-in-editorial.html

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Request Text Input ?
Title
Enter Title
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
titleString
Value
Input
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import editor
import datetime
import webbrowser
import urllib

current_time = datetime.datetime.now().strftime('%Y-%m-%d_%H%M%S')

file_title = workflow.get_variable('titleString')
file_name = current_time + ' ' + file_title + '.txt'

file_content = 'title: ' + file_title + '\n' + 'date: ' + current_time + '\n\n\n'

editor.set_file_contents(file_name, file_content,'dropbox')


webbrowser.open('editorial://open/' + urllib.quote(file_name) + '?root=dropbox')

action_in = workflow.get_input()

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

workflow.set_output(action_out)
Move Caret ?
Direction
  • Backward
  • Forward
  • Start/End of Document
  • Start/End of Line
  • Number of Characters:
1