foldingtext

1.3.1 • Public • Published

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:

  1. get filters the text using a FoldingText node path.

  2. 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 the evaluate 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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.13latest

Version History

VersionDownloads (Last 7 Days)Published
1.3.13
1.3.00
1.2.20
1.2.10
1.2.00
1.1.00
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00
0.1.80
0.1.70
0.1.60
0.1.50
0.1.40
0.1.30
0.1.20
0.1.10

Package Sidebar

Install

npm i foldingtext

Weekly Downloads

3

Version

1.3.1

License

none

Last publish

Collaborators

  • jessegrosjean