Can I see my todo's across text files?

I’m responding to this tweet.

The short answer is no. FoldingText is a normal document based app (and it’s sandboxed) so it can’t search through your existing text files for todos. You could have an applescript to search for todo’s in your open documents, but I don’t think that’s what you are asking).

The longer answer is I do have an in progress command line version of FoldingText that could be used for this purpose. “Command line” FoldingText parses some input text into a FoldingText node tree data structure and then allows you to read/write that structure using Javascript. So you could use that to search though text files for FoldingText todos.

Does that sound like an approach that you or anyone else would be interested in? If so I can prioritize getting command line FoldingText a bit more documented.

That does sound interesting. I think what I’m after is a daemon or similar that will scan certain places in my Dropbox and present a summary UI over files that it finds. The JS library would be useful for this, and it could display todos or anything else. I wonder if a local node.js server would be a good way - the UI could then be HTML.

Of course ideally this would all be present in FoldingText itself, but I understand your restrictions.

I think it would be tremendously useful to be able to do full FoldingText and TaskPaper node path queries across several files.

(In the meanwhile, for simple @tag searches, keeping all your FoldingText or TaskPaper files in a plain text NValt directory already gives very fast string searches across quite large numbers of text files)

Command line FoldingText sounds great. Plus one from me.

Hey, you could use the command line FT with a Hazel script to keep a todo master list compiled together. The command line would work for FT or TP right?

@raguay Yes, will work with either once it’s out.

Now with the command line interface you can do something like this to extract your todo’s from a text file:

$ ft get "//@modeContext=todo and @type=unordered" yourfile.ft

I can’t get this to work. It just returns a blank line. My test.ft file contains:


  • pick up people
  • study bible lesson @done

Any ideas or suggestions to look for way it doesn’t work? My ruby is: ruby 2.0.0p451

To test that your installation is OK, I would try the simplest path - something like:

ft get "//@done" test.ft

For more complex paths, the best thing is to start by testing the path in the FoldingText editor using something like Jamie Kowalski’s plugin at

On my system, with the file you describe, the simpler path works:

b2:houthakker$ ft get "//@done"  test.ft
- study bible lesson @done

but @modeContext paths which work in the FoldingText editor (see above) do not yet seem to be working in the FT command line version

b2:houthakker$ ft get "//@modeContext=todo"  test.ft

My guess is that the command line version is not parsing modes yet.

You should find that paths which don’t involve modes are working both in the editor:

and on the command line:

b2:houthakker$ ft get "//work/not @done"  test.ft
- pick up people

Or perhaps a case conversion somewhere in the CLI draft is flattening modeContext to modecontext and hiding the match ?

Opps, I confess that I only that path in the app, not on the command line. @complexpoint is correct, the “todo” mode isn’t present in the command line tool, and so that’s why the search isn’t returning any results.

Modes are provided by extensions, but the command line app just includes the core classes. I’m going to fix this by including the default modes in the command line tool, and also by providing an override option where you can list any custom modes that you use.

I just posted an update to the CLI that mostly fixes this issue.

ft get "//@modeContext=todo and @type=unordered"

Should work now.

Thanks ! Working here now …

`b2:~ robintrew$ ft get “//@mode=todo//not @done” test.ft

  • pick up people`

(and just in case anyone else needs to figure this out – I was getting confused :- ) – my path to ft is:

so to install the the new build I needed to:
cd /usr/local/lib

and then

sudo npm install foldingtext