Here’s a workflow that uploads the currently open document in Editorial as a markdown file to an FTP host. I use a variation of this workflow to post here on Macdrifter. In fact, this post was written and uploaded from Editorial.
Here’s the detail of the Python script:
:::python import workflow import editor import ftplib import console import StringIO import keychain import pickle import cgi # Uncomment this line to reset stored password #keychain.
Until there’s a more formal organization of Editorial workflows, I’ll be adding those that I find to Pinboard with the editorial tag
This workflow takes selected text in the Editorial editor and replaces it with HTML encoded character strings.
It’s just a few actions:
The magic is in the bit of Python that uses the CGI module and should handle most non-english characters as well as special characters like emdash.
:::python #coding: utf-8 import workflow import cgi action_in = workflow.get_input() tempString = workflow.get_variable('origString') encodeString = cgi.escape(tempString).encode('ascii', 'xmlcharrefreplace') #TODO: Generate the output... action_out = encodeString workflow.
Occasionally a new computing platform comes along that changes the way we interact with technology. The iPhone changed what a phone was to me and the iPad changed my definition of a personal computer. But with each of those shifts, I quickly settled into the opportunities and limitations inherent in their software. For all of it’s innovation, the iPad still felt like a limited little piece of glass. This was never more apparent than when I was writing.