Jeffrey Kishner

Web Publisher, Ecstatic Dancer

  • Home
  • Blog
  • Elsewhere
  • Plugins
  • OPML
  • Javascript

Use Drafts and TextTool to Turn a List Into an OPML File

TextTool, a new iOS app that transforms text in various ways, has just been released in the App Store. MacStories has an informative article on it. Federico wrote a Drafts URL Action to turn a list in Drafts into a Markdown-formatted list using the affix method in TextTool, and then send that text back to Drafts using x-callback-url.

Frequent readers know I am OPML-obsessed. (OPML is a structured data format for outliner software.) In May, I wrote a complicated set of Drafts actions to convert a list in Drafts into an OPML file. With TextTool, this solution become a whole less complicated. TextTool allows me to to affix a prefix of <outline text=" and a suffix of " /> to every line imported from Drafts, and then send that text back to Drafts. I then can use a Dropbox action to put the draft text into a template surrounded by the OPML header and footer to create a valid file (which can then be imported into an app like Fargo).

Import the Drafts Actions

If you’re reading this on your iOS device, tap on this link to import the texttool-opml URL Action into Drafts. (You must of course have both Drafts and TextTool installed on your device.)

The URL Action itself looks like this:

texttool://x-callback-url/transform?text=[[draft]]&method=affix&prefix=%3Coutline%20text%3D%22&suffix=%22%20%2F%3E&scope=lines&x-success={{drafts://x-callback-url/create?text=[[output]]&action=texttool-opml-dropbox}}

The action at the end of the x-success parameter tells Drafts to then perform the textool-opml-dropbox Dropbox action. Tap on this link to import it.

It essentially wraps the [[draft]] with the text required to make it a valid OPML file.

Type of Action: dropbox
Name: texttool-opml-dropbox
Path: /Apps/Fargo/
Filenametype: Predefined
Filename: [[date]]
Extension: opml
Writetype: Created
Template:

<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0">
    <head>
        <title>[[date]]</title>
        </head>
    <body>
        [[draft]]
        </body>
    </opml>

How It Works from Beginning to End

If I enter the following into Drafts and then tap on texttool-opml

Line 1
Line 2
Line 3

it will send an OPML file titled 2013-11-21.opml to the /Apps/Fargo folder in Dropbox:

<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0">
    <head>
        <title>2013-11-21</title>
        </head>
    <body>
         <outline text="Line 1" />
<outline text="Line 2" />
<outline text="Line 3" />
        </body>
    </opml>

I can then open this file from within the Fargo app.

You can customize this in many ways. For example, if you like Carbonfin Outliner, use the Dropbox action to send it to the /Outliner folder and then sync the iOS app to import the file.

Published on November 21, 2013 Leave a Comment

Fargo Script to Create a Link to Music-Map from a Band or Musician’s Name

How this script works:

Put your cursor on a headline in Fargo that only includes the name of a musician or band. Choose the script from your Scripts menu. It will insert a link to that band or musician on Music-Map.com.

Before:

  • Punch Brothers

After:

  • Punch Brothers
    •  Music-Map

Put the code below in your menubar.opml outline. Watch this video to learn more about scripting in Fargo.

Published on October 29, 2013 Leave a Comment

OPML Interoperability: CarbonFin Outliner, Workflowy, Fargo.io

One of the downsides of moving OPML files between apps is that the “killer feature” — attributes — is often unsupported. At minimum, an OPML file just contains text:

  • <outline text="This is a headline" />

In apps like Fargo you can add an infinite variety of attributes, such as icon, created, htmlUrl and xmlUrl (for RSS feeds), and virtually anything else that can have a value.

Most other outliner apps do not support these attributes, but I’ve found two that support the _note attribute, meaning that they will import and export its value: Workflowy and CarbonFin Outliner. Fargo supports any user-defined attribute, so one can theoretically move outlines containing notes between these three apps without losing any information. (According to Joe Pairman, Omni Outliner and Tree support the _note attribute, but I have no experience with these apps as of this writing.)
[Read more…]

Published on October 22, 2013 4 Comments

Recent Posts

  • An AirPods Case Looks an Awful Lot Like Dental Floss
  • Amazon Prime Picks Up 2 Seasons of “The Marvelous Mrs. Maisel”
  • My “Where” File
  • Testing Out Wallabag.it
  • Sometimes Self-Hosted Open-Source Solutions Are Just Too Much Work

Psychotherapy with Jeffrey Kishner

Jeffrey Kishner is a Licensed Mental Health Counselor practicing in New York.

Learn More

How to Reach Me

jk at jeffreykishner dot com

Follow Me

  • Facebook
  • Twitter
  • LinkedIn
  • Instagram

Copyright © 2022 ·Modern Studio Pro · Genesis Framework by StudioPress · WordPress · Log in