Jeffrey Kishner

Web Publisher, Ecstatic Dancer

  • Home
  • Blog
  • Elsewhere
  • Plugins
  • OPML
  • Javascript
You are here: Home / Blog

A Couple of _note Attribute Scripts for Little Outliner 2

As I mentioned yesterday, Little Outliner 2 now has scripting. I thought I’d include a couple of scripts you can add to your menubar.opml file that work the the _note attribute. Why _note? A handful of other OPML-supporting apps — like Carbonfin Outliner, OmniOutliner — regularly support this attribute, so if you import an outline from one of these apps, you can use these scripts to easily add or view notes.

The first one simply lets you add a _note attribute to a node via a dialog box. It also adds a icon (Little Outliner supports Font Awesome!).


add note dialog.ask ("Insert note", "", "", function (name) { op.attributes.setOne ("_note", name); op.attributes.setOne ("icon", "fa fa-comment-o"); });

The second shows the note in an alert .

show note
    t = op.attributes.getOne ("_note");
    dialog.alert (t);

The last one is fairly complicated. I remember spending many hours trying to write this for Fargo. It will go through every node in an outline (however deeply nested) and if a node has a note, the icon will show next to it so that you know which nodes have notes.

add icon to notes
    function actionHere () {
        note = op.attributes.getOne ("_note");
        if (note) {
            op.attributes.setOne ("icon", "fa fa-comment-o");
            }
        }
    var ctheads = 0;
    op.visitAll (function (headline) {
        ctheads++;
        });
    ctheads = ctheads - 1;
    op.firstSummit ();
    for (var i = 0; i<ctheads; i++) {
        actionHere ();
        if (op.hasSubs ()) {
            op.go (right, 1);
            }
            else if (!op.go (down, 1)) {
            op.go (up, infinity);
            op.go (left, 1);
            while (!op.go (down, 1)) {
                op.go (left, 1);
                }
            }
        }
    actionHere ();

Published on January 13, 2017 Leave a Comment

Little Outliner 2 — Now With Scripting

As of today, Little Outliner 2 has similar scripting abilities as Fargo.

Read Dave Winer’s announcement.

I did a massive amount of scripting for Fargo. In fact, Fargo’s scripting abilities motivated me to learn Javascript; I owe a debt of gratitude to Dave for inspiring me to learn a new language just so that I could expand on his outlining software. I have yet to test the menubar in Little Outliner other than a simple dialog alert, but I am looking forward to importing some of my Fargo scripts to see what still works.

You scan scour my old Fargo-run blog to see what I wrote back then about scripting.

Published on January 12, 2017 Leave a Comment

Really enjoyed Moana. Good laughs, good cries. You’re Welcome is a catchy tune, and in general Lin-Manuel Miranda’s songs had his recognizable stamp on them. And the David Bowie-esque Shiny was just hilarious.

https://jeffreykishner.com/2017/01/08/1558/

Published on January 8, 2017 Leave a Comment

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 74
  • Next Page »

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