Action to export a tiddler/set of tiddlers in JSON matching set criteria?

68 views
Skip to first unread message

Hubert

unread,
Nov 11, 2019, 6:05:33 AM11/11/19
to TiddlyWiki
Hello,

I've researched this already and am aware that this can be achieved using Advanced Search, albeit manually.

What I would like to do is export a pre-defined set of tiddlers with a single click of a button as part of a set of actions.

I had a look at the widget message tm-download-file with an exportFilter but this outputs a html file, not individual tiddlers in JSON format.

Thank you in advance for advice.

Regards,
Hubert

@TiddlyTweeter

unread,
Nov 11, 2019, 6:15:56 AM11/11/19
to TiddlyWiki
Would PMario's Bundler Plugin suit the use case? Its one of the best import/export JSON tools TW has. Set and click.


Best
TT

Hubert

unread,
Nov 11, 2019, 6:26:32 AM11/11/19
to TiddlyWiki
Thanks TT, that's a very neat plugin.

That said, I think I will continue to fiddle/try to reverse-engineer $:/core/macros/export in order to understand it better and build something that 100% matches my needs based on core mechanisms alone.

Thanks,
Hubert

PMario

unread,
Nov 11, 2019, 7:02:59 AM11/11/19
to TiddlyWiki
On Monday, November 11, 2019 at 12:26:32 PM UTC+1, Hubert wrote:
..
That said, I think I will continue to fiddle/try to reverse-engineer $:/core/macros/export in order to understand it better and build something that 100% matches my needs based on core mechanisms alone.

Hi,

I did create the bundler-plugin. It is 100% compatible with the core. I basically did the same thing, as you want to do. ... Create a new UI around  $:/core/macros/export

If you have a closer look about the plugin Content tab, you'll see several UI elements. If you understand what BundlesList and export-bundle do, you are set up, to create your own stuff according to the OP.

If you want to create something that works exactly like AdvancedSearch, you'll need to understand: BundlesFiltered and export-bundle-filter. It's the same thing as advanced search, but looks different. That's it.

There are 2 js elements in the plugin, that are used for convenience functions, which you don't need for export
BUT they will be handy if you want to import your bundles again, without overwriting existing content. ...

The Intro Thread of the plugin tells more about the development of the plugin.

have fun!
mario


Hubert

unread,
Nov 11, 2019, 7:14:27 AM11/11/19
to TiddlyWiki
Hi Mario,

Thank you! I didn't mean to discount the effects of your work, it's just that I do like to open things up to see how they work as that's the way I learn.

Your plugin does indeed look like a match for my use case, though it'll take some time for me to ingest all that info (thanks for linking to the intro post). Nice work!

Thanks again & regards,
Hubert

PMario

unread,
Nov 11, 2019, 7:50:19 AM11/11/19
to tiddl...@googlegroups.com
Hi Hubert,

My post was triggered by "reverse-engineer". I thought a plugin has a much narrower scope, than the TW core. So it should be easier to understand, what's going on there. ...

There is one more plugin that I always use to develop my own stuff: link-to-tabs. It lets you directly open selected tabs. So it's much faster to find and open system tabs as used in advanced search and in the sidebar.

have fun!
mario

Hubert

unread,
Nov 12, 2019, 4:36:09 AM11/12/19
to TiddlyWiki
Thank you Mario for pointing me to these resources. So much interesting and useful stuff!

Thanks,
Hubert
Reply all
Reply to author
Forward
0 new messages