Sort journal posts by date that memory occurred

302 views
Skip to first unread message

mej...@gmail.com

unread,
Mar 6, 2021, 7:13:05 AM3/6/21
to TiddlyWiki
Firstly, thank you to those involved in making TiddlyWiki the amazing tool that it is.

I currently use a proprietary journalling app called Day One for keeping a chronological record of special family memories, but am keen to migrate to TiddlyWiki.

In Day One, all entries are automatically sorted by the date that the memory occurred, as opposed to when the entry was actually posted. This is important to me, because entries are usually added in retrospect and my brain doesn't always remember to add them in the order that they actually took place!

For example, if I add three memories that took place in this order on 1 Jan; 1 Mar; 1 Feb, the entries automatically appear in descending order based on the date that the memory occurred like this: 1 Mar; 1 Feb; 1 Jan.

Is it possible to replicate this behaviour in TiddlyWiki? If so, what is the easiest way to set this up? I don't mind playing with things to get it working and have a technical background, but please do explain it like I'm 5!

Kind regards,

Mike

Message has been deleted

torax...@googlemail.com

unread,
Mar 6, 2021, 8:28:45 AM3/6/21
to TiddlyWiki
Hi Mike,

do you mean with "date that memory occured" the initial recording date? In that case you "only" have to sort the journal entries by tiddler-creation-timestamp. Filter:
[tag[Journal]sort[created]]

Tiddler-Text for display:

<!-- Table only for formatting purpose -->
<table>
    <!-- Filtering all Tiddlers with tag "Journal", sort them acording created-Field -->
    <!-- an ! before sort would sort in decand order.-->
    <$list filter="[tag[Journal]sort[created]]">
        <!-- Line with data -->
        <tr>
            <!-- Link to Tiddler by using its title -->
            <td><$link to=<<currentTiddler>> /></td>
            <!-- Displaying the created-field of that tiddler -->
            <td><$list filter="[<currentTiddler>get[created]]"><<currentTiddler>></$list></td>
        </tr>
    </$list>
</table>


Cheers
Torax
Message has been deleted

si

unread,
Mar 6, 2021, 9:15:11 AM3/6/21
to TiddlyWiki
@Mike This is totally achievable in TiddlyWiki, but it depends on exactly how you want to store your data.

One approach would be to create a new tiddler for each memory that you want to capture, and then use a field to store the date that it occurred.

1. Create a new tiddler, tag it "Memory" (or whatever you want), and fill in the title and text as you please.
2. Go to "Add new field" at the bottom of the tiddler, and create a field called "memory-date" (or whatever you want), with the date as its value.
3. To generate a list of all memories and sort by date, from newest to oldest, you can add the following macro to another tiddler:

<<list-links filter:"[tag[Memory]!sort[memory-date]]">>

One thing you might want to do is use the date-picker plugin to make it easier to set the date:

1. Install the plugin as per the instructions on the site.
2. Create a new tiddler with whatever name you want, and tag it "$:/tags/ViewTemplate". This is a special tag that tells TiddlyWiki to automatically display the contents of the tiddler on every other tiddler in the wiki.
3. Add the following text to the tiddler:

<$list filter="[is[current]tag[Memory]]">
<$edit-date icon="$:/plugins/kixam/datepicker/icon" field="memory-date"/>
</$list>

Now you will have a date picker icon on every tiddler with the tag "Memory". So you don't need to edit the field directly, just click on the icon and select the date.

stan...@gmail.com

unread,
Mar 6, 2021, 9:23:21 AM3/6/21
to TiddlyWiki
Mike, what I think you are asking about is making journal entries after the date of the memory, but having it appear in chronological order.  Please correct me if I am wrong.   

What I did was to change the title of new journal tiddlers to be "YYYY-0MM-0DD".  New journal tiddler automatically get today's date, but if you have a memory, say from February 1 (2021-02-01), you can edit the journal tiddler title to get it in the correct chronological order.  A right side panel search will put them in chronological order. 

Stan 

mej...@gmail.com

unread,
Mar 6, 2021, 11:23:28 AM3/6/21
to TiddlyWiki
@Torax - no, looking to sort by date of the memory itself rather than date the memory was posted.

@Si - that sounds like what I had in mind. I will give this a try and post an update.

@Stan - that’s correct. Although would prefer not to have to perform a search to view the posts.

Thank you all for your help. I will have a go and see if I can set this up and post an update.

Mike

mej...@gmail.com

unread,
Mar 6, 2021, 3:10:50 PM3/6/21
to TiddlyWiki
I tried your approach Stan and it worked – hooray!

Screen Shot 2021-03-06 at 20.04.51.png

Thanks very much.

Mike

torax...@googlemail.com

unread,
Mar 6, 2021, 4:09:29 PM3/6/21
to TiddlyWiki
Mike, you can partial automate the task:
1. set the title-setting in $:/ControlPanel
pic1.jpg

2. Activate the "New Journal"-Button in the Side-Bar:
pic2.jpg

Resulting:
pic3.jpg
Message has been deleted

mej...@gmail.com

unread,
Mar 6, 2021, 4:17:48 PM3/6/21
to TiddlyWiki
I followed the instructions to implement the date picker and am confused:

Screen Shot 2021-03-06 at 21.06.09.png

The date picker appears below the content of the tiddler (top of image). Changing this date does not change the value of the `memory-date` field, so I assume this changing another date. Is it possible to have the date picker appear in the `field value` input box to simplify entry of `memory-date` instead?

Mike

si

unread,
Mar 6, 2021, 5:01:35 PM3/6/21
to TiddlyWiki
@Mike I can see that you are using the tag "Journal" instead of "Memory". Maybe you forgot to change this in the example code I gave?

So <$list filter="[is[current]tag[Memory]]"> should be <$list filter="[is[current]tag[Journal]]">.

Having said that it still doesn't explain what I am seeing in your screenshot. If your test doesn't have any personal data would you be willing to share it as an attachment? It will be easier to diagnose that way.

>>> Is it possible to have the date picker appear in the `field value` input box to simplify entry of `memory-date` instead?

Instead of the tag "$:/tags/ViewTemplate" you could use the tag "$:/tags/EditTemplate". It does the same thing but transcludes the content in edit mode rather than view mode. This won't look very neat, but I'm just giving you a quick and simple way to do it.

stan...@gmail.com

unread,
Mar 6, 2021, 8:10:30 PM3/6/21
to TiddlyWiki
I am happy to hear that, Mike.  Enjoy!

mej...@gmail.com

unread,
Mar 7, 2021, 2:31:02 AM3/7/21
to TiddlyWiki
@Si - I changed tag to journal in both places. Happy to attach file - here it is.

Mike
index.html

si

unread,
Mar 7, 2021, 8:03:08 AM3/7/21
to TiddlyWiki
@Mike I just tried it on the copy that you shared and it seems to work fine. Maybe you just made a type or something?

Anyway I attached it so you can see what I did - if you edit a tiddler with the tag "Journal" you will see a date picker at the bottom. It's ugly, but you can always fix that once you are happy with the functionality.
index.html

mej...@gmail.com

unread,
Mar 9, 2021, 12:41:48 PM3/9/21
to TiddlyWiki
@Si Thanks for taking time to sort – this is exactly what I had in mind.

Mike
Reply all
Reply to author
Forward
0 new messages