I have a tiddler which contains a Streams hierarchy that is reasonably big and complex (a couple of nested levels, more than a few full screens when the tree is fully expanded). I need to move the tiddler and the whole Streams hierarchy to another wiki (both wikis are single file). I have tried to export the tiddler as JSON (just like I often do to plugin tiddlers, to further import them into another wiki), then looked at the source, and I didn’t see content from the Streams tree, only a stream-list
field with titles. Does this mean that the “export-plugin-as-json” mechanism can’t be used in this case and my only option is to manually copypaste the Streams hierarchy into the new wiki? I will do the manual chore anyway, but I’d like to know if I’m not missing an easier way.
I think the easiest approach is probably to add a new “export tiddler” button that includes all the stream nodes associated with the tiddler in the JSON package. Here’s a quick mockup you can test (code follows): $__core_ui_Buttons_export-tiddler-with-streams.tid (526 Bytes)
\define makeExportFilter()
[[$(currentTiddler)$]get-stream-nodes[]]
\end
<$macrocall $name="exportButton" exportFilter=<<makeExportFilter>> lingoBase="$:/language/Buttons/ExportTiddler/" baseFilename=<<currentTiddler>>/>
All I did here was clone $:/core/ui/Buttons/export-tiddler
and add get-stream-nodes[]
(included in the Streams plugin) to makeExportFilter
. You may wish to rename it or to modify the caption/description and the related config tiddlers to your own preference.
Alternately, if you want this to be the default behavior in your wiki, you could paste the above code directly into $:/core/ui/Buttons/export-tiddler
to overwrite it directly. Since get-stream-nodes
retrieves all the nodes in the tree plus the host tiddler, it should function like the normal export button for tiddlers that don’t have an associated stream-list
.
- As always, modifying a core tiddler means you won’t automatically benefit from future updates to that tiddler’s shadow; you’ll need to manually apply any desired changes.