Last active
December 20, 2015 15:09
-
-
Save bsoist/6152288 to your computer and use it in GitHub Desktop.
This Fargo script takes the whole file and converts it to a format readable by TaskPaper. See http://4a.bsoi.st/ for more information.
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
/* | |
See http://4a.bsoi.st/ for more information | |
and an updated version of this. | |
*/ | |
Task Whole Outline | |
var taskdata = ""; | |
var bsoist_prefix = ""; | |
var bsoist_suffix = ":\r\n"; | |
op.firstSummit(); | |
op.visitSubs( | |
function(headline,levelnum) { | |
taskdata += bsoist_prefix + headline.getLineText() + bsoist_suffix; | |
}, | |
function(levelnum) { | |
bsoist_prefix = "- "; | |
bsoist_suffix = "\r\n"; | |
}, | |
function(levelnum) { | |
bsoist_prefix = ""; | |
bsoist_suffix = ":\r\n"; | |
} | |
); | |
file.writeWholeFile(file.getCurrentFilePath().split('.')[0] + '.todo',taskdata); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment