kookma / TW-Trashbin

Trash bin tools in Tiddlywiki. Delete tiddlers and restore them easily
https://kookma.github.io/TW-Trashbin/
16 stars 3 forks source link

Integration with trashbin-mod ? #7

Open hchaase opened 4 years ago

hchaase commented 4 years ago

I have now made the mod as a macro (in a plugin for convenience)

If you like, I thought that you could include the macro call in your trashbin plugin in the next release. This way, my trash bin mod would work without overriding any of the trash bin tiddlers and the next release of trash bin would (properly) not require a new update of the trashbin-mod.

in $:/plugins/kookma/trashbin/macros/bulk-operation I added <<trashbin-mod "<Item>">> here

\define delete-trashed-tiddlers()
<$list filter="[tag[$:/tags/trashbin]search:title[$:/trashbin/]]" variable="Item">
<$action-deletetiddler $tiddler=<<Item>> /><<trashbin-mod "<Item>">>
</$list>
\end

and in $:/plugins/kookma/trashbin/ui/sidebar I added <<trashbin-mod "<currentTiddler>">>


\define delete-button()
<$button class="tc-btn-invisible" tooltip="Delete permanently">
{{$:/plugins/kookma/trashbin/images/times.svg}}
<$list filter="[list[$:/StoryList]] +[field:title<currentTiddler>>]" variable=ignore>
<$action-sendmessage $message="tm-close-tiddler" $param=<<<currentTiddler>> />
</$list>
<$action-deletetiddler $tiddler=<<currentTiddler>> /><<trashbin-mod "<currentTiddler>">>
</$button>
\end

$__plugins_kookma_trashbin_macros_bulk-operation.txt $__plugins_kookma_trashbin_ui_sidebar.txt

kookma commented 4 years ago

@hchaase Thank you! The reason I have not added these to Trashbin is I do not know how plain revisions from JD works and I need to learn it first! By the way for next release we will discuss this and I welcome your idea to include such scripts to work with yours.