By default, when the end of a macro definition is reached, any unmatched widgets, divs, etc. are automatically “closed” by the TWCore parser. Thus, it is not necessary to have lots of matching </$set>, </$vars>, etc., as long as the unmatched widgets are NOT enclosed inside another widget that DOES have a matching </$...>. This is not a problem and has been done deliberately in order to improve readability, reduce the size of the Calendar code, and make it easier to write macros that start with lots of <$set> and <$vars> widgets without worrying about having the correct number of matching close widgets.
This is a bit tricky…
The journal title format is configurable in the $:/ControlPanel. While this setting typically consists of a date format such as “YYYY 0MM 0DD”, it is not a hard-and-fast requirement.
For example, I can set the journal title format to “MMM YYYY” so that all journal entries for the same month and year will be added to the same tiddler, without any date information except for the tiddler’s “created” and “modified” fields.
As an even more extreme example, the journal title format could be something that doesn’t have ANY date formatting codes, such as “My Journal”, so that EVERY journal entry, regardless of the date, is added to a single tiddler.
It should be possible to extend the TiddlyTools Calendar’s journal creation button to add an extra “journaldate” timestamp field using the standard 17-digit zero-padded “system datetime” format – i.e., YYYYMMDD000000000 when creating a new journal, and then use this field value to enable the Calendar to show the journal entry and indicator on the specified “journaldate” instead of the “created” and “modified” dates.
Of course, the journal tiddler would still be listed as a regular “created” or “modified” tiddler using the date(s) specified by the actual created and modified fields of the tiddler. In addition, any journal tiddlers created outside of the Calendar code (e.g., by using the sidebar “new journal” or tiddler “new journal here” buttons, or possibly imported from another document) wouldn’t have the extra “journaldate” field, and thus would still be listed as a journal using the created or modified field values.
I’ll work on this and let you know when I have something for you to try.
It should be possible to add checkboxes under “ show tiddler changes” and “ show system changes” to separately choose “ created” and/or “ modified”, with the default being to show both. I suppose it would also be nice to support optional color choices to differentiate them visually in the “color bar”, with the default being to use the same color (i.e., as they currently appear).
Again, this will take some work to accomplish, and I’ll let you know when I have something for you to try.
I am not currently packaging these tools as a plugin, but it is possible to do so. You can even do this yourself with just a few steps! Here’s how:
- Begin by dragging the desired TiddlyTools/Time/* tiddlers into your document.
- When the $:/Import tiddler is displayed, instead of pressing the “import” button, EDIT THE $:/Import TIDDLER.
- You will see a big block of JSON that contains the tiddler definitions.
- Change the tiddler title from “$:/Import” to “$:/plugins/TiddlyTools/Time”
- Scroll all the way to the bottom of the tiddler editor, and change the value of the
plugin-typefield from “import” to “plugin”. You can also delete thestatusfield (which has a value of “pending”) - Press “done” (checkmark button) to finish editing.
That’s it. You now have installed shadow tiddler versions of “TiddlyTools/Time/Calendar”, etc. Note that, if you’ve installed anything that uses TiddlyTools/Time/action-timeout.js or TiddlyTools/Time/Ticker (a startup tiddler), you will need to save-and-reload your document for the new shadows to start working.
enjoy,
-e