Editorial Workflows

iMessageTeam

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: Sends an iMessage and converts Twitter links to Tweetbot ones. Use with a bookmarklet or the built-in browser.

Shared by: @viticci

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Set Variable ?
Variable Name
link
Value
Input
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
If… ?
Run the block if
link
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
twitter.com
Run Python Script ?
Source Code
import re
import workflow
 
class TwitterLink:
    def __init__(self, value):
        self.original = value
        self.converted = self.convertLink()
 
    def convertLink(self):
        return re.sub("(?P<domain>https://.*twitter\\.com/)(?P<user>.+)/(?P<status>(status|statuses))/(?P<id>.+)", "tweetbot://\g<user>/status/\g<id>", self.original)
 
 
link = TwitterLink(workflow.get_variable('link'))
 
workflow.set_variable('link', link.converted)
…End If
…End If
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Set Variable ?
Variable Name
link
Value
Browser URL
…End If
Compose Text Message ?
Recipient(s)
INSERT EMAIL ADDRESSES HERE
Message Body
link
Stop if Canceled
ON