Filtering from command line

50 views
Skip to first unread message

Diego Mesa

unread,
Aug 4, 2019, 8:56:54 PM8/4/19
to TiddlyWiki
Hello,

Is it possible to use the filter syntax to return a list of tiddler titles from the command line?

TonyM

unread,
Aug 4, 2019, 10:54:05 PM8/4/19
to TiddlyWiki
Diego,

So we assume Node?
  • If it were documented it should be here https://tiddlywiki.com/?home#Commands
  • Also since tiddlers are files on node you could use something in the operating system to search and filter
  • Also the below may be able to be activated from the command line
  • I believe Tw-Federation can fetch using a filter
Alternatively on the URL address line

Note I can't find the original documentation and this is not correct but it demonstrates it works

Jeremy Ruston

unread,
Aug 5, 2019, 5:07:54 AM8/5/19
to tiddl...@googlegroups.com
Hi Diego

> Is it possible to use the filter syntax to return a list of tiddler titles from the command line?

There’s no command for that at present. I have considered a “list” or “log" command that prints a list of tiddlers to the console, with options for printing titles vs the full tiddler, and would be interested in the thoughts of others on this.

Best wishes

Jeremy

Jed Carty

unread,
Aug 5, 2019, 5:30:22 AM8/5/19
to TiddlyWiki
I have something similar to this for the Bob version of federation, you can query a url with a filter and it returns either the list of titles or the full tiddlers like Jeremy said. My version of the code is here https://github.com/OokTech/TW5-Bob/blob/5097ab2f5841a6ebfbff2fbb50e53cccbda13320/commands/ws-server.js#L478

Looking at it now there are many ways that it should be improved, but the idea works and it has been useful for me so far.

Making it a normal command for node shouldn't be too difficult. Almost all of the code for those routes is there for the way Bob handles multiple wikis and authentication, so it would be much simpler as a command.

I am not sure what the utility of having this as a command would be, I assume some sort of bash scripting?
Reply all
Reply to author
Forward
0 new messages