Wish list for my tiddlywiki

So my two biggest wishlist items for tiddlywiki are for Journal entries to have more than just the day as the title but also include the timestamp hour:minutes so it can be used as a diary of sorts without having to always add the minutes to keep everything properly sorted. The BIG request is I need a quick way to reset all the TODO items and ShoppingList items which are checkboxed with one click to reset them all back to the top. Here is a sampler of my main notebook tiddlywiki https://rgnotebook.tiddlyhost.com/

So far I have figured out how to use a desktop app to replace all the “task done” with “task” and replace all the “shop done” with “shop” to reset both but need to do it on an android phone next

Welcome to the forum, Ray!

You can go into the settings → Info → Title of Journal

and add 0hh:0mm:0ss to the journal template. Now each click on the journal button will create a new journal tiddler with a date and timestamp.

You can add this code to your tiddler to create a reset button for your tasks (be sure to make a backup first) :

<$button>Reset
<$list filter="[!has[draft.of]tag[task]tag[done]]">
<$action-listops $tags="-done" />
</$list>
</$button>

Since you’re using the same code for your grocery list, you might want to wrap it in a macro to re-use for each list project.

Have fun!

1 Like

Welcome Ray,

In addition to @Mark_S answer;

Here are two replacements for the New Journal buttons that sets the journal-date field. This field is useful if you want to do more sophisticated date handling later on, like extracting the time etc…

new-journals-and-journal-date.json (2.4 KB)

You could also use a date picker to change this value if needed.

1 Like

I use Calendar and Agenda plugin tw-calendar with Mobile frendly agenda page layout for diary, and rarely use Journey to write a summary, so in my use case I only need one Journey at most per day.

1 Like

Another option is a simple extension based on the Interstitial Journaling principle.

Todolist Plugin 1.4.1 — Organize, prioritize, and plan your work is a fantastic collection of productivity boosts such as this.

Long story short, you get one journal tiddler with an automatic timestamp for each line/paragraph.

Two drawbacks must be noted:

  1. A keyword search will generate a hit with the internal tiddler that holds your entry, not the Journal tiddler itself.
  2. If today is 08/02/2023 and you’ve worked logging your tasks in the journal, they all have timestamps. If on the following day, 09/02/2023, you open the journal tiddler for the previous day, the plugin won’t care and will make your entries stamping them with the hour of the day. I know this from experience.

Regardless, the plugin can help you journal with timestamps, and if you remember the points above, it works well.

1 Like

Worked like a charm. Now just wishing on my cell the checkboxes were larger enough for my sausage fingers; wishing I could either have spaces between the checkbox and tiddler item or a larger check box because half the time I press on the cell phone for a shopping list item I open the tiddler instead of checking the box. Tried changing adding spaces before the !!title and it just makes the words italics. Hah!

<$list filter="[!has[draft.of]tag[task]!tag[done]sort[created]]">
<$checkbox tag=“done”>
<$link to={{ !!title}}>
<$view field=“title”/>
</$link>

</$checkbox>
</$list>

Hi,

Try this:

<$list filter="[!has[draft.of]tag[task]!tag[done]sort[created]]">
<$checkbox tag=“done”>
<$link to={{ !!title}}>
&nbsp;&nbsp;<$view field=“title”/>
</$link>

</$checkbox>
</$list>

You can add as many &nbsp;s as you like before the <$view> widget.

Fred

1 Like

Nicely done thank you Fred. Well it adds visual spaces but the spaces are underlined and still part of the tiddler link so I am still able to fat finger the tiddler instead of the checkbox since the invisible spaces are still clickable (underlined) thus spaces are still clickable. Looked exactly right

Based on @tw-FRed’s code, how about this?

<$list filter="[!has[draft.of]tag[task]!tag[done]sort[created]]">
<$checkbox tag=“done”>
{{!!title}}
^^<$link to={{!!title}}>
^^<$button>{{$:/core/images/link}}</$button>^^
</$link>^^

</$checkbox>
</$list>

And just-for-the-giggles while watching the hockey game:

<$list filter="[!has[draft.of]tag[task]!tag[done]sort[created]]">
<span style="border:1px solid black;font-size:1.5em;padding:5px;white-space:nowrap;line-height:45px;">
<$checkbox tag=“done”>
{{!!title}}
<$link to={{!!title}}>
<$button>{{$:/core/images/link}}</$button>
</$link>
</$checkbox>
</span><br>
</$list>
1 Like

Argh! The spaces are ill placed…
This should be better:

<$list filter="[!has[draft.of]tag[task]!tag[done]sort[created]]">
<$checkbox tag=“done”>
&nbsp;&nbsp;<$link to={{ !!title}}>
<$view field=“title”/>
</$link>

</$checkbox>
</$list>

Fred

Note that, if the $link widget’s “to” param as well as the widget’s contents are both omitted, they will default to the title of the current tiddler, so

<$link to={{!!title}}><$view field="title"/></$link>

can also be written using the “short form” of just:

<$link/>

Also note that the tag[...] filter operator is highly optimized in the TWCore code, so you should start your filter syntax with the tag[...] operators in order to more quickly reduce the number of matches in the filter results prior to checking for the draft.of field or sorting the list results. This will give the best performance, especially if there are a lot of tiddlers in your TiddlyWiki.

Thus, this entire bit of wikitext can be written as:

<$list filter="[tag[task]!tag[done]!has[draft.of]sort[created]]">
   <div><$checkbox tag="done">&nbsp;&nbsp;<$link/></$checkbox></div>
</$list>

-e

2 Likes

Very impressively done - outstanding! - but is there anyway to set a sort to be sort descending?

To sort in descending order, use !sort[created] instead of sort[created]. Alternatively, you could write sort[created]reverse[] but this is somewhat less efficient, since the reverse[] filter operator is applied separately following the processing of the sort[created] filter operator.

1 Like

In some cases alphabetical sort works on title instead of created and this give finer control if you wanted to name your items starting with numbers - the BANG sort (!sort) worked! Thank you!

<$list filter="[tag[shop]!tag[done]!has[draft.of]!sort[title]]">

<$checkbox tag="done">    <$link/>

While we are on this topic has anyone tried adding graphics to your check-boxed lists? Seems like it should be something we could do right? Maybe green or red arrows things or something to make it look cooler

You can use CSS. This example borrows an image from stack and is kind of boring, but you can use your own image to give a checkbox that alternates between dragons and penguins, for instance.

<style>

label.checkmark input[type='checkbox'] {
    width: 23px;
    height: 21px;
     background: transparent url(http://i.stack.imgur.com/S4p2R.png ) no-repeat 0 50%
}
label.checkmark input[type='checkbox']:checked {
    background: transparent url(http://i.stack.imgur.com/S4p2R.png ) no-repeat 80% 50%
}

</style>

<$checkbox tag="done" class="checkmark"> Is it done?</$checkbox>

@Ray_Gillman replacing a checkbox with a button, or pair of buttons is also a valid approach. See the toggle and cycle operators.

  • But if you want you could also use a radio selector, or button equivalent, with dragon and penguins as the icons. In many ways its all about the screen space available to present the choice.