About
A CLI for FoldingText, TaskPaper, and Markdown text.
Description
This is a command line interface (cli) for FoldingText, TaskPaper, and Markdown formatted text files. It has two subcommands:
-
get
filters the text using a FoldingText node path. -
evaluate
runs a JavaScript function over a FoldingText node tree.
Each command takes two options, taxonomy
and modes
.
The --taxonomy
option determines how the text is parsed to create the node tree. The default taxonomy is foldingtext
, but you can also parse the text as taskpaper
or markdown
format.
If you are using the foldingtext
taxonomy, then you can also use the --modes
option to signal what modes should be parsed.
Questions and comments should be directed to the dev catagory in the FoldingText support forums.
Examples
Return all "not @done" lines:
$ ft get "//not @done" myfile.ft
Return "toString" on node tree:
$ ft evaluate -p "my param" "function (tree, param) { return tree.toString() + param; }" myfile.ft
Release Notes
1.3.1
- Fixed parsing bug
1.3.0
- Added new
--param
option to theevaluate
command. The value of that param is passed into the JavaScript function as second parameter.
1.2.2
- fixed reported version when passed in -v flag.
1.2.0
- script paramater can now be filename or inline script.