This will help motivate me to stick to doing some work every day.
The current calendar only displays the last modification time of each tiddler, with each tiddler occupying only one cell. I want each modification of a tiddler to occupy one cell.
This will help motivate me to stick to doing some work every day.
The current calendar only displays the last modification time of each tiddler, with each tiddler occupying only one cell. I want each modification of a tiddler to occupy one cell.
If you use TiddlyTools Calendar along with TiddlyTools SaveChanges then each time you save your TiddlyWiki, you can enter “change log” text (stored in $:/ChangeLog). This text works like locally-stored “commit” messages.
Then, in the TiddlyTools Calendar settings (the “gear” icon above the calendar), you can enable the “[x] Logs” checkbox and the calendar will show a color marker for each date that has at least one $:/ChangeLog entry.
While this is not the same “heat map” style as a GitHub contribution calendar, it does give you a visual timeline overview of your change log entries.
In addition, clicking on a date shows a calendar date popup with a “show change log” item. Clicking that item opens a modal dialog that lists all the change log entries for that date.
Of course, I use this process myself to log changes to TiddlyTools.com. You can see this in action by visiting my site and clicking on dates in the Sidebar Calendar.
enjoy,
-e
Thank you very much. A perfect ready-made solution.
It would be better if pop-ups could be disabled.
Please explain how disabling the date popup makes it “better”?
It’s the savechanges macro. Not the calendar.
When the save button is clicked, it saves directly without popping up a window.
If you use the CTRL-S keyboard shortcut or hold CTRL when you click on the save changes button it will bypass the log entry window and immediately perform a TWCore standard “save changes” action.
Of course, without the log entry window to add notes to the $:/ChangeLog, the Calendar won’t show that any changes occurred on that date.
-e
I want it to avoid pop-ups while still allowing writing to $:/Changlogs.
This way, it can display in the calendar while eliminating an extra step.
When saving, if there is no modal displayed to enter text to be added to the $:/ChangeLog, what would be written to the $:/ChangeLog, and where would that text come from?
-e
Simply add a timestamp line to $:/Changlog to display changlog in the calendar.
Currently, I’m adding the line “* 25.10.31.101323 1” to $:/Changlog.
This approach is suitable for situations where you do not intend to input text.
This practice does not align with Git conventions, much like committing without a message. However, it follows TiddlyWiki’s approach, where the Recent list is automatically generated.
OK… how about this:
TiddlyTools/SaveChanges could detect a custom “auto_log” macro definition that produces whatever log output you want. If this macro is present, TiddlyTools/SaveChanges bypasses the modal input and just writes the macro’s output to the $:/ChangeLog (with added timestamps for each line of output).
That way, if the <<auto_log>> macro exists, but doesn’t produce any output, it would just record a timestamp with no additional information.
Alternatively, the custom <<auto_log>> macro could output the list of modified tiddlers (one per line) so that when you subsequently use the “show change log” item in the Calendar date popup, it would still be able to tell you how many changes occurred and which tiddlers were changed on that date.
Note that this is different from the Calendar’s “show modified tiddlers” option, which only reflects the LAST date on which each tiddler was modified.
-e
This method of editing files meets my needs. We can consider switching to a user interface for configuration once more users express this requirement.
Listing files modified that day is indeed a feature I envisioned.
I have updated TiddlyTools/SaveChanges. It now support use of an optional <<auto_log>> macro (defined separately in a tiddler tagged with $:/tags/Global).
If <<auto_log>> is defined, TiddlyTools/SaveChanges will bypass the modal “change log entry” dialog, and use the output of the macro to automatically generate entries for the $:/ChangeLog. It will then immediately trigger the TWCore “save changes” action to save your TiddlyWiki.
The minimal definition of the <<auto_log>> macro is:
\define auto_log()
which will result in a single $:/ChangeLog entry with no notes (i.e., just the datetime stamp)
You could also define the <<auto_log>> macro like this:
\define auto_log()
<$list filter="[haschanged[]!sort[modified]!prefix[$:/]]">
<<currentTiddler>></$list>
\end
which will result a $:/ChangeLog entry for each tiddler that was modified during the current session.
Note that the filter excludes tiddlers that start with $:/ (i.e., “system tiddlers”). This is because there are usually numerous system tiddlers (such as $:/StoryList, $:/HistoryList, and various $:/state tiddlers) that are “touched” during a typical TiddlyWiki session and you generally don’t want to record those changes in your $:/ChangeLog
Let me know how it goes…
enjoy,
-e