Folks,
I have a lot of macros saved as multi-tiddler JSON files. I want to drag and drop them or import more than one at a time, however they all trigger the Import mechanism and are expanded into separate tiddlers.
I wanted to import them in bulk from files to JSON tiddlers.
This looses the JSON file name and they are expanded into tiddlers to import. Not longer as there were on disk, and other JSON files are just not imported.
Solution Found
using browse widget: Create a “files Button” as follows;
<$browse multiple deserializer="text/plain">
- Selecting JSON files with or without tiddlers contained in them will be imported as text/plain and not expanded, however their type field will be set to application/json
- These tiddlers can be dragged between wikis without being expanded.
- If you use this method to import .tid files they are imported such that the new tiddler has the title.tid and the text contains the tiddler as it appeard on disk, with all fields and text content. Perhaps good for pasting on a forum.
Example text of imported .tid file using above solution
caption: {{$:/language/SideBar/Contents/Caption}}
created: 20140809114010378
list: HelloThere Learning [[Working with TiddlyWiki]] [[Customise TiddlyWiki]] Features Languages Editions Plugins Platforms Reference Community About
list-after: $:/core/ui/SideBar/Open
modified: 20150414070242411
tags: $:/tags/SideBar
title: TableOfContents
type: text/vnd.tiddlywiki
<div class="tc-table-of-contents">
<<toc-selective-expandable 'TableOfContents'>>
</div>
I am still looking how to
- create a drop zone to do this
- a method to extract the tiddlers from a JSON file containing tiddlers when desired.