Editorial Workflows

Notification 1.0a

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: This simple workflow creates a Custom Action for the notification module, so that you can create notifications explicitly.

It also logs the output of the notification action to the current document (can be deleted from the workflow if you want).

By defualt, it gets input from the user and sets that as the notification, but you can use it however you please.

Set the "Notification" action as an action preset.

Post any issues in the comments below.

Shared by: Tutorial Doctor

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Help ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Set Variable ?
Variable Name
help
Value
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Preview</title> <style type="text/css"> body { margin: 0; padding: 0; border: 0; color: #333333; font-size: 16px; font-family: "Palatino-Roman", Helvetica, sans-serif; line-height: 150%; vertical-align: baseline; overflow: hidden; background-color: #FAFAFA; } a { color: #045591; text-decoration:none; } h1 { font-family: SourceSansPro-Regular; font-size: 32px; font-weight: bold; font-style: normal; margin-top: 32px; margin-bottom: 12px; } h2 { font-family: SourceSansPro-Regular; font-size: 24px; font-weight: bold; font-style: normal; margin-top: 32px; margin-bottom: 12px; } h3 { font-family: SourceSansPro-Regular; font-size: 19px; font-weight: bold; font-style: normal; } h4, h5, h6 { font-family: SourceSansPro-Regular; font-size: 19px; font-weight: bold; font-style: normal; margin-top: 12px; margin-bottom: 0; } h1:first-child { margin-top: 0; } p { margin-bottom: 12px; } p:last-child { margin-bottom:0; } ol { list-style: outside decimal; } ul { list-style: outside disc; } ol, ul { padding-left:0; margin-bottom:12px; } ol li { margin-bottom:16px; margin-left:28px; } ul li { margin-bottom: 12px; margin-left: 20px; } ol:last-child, ul:last-child { margin-bottom:0; } li > p { margin-bottom:12px; } li > ol, li > ul { margin-top: 12px !important; padding-left:12px; } dl { margin-bottom: 12px; } dl dt { font-weight: bold; margin-bottom: 8px; } dl dd { margin-left: 0; margin-bottom: 12px; } dl dd:last-child, dl:last-child { margin-bottom: 0; } pre { white-space: pre-wrap; margin-bottom: 24px; overflow: hidden; padding: 3px; -webkit-border-radius: 3px; background-color: #F2F2F2; border: 1px solid #D9D9D9; } code { font-family: "DejaVuSansMono", monospace; font-size: 0.9em; white-space: nowrap; padding: 2px; -webkit-border-radius: 4px; background-color: #F2F2F2; border: 1px solid #D9D9D9; } pre code { font-family: "DejaVuSansMono", monospace; font-size: 16px; white-space: pre-wrap; border: none; padding: 0; background-color: transparent; -webkit-border-radius: 0; } blockquote { border-left: 3px solid #ccc; margin-left: 0; margin-right: auto; width: 95%; padding: 0 10px; } table { margin-left: auto; margin-right: auto; margin-bottom: 24px; border-bottom: 1px solid #ddd; border-right: 1px solid #ddd; border-spacing: 0; } table th { padding: 3px 10px; background-color: #FAFAFA; border-top: 1px solid #ddd; border-left: 1px solid #ddd; } table td { padding: 3px 10px; border-top: 1px solid #ddd; border-left: 1px solid #ddd; } img { border: none; display: block; margin: 1em auto; max-width: 100%; } #content-wrapper { height: 100%; overflow-y: scroll; overflow-x: hidden; font-size: 1.0em; width: 100%; } #content { width: auto; padding: 40px 40px 40px 40px; } .footnote { font-size: 0.8em; vertical-align: super; } .footnotes ol { font-weight: bold; } .footnotes ol li p { font-weight: normal; } </style> </head> <body> <div id="content-wrapper"> <div id="content"> <h1 id="notificationnotificationsonios">notification — Notifications on iOS</h1> <p>The notification module allows you to schedule notification messages that are shown in the iOS Notification Center. Scheduled notifications are delivered even when your script (or even the entire app) is no longer running.</p> <p>It is also possible to attach a URL to a notification that is launched when the notification is activated (e.g. selected in Notification Center).</p> <h1 id="functionsinthenotificationmodule:">Functions in the notification module:</h1> <h2 id="notification.schedulemessagedelaysound_nameaction_url">notification.schedule(message[, delay, sound_name, action_url])</h2> <pre><code>Schedule a notification with the given message text. </code></pre> <p>delay is the time interval in seconds until the notification is delivered.</p> <p>sound_name can be any of the bundled sound effects that are also available via the <span style="color:blue">sound</span> module. Use an empty string to schedule a silent notification. Using an non-existing sound effect (e.g. ‘default’) will result in the system’s standard alert sound being played.</p> <p>With the action_url parameter, you can specify a URL that is opened when the notification is activated (e.g. by tapping it in Notification Center). Which app is used to open the URL depends on the URL’s scheme, e.g. for http: URLs, Safari is used.</p> <h2 id="notification.cancel_all">notification.cancel_all()</h2> <pre><code>Cancel all previously scheduled notifications. </code></pre> <p><span style="color:red">This workflow creates a custom action for the notification module, so that you can create notifications explicitly.</span></p> <p>-<em>Tutorial Doctor</em></p> </div> </div> </body> </html>
Custom UI ?
User Interface
Presentation Style
  • Sheet
  • Full-Screen
  • Popover
Output
Use Editor Theme
ON
…End If
Get Input ?
Title
Message?
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
message
Value
Input
Get Input ?
Title
Delay (in seconds)?
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
delay
Value
Input
Notification ?
Move Caret ?
Direction
  • Backward
  • Forward
  • Start/End of Document
  • Start/End of Line
  • Number of Characters:
1
Output ?
Replacement Text
Input