Editorial Workflows

New Timestamp 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. Also sets a markdown date header with the time stamp.

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
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import os
import editor
import datetime
import webbrowser
import urllib

local_path = os.path.expanduser('~/Documents')

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

file_name = current_time+'.txt'

file_content = '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