Editorial Workflows

插入图片...

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: 自行在当前文本目录下创建img文件夹,保存图片在img目录下通过workflow选择插入图片。

Shared by: kagura

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Get Current File Name ?
Include Folder
ON
Include Extension
ON
Run Python Script ?
Source Code
#coding: utf-8
import workflow,os,sys

action_in = workflow.get_input()

#TODO: Generate the output...

def hml():
	def getpwd():
		pwd = sys.path[0]
		if os.path.isfile(pwd):
			pwd = os.path.dirname(pwd)
		return pwd
	t=getpwd()
	n=t.find('Library')
	ml=t[0:n]+'Documents'
	return ml
	
dw=hml()+action_in
dw=os.path.dirname(dw)+'/img'

list=os.listdir(dw)
l=','.join(list)

action_out=l
workflow.set_output(action_out)
Select from List ?
Title
List (Lines)
Input
Multiple Selection
OFF
Show in Popover
OFF
Replace Selected Text ?
Replacement Text
![](img/Input)