[Kara] Timestamp for checklist entries

[Kara] Timestamp for checklist entries

@Mohammad I’m currently trying out Kara and I appreciate it as much as the other plugins you’ve created :orange_heart:.

I like the idea of interstitial journaling behind Kara and I’m trying to get closer to the roam experience shown in this screenshot interstitial-journaling-example.png :slightly_smiling_face:

Checklists and interstitial journal items cannot be merged,
but they can exist parallel in a journal tiddler.

I would like to have a timestamp for each checklist entry similar to the interstitial items.

Question: How to add a timestamp to each checklist entry?

01

Interstitial entries with timestamps do work, but in transfering its code to checklist entries, I run into a

Syntax problem:

add-items-interstitial⇗

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

add-items-checklist⇗

\define kara-add-item-action()
<$let			
      item     = {{{ [<tempTid>get[text]] }}}
      newItem  = {{{ [<item>addprefix[ ]addprefix<undoneMark>] }}}
      newblock = {{{ [<dblock>addprefix<newItem>addprefix<lbr>] }}}
>

I’ve tried to add note-time to the add-items-checklist-tiddler :neutral_face:

<$let		
note-time=<<now format:'0hh:0mm'>>
...
newItem  = {{{ [[<note-time>addprefix['']addsuffix['']]  <item>addprefix[ ]addprefix<undoneMark>] }}}
...

Unfortunately, this does not work :cry: and my question remains:

How to add a timestamp to each checklist entry? :thinking:

The initial square bracket is misplaced, and you need to join[] the separate items to create a single text value result, like this:

newItem={{{ [<note-time>addprefix['']addsuffix['' ]] [<item>addprefix[ ]addprefix<undoneMark>] +[join[]] }}}

Observe how this filter syntax consists of three filter “runs”:

  • The first run outputs a bold note-time value
  • The second run outputs the item text with a leading “undoneMark”
  • The third run then joins the first two runs together to assemble a single text value

For clarity, this filter could also be written like this:

newItem={{{ [['']] [<note-time>] [['' ]] [<undoneMark>] [[ ]] [<item>] +[join[]] }}}

Note how each part is a separate filter run that occurs in the order they are to be assembled, followed by the +[join[]] filter run to connect them all. This allows you to avoid the more verbose addprefix[...] and addsuffix[...] syntax.

enjoy,
-e

Thank you, Eric :smiling_face_with_three_hearts:

I’ve tested these codes and they deliver the right entry in the checklist items list @@.todo :slightly_smiling_face:

Another problem remains:

The entry with the timestamp appears in the code

''12:00'' [ ] New entry with a time stamp

but it is not visible as a checklist entry in the tiddler:

:face_with_monocle:
02

:thinking:

The solution is quite simple:


newItem={{{ [<undoneMark>] [['']] [<note-time>] [['' ]]  [[ ]] [<item>] +[join[]] }}}

The checklist macro requires to set <undoneMark> first :relaxed:

03