I hope my instructions were clear enough and you found this worked for you and all your devices. If now, don’t hesitate to say so.
That said, I wondered how I could make ANOTHER unique button with this feature and have it listed under the Tools section. And could this be a plugin or a feature standard in future releases? What are your thoughts on that?
You could easily clone $:/core/ui/Buttons/import and patch its code, probably change its icon too, et voilà !
Import button tiddler is tagged $:/tags/PageControls and so would be the clone, effectively making it a page button in the Tools section.
Then, a little configuration in Control Panel → Appearance → Toolbars → Page Toolbar can make the original button invisible, the clone visible, and you’re done.
But I think you mean wouldn’t it be great to export multiple tiddlers at once. But since the browser only allows exports as downloads, you can only do one at a time. What would be handy is if multiple tiddlers could be downloaded as a zip file.
apologies, yes. the ability to export multiple tiddlers individually is something I’ve been hoping for the ability to do, and was curious if this would make it possible.
The browser limitations was something I encountered when asking in an earlier post, and started to think about if a sort of export cue could be set up, but never figured out how something like that could be done
TiddlyTools/Search/Filters has the ability to select and export multiple tiddlers as separate .tid files.
To import this tiddler, just visit TiddlyTools/Search/Filters and then drag-and-drop the tiddler’s title to your own TiddlyWiki. Since this add-on is written purely in wikitext, you can use it immediately, without needing to save-and-reload.
Start by entering/selecting a filter that identifies the tiddlers you want to export. Just type your desired filter syntax in the same way you would use the $:/AdvancedSearch>Filter tab input, or click on “Filters” to view a drop list and select a previously saved custom filter or pre-defined shadow filter. Alternatively, to assist in creating a custom filter you can press the “hammer and screwdriver” icon to display the “FilterMaker” interface.
Once a valid filter has been entered/selected, a list of matching tiddlers will be displayed. You can futher filter this list by entering some matching text (or regular expression pattern) and selecting which tiddler field(s) to search (default is title… use ctrl-click to select multiple field names). The list can also be sorted by title, size, date created, or date modified.
When you have a suitable list of tiddlers that you want to export, press the “export” button (“box and arrow” icon, upper-right above the filter input field). This will display an “Export tiddlers” modal dialog listing all matching tiddlers with individual checkboxes (defaulting to checked). You can manually uncheck any specific tiddler titles that you don’t want to be exported (or use the all/none buttons, lower-left).
Then, select “tid” from the droplist (bottom-center). Note that the exported filenames will use the tiddler title of each exported tiddler as the target filename. Finally, press the “export” button (lower-right) to begin downloading the selected tiddlers as separate .tid files. If you’ve configured your browser to “always ask where to download files”, a system-provided dialog will appear for each downloaded .tid file.
thats awesome
I didnt see it when I just read it over but, is it possible to change the export format to .json, or is .tid the only choice?
it isn’t a make or break sort of thing but, I do have tiddlers with multiline fields
Exporting to .json format is the default, but it puts all the selected tiddlers in the same file. Do you specifically want .json format, but with only one tiddler per file?
I don’t think the slight modification will cause any problems. To users and administrators: please test before using it. If it does, please remove the file upload from this post immediately.
I only just visited the Tips & Tricks to see this. A few additional tips.
I don’t recomend you modify the core import button, create a custom one
Place it in a tiddler with the $:/tags/SideBarSegment tags and use list-after set to $:/core/ui/SideBarSegments/page-controls or to taste.
With the simple content <$browse multiple>
However since we have a custom import button ask yourself what it is for beyond importing multiple?
My main reason to use this custom button is to import JSON fiels so I use the accept=".json" parameter so only .json files appear in the file open dialogue and searches. You can add multiple file types if you wish. eg (*.json *.txt *.tid)
Here is a package for a custom browse button custom-browse-button.json (2.0 KB) modify the fields in $:/PSaT/custom-browse/button to suit.
\whitespace trim
<span class="tc-file-input-wrapper browse-button">
<$browse multiple accept={{!!extensions}} tooltip={{{ [[Search for and Import one or more files with the extensions]] [{!!extensions}] +[join[ ]] }}}/>
{{!!caption}}
</span>