I promise I searched for this answer

199 views
Skip to first unread message

Daniel Zion

unread,
Jun 25, 2020, 10:20:12 AM6/25/20
to TiddlyWiki
Hey all,

I started using Tiddlywiki in February for a commonplace book kind of thing. I like the journal aspect, but I'm having a problem with organizing it. I have a "Journal List" tiddler that has the very simple
<<list-links [tag[Journal]]>>

to display all of my journal tiddlers. I've run into two issues that I can't seem to find an answer for. First, this organizes the list by the title alphabetically, not by date. What could I add that puts them by date? I use ISO 8601 for my dates, so it's useable as is, but it would be nice to get them right.

Second, how could I limit it to only show year 2020? I might end up using this for a while and wouldn't want a massive list of journal tiddlers if I could have a "Journal List 202x" for each year.

Thanks in advance!

Mark S.

unread,
Jun 25, 2020, 10:55:27 AM6/25/20
to TiddlyWiki
Are you using a date field for your date?

You should be able to extend the filter to something like:

<<list-links [tag[Journal]sort[mydatefield]regexp:title[202]]>>

to sort by your date field (e.g. mydatefield) and restrict items to those containing "202".

Good luck!

Eric Shulman

unread,
Jun 25, 2020, 10:56:10 AM6/25/20
to TiddlyWiki
On Thursday, June 25, 2020 at 7:20:12 AM UTC-7, Daniel Zion wrote:
I started using Tiddlywiki in February for a commonplace book kind of thing. I like the journal aspect, but I'm having a problem with organizing it. I have a "Journal List" tiddler that has the very simple
<<list-links [tag[Journal]]>>
to display all of my journal tiddlers. I've run into two issues that I can't seem to find an answer for. First, this organizes the list by the title alphabetically, not by date. What could I add that puts them by date? I use ISO 8601 for my dates, so it's useable as is, but it would be nice to get them right.

You can combine multiple filter operators to achieve more specific results.  In this case, add in the sort[...] operator, like this:
<<list-links [tag[Journal]!sort[modified]]>>
This will find tiddlers with the "Journal" tag AND also sort the resulting list by the "modified" date field of each tiddler, in reverse order (i.e., newest date first)

<<list-links [tag[Journal]regexp:modified[^2020]!sort[modified]]>>
This will find tiddlers with the "Journal" tag, where the "modified" field value "begins with 2020" (using "regular expression" syntax)

enjoy,
-e


Daniel Zion

unread,
Jun 25, 2020, 1:51:49 PM6/25/20
to TiddlyWiki
Mark, I guess I am not adding an additional date field, just set the date of new journal tiddlers to "YYYY MMM DDth."

Eric, I ended up trying
<<list-links [tag[Journal]!sort[created]]>>

Which works, except for some reason June is below the rest! Feb-May is in order from newest on top to oldest on the bottom, but June is below everything else?

thanks you both for your help! I didn't find a syntax guide (that I understood) for adding filters, so thanks for that too.

Mark S.

unread,
Jun 25, 2020, 2:00:06 PM6/25/20
to TiddlyWiki
Interesting, Eric and I posted within a minute of each other.

You can start your exploration of the wonderful world of filters here:


Did you happen to make the the Feb/May tiddlers *after* you made the June one's ? Like you started with recent items and then later back-filled the older tiddlers? Because the "created" date reflects the date the tiddler was created, which could easily be different than the date you happen to put in your title.

Good luck!

TW Tones

unread,
Jun 25, 2020, 8:19:53 PM6/25/20
to TiddlyWiki
Folks,

This is an example of a re-occurring issue with the standard distributions "new journal and new journal here feature". Created an Modified dates are not the journal date, and given all manor of title dates that can be set in 

$:/config/NewJournal/Title people like Daniel can build a substantial journal and find it hard to use the title to deal with listing.


My attached json modified new journal and new journal here to add a journal-date to journal entries to a more robust date field for listing exists. I must revisit how to submit core changes for this.

Daniel,
The answers to you questions would be simpler if the journal-date field existed on your journal tiddlers.

If you tell us what the journal tiddlers title format is from $:/config/NewJournal/Title and you used this consistently, I/we can give you a batch button to update all existing journal entries to include a journal-date field.

If you install my attachment the journal-date will be created going forward.

Including the journal-date also allows one to post future and past journals.

Regards
Tony
journal-date.json

Daniel Zion

unread,
Jun 26, 2020, 9:39:18 AM6/26/20
to TiddlyWiki
Mark,

Thanks for the link to that page on the filters. I hadn't messed with the Advanced Search yet, but that does seem like an easier place to try out some filters. I created the tiddlers in order, so February first on though June, so I don't think it was that. Reading TW's reply, it seems like I didn't understand what fields were included, or how they were formatted.

TW,

I guess in my searching I didn't see other people having similar issues. Or at least the titles seemed different enough that I didn't open the discussions. I have added your json and will see how that works. The content of my $:/config/NewJournal/title tiddler was: YYYY MM DDTH. Thankfully I'm not too far into using Tiddlywiki, so manually adding the date field for the ones I have shouldn't take too long.

Thanks so much for your reply and work on that add-in.

Mark S.

unread,
Jun 26, 2020, 10:27:48 AM6/26/20
to TiddlyWiki


On Friday, June 26, 2020 at 6:39:18 AM UTC-7, Daniel Zion wrote:
Mark,

Thanks for the link to that page on the filters. I hadn't messed with the Advanced Search yet, but that does seem like an easier place to try out some filters. I created the tiddlers in order, so February first on though June, so I don't think it was that. Reading TW's reply, it seems like I didn't understand what fields were included, or how they were formatted.


I would need to see the actual tiddlers to know what's going on. The sorting algorithm is pretty accurate, so at the moment I have to assume that one or more of the items were created out of order.

As an experiment, you can create a tiddler and tag it with $:/tags/ViewTemplate , with the following contents:

{{!!created}}

This will display the created date on every tiddler. Then you can look at the tiddlers that are out of order and see if the title date stamp matches the created date stamp. When you're done, you can delete the viewtemplate tiddler.

Good luck!

Daniel Zion

unread,
Jul 9, 2020, 9:34:24 AM7/9/20
to TiddlyWiki
Hey all,

Sorry for the delay. Attached is a screen shot of my $:/config/NewJournal/title shadow tiddler.

Mark,

I tried making that tiddler to see all by created date, but nothing showed up. Did I need to have the title formatted a certain way? I put $:/tags/ViewTemplate as a tag but nothing showed up there.

thanks again for all the help!
Journal-title.PNG

Mark S.

unread,
Jul 9, 2020, 10:49:38 AM7/9/20
to TiddlyWiki
When you make the view template, and remember to put {{!!created}} in the text field, the date should show up in view mode on EVERY tiddler. If it doesn't, then you've probably done something wrong in the creation of the template tiddler. The dates should show up with the default formatting.

Sometimes when you type something into a tag field, you might accidentally add a space. So be sure that the correct tag has been submitted.

Another way to approach it is to put something like this in a tiddler:

<$list filter="[tag[Journal]!sort[created]]">
<$link/> // {{!!created}}// <br/>
</$list>

This will list your journal entries and show the "created" date it's seeing. That way you can pick out any discrepancies.

HTH
Reply all
Reply to author
Forward
0 new messages