Super-bundle - Combines Standard Bundles

Am I correctly understanding that since a bundle is a regular tiddler, by listing multiple bundle tiddlers in the filter field of a “superbundle” tiddler, it’s possible to bundle bundles (pardon the pun :laughing: ) ?

From memory a bundle tiddler contains a filter describing the tiddlers to include, and whilst you can bundle bundles, they may not bundle the tiddlers within the inner bundle, although you could make something to do it, you best have a good reason.

The bundle tiddler is only a configuration tiddler. It does not contain any “listed” tiddlers. The content in a bundle is created with the export or drag & drop.

I’m still having troubles trying to bundle bundles.

I have a.bundle containing TiddlerA1 and TiddlerA2. I also have b.bundle containing TiddlerB1 and TiddlerB2.

I’m trying to make use of filtered bundles, which I enabled in config. I have a filter bundle super1.bundle that is a filter bundle and has its filter field equal to [[a.bundle]get[text]split[\n]!is[blank]]. It shows a list of one item TiddlerA1 TiddlerA2 instead of two items. If this worked, I could just write [[a.bundle]get[text]split[\n]!is[blank]] [[b.bundle]get[text]split[\n]!is[blank]] and so on, for each bundle I want to include in the “superbundle”.

The second problem is that when I try to export the filter bundle, it doesn’t even save this single list item in the resulting JSON file - I only get [].

What am I doing wrong?

title: super.bundle
filter: [subfilter{a.bundle!!filter}] [subfilter{b.bundle!!filter}] 

You might want to prefix the subfilters with all[]. Seems to work okay without.

a.bundle and b.bundle are regular bundles, not filter bundles. They don’t even have a filter field

So, uh, make them filters?

1 Like

I don’t know if it’s a good idea to enforce all bundles as filter bundles, considering that this option in the Bundler plugin is off by default.

Did you try [subfilter{a.bundle!!text}] ?

1 Like

This works. Yet I still don’t understand why my version above doesn’t

1 Like

I can’t be sure but, like every filter, there is an implied “list”. So my guess is, your original does not “enlist” the output such that super.bundle can work with it.

Anyway, glad it’s working now.

Helpful assumption which made me go back to the docs and review relevant tiddlers one more time. This fixed first version works:

[[a.bundle]get[text]split[\n]!is[blank]enlist-input[]]

and reflects my approach (split the problem into smaller tasks, a la traditional programming)

But yours:

[subfilter{a.bundle!!text}] 

is shorter and doesn’t suffer from the hidden “enlisting” pitfall, this is more like a functional approach.

I have collected both working versions in this single final post. Thank you very much!

I am on mobile only at the moment. So testing is limited. I’ll be back on Monday. :nerd_face:

I would like to suggest another approach for some cases outside of using the bundler, and ask if you want more details.

Since filters often drive the production of lists I have build some tools to allow filters to be found and the option to open them in the advanced search filters tab with a click.

  • Once there it is possible to review the selected tiddlers and export them in one or more formats, a JSON being one of them.
    • eg a tiddler with a field named *filter* will display a button that opens that filter in advanced search filters tab, from where it can be exported.
    • For convieniece I have a single click export to JSON button
    • The only difference being the export filename is not recorded.
  • Perhaps if we could create or open bundles from the advanced search filter tab?
  • I often store the full path and filename to a JSON file so I can find and open, or export and save to or from that full path. I use ctrl-V of the full path in the save and open dilogues.
    • I have some implimentations where if a path field is found in a tiddler a button appears to click and coipy to the clipboard, then open the filter in advanced search and export.
    • Another option I have used is to copy only the filename then use search within the open or save dialogue to find where the file is to open or save over.

Thanks, personally I have my issue solved for now. I have deliberately asked in this thread instead of creating a new one since it was strictly related to the Bundler plugin.

Exactly the reason of my initial question. I can write a filter expression in the Advanced Search tab, which would select a set of tiddlers, and export them as single JSON file. This is great for simple use cases. I saw additional potential in the Bundler plugin - it lets me treat bundlers as “named filters” and offers an easy way to build basic sets of tiddlers, then combine them in different ways by using filter bundles.

Filters bundles are compatible with the advanced search filter configuration. That’s by design. So all your filtered bundles will show up in the advanced search drop-down.

1 Like

Never implied. Always explicit.

Some confusion may be arising as one might list “MyMarvellousTiddler” as the solo listed Tiddler in a ListBundle. In this case the Tiddler Title is all that is needed??