Timestamp as title?

102 views
Skip to first unread message

Seano

unread,
Apr 17, 2020, 8:53:18 PM4/17/20
to TiddlyWiki
Is it possible to configure the "Title of new tiddler" setting to generate titles in the following format: YYMMDD-x (where x increases by 1 for every subsequent note on the same day)?

Apologies if this is a basic question, as I don't have any experience with programming.  Cheers.

TonyM

unread,
Apr 18, 2020, 12:40:55 AM4/18/20
to TiddlyWiki
Seano,

Short answer yes, I will see if I can make a simple modification to the New Journal button. 
There is another method though, 
  • the new Journal button can be customised to create tiddlers titles see Control Panel > Info eg YY0MM0DD
    perhaps you already use this?
  • This will always open todays tiddler if it exists, this is actually a nice feature.
  • So rather than create more tiddlers with the title, why not open the days journal tiddler and use new here, this will tag any tiddler you create with the title (date) of the Journal Tiddler.
  • Or play with the new Journal Here button.
Some research notes;

This is the tiddler for the New Journal Button (appears in sidebar)
is $:/core/ui/Buttons/new-journal, This triggers actions in $:/core/ui/Actions/new-journal
Changing the `<$action-sendmessage $message="tm-new-tiddler"` to use the ActionCreateTiddlerWidget
Would allow you to automatically increment the tiddler name 

See also $:/core/ui/Buttons/new-journal-here

I can go forward and look at doing what you request, by modifying the Journal tiddlers, but let me know if you want that, if my above method works for you. Its always better to avoid core button changes, perhaps creating a new one, so that tiddlywiki updates are applied.

Personally I modified $:/core/ui/Actions/new-journal to use the following modified action;
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<journalTags>> text=<<journalText>> journal-date=<<now "YYYY0MM0DD0hh0mm0ss000">>/>
so What ever I name a journal it has a time date stamp for searching and ordering.

In your use case this would help, because you do need to interrogate the title to find all with that same date.

Regards
Tony

Seano

unread,
Apr 18, 2020, 9:40:22 PM4/18/20
to TiddlyWiki
Thanks for the detailed response Tony, I think the "new here" functionality might just work for me

Cheers
Reply all
Reply to author
Forward
0 new messages