Editorial Workflows

Shuffle Lines

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: Shuffles the order of selected lines in the editor.

Shared by: @olemoritz

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Extend Selection ?
Direction
  • Backward
  • Forward
  • Both
Unit
  • Start/End of Document
  • Start/End of Line
  • Number of Characters...
1
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import random

lines = workflow.get_input().splitlines()
random.shuffle(lines)
workflow.set_output('\n'.join(lines))
Replace Selected Text ?
Replacement Text
Input