Created
January 4, 2014 03:41
-
-
Save rdhyee/8251338 to your computer and use it in GitHub Desktop.
I use this script to print out the textual content of a fargo.io subtree to the JavaScript Console, numbering each subitem. Example output: 1. A
1.1 A1
1.2 A2
2. B
3. C See http://outliner.smallpicture.com/fargoVerbs.js for more background.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var t = Array(); | |
t.push(0); | |
op.visitSubs ( | |
function (headline, levelnum) { | |
t[t.length-1] += 1; | |
console.log(t.join(".") + ". " + headline.getLineText ()); | |
}, | |
function (levelnum) { | |
t.push(0); | |
}, | |
function (levelnum) { | |
t.pop(); | |
} | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment