OcttKB/Wiki-OcttKB/plugins/commander/$__plugins_kookma_commander...

27 lines
873 B
Plaintext

tags: $:/tags/Commander/Macro
title: $:/plugins/kookma/commander/macros/logging
type: text/vnd.tiddlywiki
\define set-title() $:/temp/commander/logs/tid-{{{[tag[$:/tags/Commander/LogOps]count[]add[1]]}}}
\define create-log-tiddler(msg)
<$wikify name="myTitle" text="""<<set-title>>""">
<$wikify name="myCaption" text="""<$macrocall $name="set-caption" msg=<<__msg__>> />""">
<$action-createtiddler $basetitle=<<myTitle>>
$savetitle="$:/state/commander/log-tiddler"
tags="$:/tags/Commander/LogOps"
type="application/json"
caption=<<__msg__>>
/>
</$wikify>
</$wikify>
\end
\define log-add-single-operation(msg:"commander operation", tidItem:"no item")
<$action-setfield $tiddler={{$:/state/commander/log-tiddler}} $index=<<__tidItem__>> $value=<<__msg__>> />
\end
\define delete-all-log-tiddlers()
<$action-deletetiddler $filter="[tag[$:/tags/Commander/LogOps]]" />
\end