kookma/TW-Commander

Option to use a sub-branch of a toc as search criterion

Opened this issue · 8 comments

I like to use Tiddlywiki for documenting several things. The topics are organized as sub-branches of a toc.
Now I want to be able to export such sub-branches. Is it possible to introduce an option in TW-commander, which allows to gather all tiddlers of a sub-branch in order to export them?

Maybe it is already possible and I missed something.

Best Regards
xgadscu

You can do with the current Commander. Just use appropriate filter?
Do you know how many levels is deep your branch?
If you give me a minimum example I can show how to do.

From the user's point of view, the usage should be as easy and comfortable as possible without clarifying in advance how many levels the branch has. That means: the root of the branch should be the only parameter.
My idea was that you could use the algorithm you built in the Multi level TOC UI macro.

Regardless, I would be interested in a specification using filter. A branch usually has 3-4 levels.

In the following example I would like to get all Tiddlers within Child 2 including Child 2.

Parent (root)
    Child 1
        Grand Child 11
        Grand Child 12
            Grand Grand Child 121
            Grand Grand Child 122
            Grand Grand Child 123
        Grand Child 13
        Grand Child 14
    Child 2
        Grand Child 21
        Grand Child 22
            Grand Grand Child 221
                Grand Grand Child 221 1
                Grand Grand Child 221 2
                    Grand Grand Child 221 21
                    Grand Grand Child 221 22
                Grand Grand Child 221 3
            Grand Grand Child 222
        Grand Child 23
    Child 3
        Grand Child 31
        Grand Child 32

My idea was that you could use the algorithm you built in the Multi level TOC UI macro.

That is the right solution, it uses recursive macro, but adding it needs some programming. I add this to wish list!
For short term, If you use TOC macro then you can create a button to do this for you.

I asked the number of level to write the filter,

[tag[Learning]] [tag[Learning]tagging[]] [tag[Learning]tagging[]tagging[]] 

The above filter returns all tiddlers tagged with Learning (root) and those tagged with its child, and those with grand childern.
You can extend this to fourth level, etc ...

I think many other users would also like it if you would implement the wish.

The filter is not so comfortable, but it works for now. During testing I noticed that the referenced tiddlers (via wikilink, transclusion or as images) are missing for the export. The filter functionality is obviously very powerful. But unfortunately I haven't found a way to get the referenced tiddlers into the selection.
Do you have an idea?

I would recommend to ask on https://talk.tiddlywiki.org/
That needs a more complex filters, and I don't think it could be used with Commander searchbox.

Note that, this is a general problem (question). What you asked here can be used with $:/AdvancedSearch in Tiddlywiki.

See #28

Great. I'm looking forward to the implementation...

This feature is no possible using filters! See https://talk.tiddlywiki.org/t/filter-question-return-all-toc-tiddler-titles-as-a-plain-list/5752/10

Planned for next release. See #28