Editorial Workflows

Timestamp+Title

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
::: Version 1.2

Shared by: Macdrifter.com

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Select from List ?
Title
Post Type
List (Lines)
Link Original
Multiple Selection
OFF
Show in Popover
OFF
Set Variable ?
Variable Name
postType
Value
Input
If… ?
Run the block if
postType
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Link
Request Text Input ?
Title
Paste Link
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
postLink
Value
Input
…End If
Request Text Input ?
Title
Enter Title
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
titleString
Value
Input
New Title Post ?
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')

current_date = datetime.datetime.now().strftime('%Y-%m-%d')

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

if workflow.get_variable('postType') == 'Link':
	file_title = file_title + ' [Link]'
	out_link = 'link: ' + workflow.get_variable('postLink')

file_content = 'title: ' + file_title + '\n' + 'date: ' + current_time + '\n' + out_link + '\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