Is there anyone who has already made this? I want to click one button and have it immediately download the current tiddler as a TID file.
I have for other than .tid, I started with the instructions on making a Custom export in tiddlywiki.com and you can look at the existing code. I can help more later today
@markkerrigan - you do know there is an export tiddler button under the tiddlers “more” button, right? And that you can move the export button so it shows directly in the tiddlers toolbar.
I did manage to make something which works. I think what is confusing here is the fact you can pass exportFilter to tm-download-file
, which is not mentioned on the documentation. Curious to seek if anyone has made any other different approaches.
\define makeExportFilter()
[[$(currentTiddler)$]]
\end
<$button class="tc-btn-invisible">
<$action-sendmessage $message="tm-download-file" $param="$:/core/templates/exporters/TidFile" exportFilter=<<makeExportFilter>> filename={{{ [all[current]addsuffix[.tid]] }}}/>
{{$:/icon/feather/share.svg}}
</$button>
I do have a very different approach I use. I have buttons that pass the tiddler name or filter to the advance search filters tab from which I export one or more tiddlers, in which ever format I wish. I have then written some advanced search filters buttons for a variety of functions including export as json even save as list, bookmarklet and more.
- this way there is often one more click then one less click, which is still quicker than more > export > export type.
- however I gain a lot more functionality without crowding the view toolbar.