Question: Retain History of Changes with Explanations

For documentation in engineering (or other fields) I have seen a revision table like this

Date           | By     | Remarks
Feb 12th, 2016 | Jeremy | The SI units were used 
Jun 19th, 1998 | Xavier | The initial draft

How can I have this with our tiddlers?

See also this example: Open Library Covers API | Open Library

1 Like

See TiddlyTools/SaveChanges and TiddlyTools/SaveChanges/Info:

https://tiddlytools.com/#TiddlyTools%2FSaveChanges
https://tiddlytools.com/#TiddlyTools%2FSaveChanges%2FInfo

Summary:

  • Substitute for standard “Save As” button in sidebar
  • When clicked, opens a modal dialog for entering optional “ChangeLog” text
  • Use the [+] button (lower right corner) to automatically get a list of changed tiddlers (excluding system tiddlers)
  • Text is stored in $:/state/ChangeLog with datetime stamps using YY.MM.DD.hhmmss format
  • ChangeLog can be viewed/searched directly from modal SaveAs dialog
  • CTRL-click on SaveAs button to bypass modal dialog and perform standard TWCore save action

Also, if you define a global macro named <<reset_config>> (in a tiddler tagged with $:/tags/Macro), it is invoked just prior to saving the file (unless CTRL-click is used). This lets you automatically restore any changed settings you want, so those default “startup” settings will be saved in the file. See https://tiddlytools.com/#TiddlyTools%2FReset and https://tiddlytools.com/#TiddlyTools%2FPanels%2FReset for examples.

enjoy,
-e

3 Likes

Wonderful as always!
Thank you, Eric!

You’re welcome! I’ve been using TiddlyTools/SaveChanges for quite a while, and I find it invaluable for tracking changes and remembering what I’ve done… especially if a bug is found (!), and I need to backtrack through previous revisions to figure out when the bug was introduced.

Also, on https://TiddlyTools.com, in the “Welcome > Summary” tab, if you click on the “TiddlyTools was updated on …” text, it will display a popup view of the $:/state/ChangeLog, including controls to search, copy, or edit the change log contents.

3 Likes

Thank you! I tried it, and it is quite useful.
It is a must have tool! I started using it to my own wikis :wink:

1 Like

Hi @EricShulman, I’m presuming this works with node.js installations as well?

TiddlyTools/SaveChanges uses the tm-save-wiki message to perform the Saver action.

I haven’t tested it with a node.js installation since I always use TiddlyWiki with the single-file “standalone” configuration. However, it’s my understanding that node.js installations use a different method of saving, so I wouldn’t expect tm-save-wiki to work there. Even so, all of the “change log” handling (i.e., getting log input and updating the $:/state/ChangeLog tiddler) should still work, since it occurs prior to sending the tm-save-wiki message.

The only way to know how it works with a node.js installation would be to try it and see what happens.

Let me know how it goes…

-e

2 Likes