Editorial Workflows

Insert Image...

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: Saves an image from the camera roll as a jpeg file in the relatively 'resources' directory, and inserts a markdown image reference,using current time.

you can change the label 'yypE' into anything you want.

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
A document has to be open... ?
Run the block if
File Name
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
ON
Message
No Document Selected
…End If
Run Python Script ?
Source Code
#coding: utf-8
import photos
import workflow
import console
import editor
import os
import io
import datetime
import time



img = photos.pick_image()
if not img:
	workflow.stop()

default_name = 'resources/yypEImage'+str(int(time.time()))+'.jpg'

img_data = io.BytesIO()
img.save(img_data, 'jpeg')

editor.set_file_contents(default_name,img_data.getvalue(), '')
workflow.set_output(default_name)
Replace Selected Text ?
Replacement Text
![Image](Input)