Custom Time Formatting for Kara Plugin Interstital Journal?

@Mohammad,

Could a way to add another parameter for “format” to interstitial journaling be done, or is the way the plugin designed incompatible with it?

Something along the lines of <<interstitial format:"0hh:0mm PM">> for one and for another tiddler <<interstitial format:"[UTC]0hh:0mm">> or even using it for making logs of stuff like <<interstitial format:"[UTC]YYYY-0MM-0DD 0hh:0mm:0ss">>

I tried to do this on my own but I don’t have a good enough understanding of text substitution and parameters to make it work. (Actually sorta broke kara twice trying to make it work :sweat_smile:)

Look at $:/plugins/kookma/kara/macros/add-items-interstitial then see note-time=<<now format:'0hh:0mm'>>
Try to change format and let me know the result. It possible to add a global option to Kara setting the format of not-time.

<<interstitial format:"[UTC]YYYY-0MM-0DD 0hh:0mm:0ss">>

This was what I had originally done, however this applies to all interstitial journals, rather than one or the other.

Here’s what I tried to do for reference,

Inside of $:/plugins/kookma/kara/macros/add-items-interstitial

\define kara-add-item-action(timeFormat)
<$let			
      note-time=<<now format:'$timeFormat$'>>
      item     = {{{ [<tempTid>get[text]] }}}
      newItem  = {{{ [[*]] [<note-time>addprefix[<small>]addsuffix[</small>]] [<item>] +[join[ ]]}}}
      newblock = {{{ [<dblock>addsuffix<newItem>addsuffix<lbr>] }}}
>

Inside of $:/plugins/kookma/kara/macros/add-items

\define kara-add-items(format)
<div class="kk-kara-header-ui">
<div class="kk-kara-header-textbox"><<kara-input-item>></div>
<div><$button class="tc-btn-invisible" actions=<<kara-add-item-action timeFormat:"$format$">> disabled={{{ [<tempTid>get[text]!is[blank]then[no]else[yes]] }}}>{{$:/core/images/new-button}}</$button></div>
</div>
\end

Inside $:/plugins/kookma/kara/macros/interstitial

\define interstitial(tiddler, showInput, focus:"yes", mode:"" format:"0hh:0mm")
\import $:/plugins/kookma/kara/macros/definitions
\import $:/plugins/kookma/kara/macros/add-items
\import $:/plugins/kookma/kara/macros/add-items-interstitial
\import $:/plugins/kookma/kara/macros/disp-items-interstitial
<$let tiddler={{{ [<__tiddler__>trim[]] }}}
      src= {{{ [<tiddler>!is[blank]then<tiddler>else<currentTiddler>] }}}
      dataBlockStartDelimiter ="@@.interstitial"
      dataBlockEndDelimiter   = "@@"  
      tempId={{{ [<tiddler>!is[blank]then[interstitial/$(currentTiddler)$/]addsuffix<tiddler>]
                 :else[[interstitial/]addsuffix[$(currentTiddler)$]] }}}			
      editTextPlaceholder="add new interstitial note"
      focusStatus=<<__focus__>>
      displayMode={{{ [<interstitialDisplayConfig>get[text]] [<__mode__>] :and[first[]] }}}
      lbr="
"      >

However I realized that I can’t really pass along the format to kara-add-item-action parameter, so I’m not really sure how to proceed :sweat_smile:

I eventually just cloned the interstitial tiddlers and made a second version as <<log mode:"reverse">> that used a different time format from what kara’s interstitial uses.

Edit: Made a new topic for this instead of continuing the old one.

Edit 2: Unfortunately, I don’t think I’ll be able to make it work as I’d like it to, I haven’t managed to find a way to set a different time format for each interstital journal :confused: