clearing the "recent" history

2,785 views
Skip to first unread message

Terry Jones

unread,
May 29, 2014, 12:52:42 PM5/29/14
to tiddl...@googlegroups.com
rookie question here - is there any way to flush the history that's shown in the "recent" tab? i guess it's generated based on the modification data field for each tiddler, and i guess if i let the file sit for a while then the data would "age" off the generated list, but that seems kinda klunky. i'd like to be able to finish a series of updates to a wike, re-publish it, and the end user be able to use it immediately with the "recent" tab showing only his own actions. is there a button i've over looked?

-tjones

Stephan Hradek

unread,
May 29, 2014, 1:21:03 PM5/29/14
to tiddl...@googlegroups.com
You haven't overlooked anything. There is no such button.

What should work - but I haven't tested - is to modify the list filter of the recent tab to not show any tiddler modified before the date of a certain tiddler

So the idea would be to have a "Version history" tiddler.

Any time you publish something new you write your changes there, thus creating a new "modified" date. The recent tab should then ignore all tiddlers created on or before that time.

Alex V

unread,
May 29, 2014, 3:57:05 PM5/29/14
to tiddl...@googlegroups.com
Open the shadow tiddler $:/snippets/recentchanges and delete it's contents before publishing. That should do it.

Daniel Baird

unread,
May 29, 2014, 9:48:07 PM5/29/14
to tiddlywiki

Maybe edit the "last modified" dates on all your special tiddlers to be in the distant past.

From memory MS-DOS system files all had last modified times that matched the DOS version -- DOS 5 files all had 5:00am as the edited time.  You could do something fancy like that :)

;Daniel



--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Daniel Baird
objoke: I had a problem and decided to solve it with threading. Now, have problems. two I

Stephan Hradek

unread,
May 29, 2014, 10:08:23 PM5/29/14
to tiddl...@googlegroups.com


Am Donnerstag, 29. Mai 2014 21:57:05 UTC+2 schrieb Alex V:
Open the shadow tiddler $:/snippets/recentchanges and delete it's contents before publishing. That should do it.
That's a bad idea! The user won't see any recent changes at all!

Stephan Hradek

unread,
May 29, 2014, 10:44:11 PM5/29/14
to tiddl...@googlegroups.com
I just took a look at TW 5.0.12 and I think what you want isn't yet possible.

In order to be able to have that we would need a filter function, similar to "sameday" called (e.g.) "afterday".

I think then in "$:/snippets/recentchanges" we need to change:

<$list filter="[!is[system]has[modified]!sort[modified]limit[100]eachday[modified]]">

to

<$list filter="[!is[system]has[modified]afterday{Version History!!modified}!sort[modified]limit[100]eachday[modified]]">

This would be the "$:/core/modules/filters/afterday.js" filter required.

I just had a quick test and it seems to work.

/*\
title: $:/core/modules/filters/afterday.js
type: application/javascript
module-type: filteroperator

Filter operator that selects tiddlers with a modified date field on the same day as the provided value.

\*/

(function(){

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

/*
Export our filter function
*/

exports
.afterday = function(source,operator,options) {
       
var results = [],
                fieldName
= operator.suffix || "modified",
                targetDate
= (new Date($tw.utils.parseDate(operator.operand))).setHours(0,0,0,0);
       
// Function to convert a date/time to a date integer
       
var isAfterDay = function(dateField) {
                       
return (new Date(dateField)).setHours(0,0,0,0) > targetDate;
               
};
        source
(function(tiddler,title) {
               
if(tiddler && tiddler.fields[fieldName]) {
                       
if(isAfterDay(tiddler.fields[fieldName])) {
                                results
.push(title);
                       
}
               
}
       
});
       
return results;
};

})();



Jeremy Ruston

unread,
May 30, 2014, 4:04:30 AM5/30/14
to TiddlyWiki
Hi Skeeve

I think the idea of a cut-off point for the recent tab is a very good one. I'm not sure whether it's best for users to specify the date by nominating a tiddler or by directly specifying the cut-off date. I'll take the discussion about the new filters over to GitHub.

Many thanks,

Jeremy.





--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Stephan Hradek

unread,
May 30, 2014, 4:38:47 AM5/30/14
to tiddl...@googlegroups.com, jeremy...@gmail.com


Am Freitag, 30. Mai 2014 10:04:30 UTC+2 schrieb Jeremy Ruston:
I'll take the discussion about the new filters over to GitHub.

I just added a proposal for solving your question to the discussion: https://github.com/Jermolene/TiddlyWiki5/issues/624

Matabele

unread,
May 30, 2014, 7:04:14 AM5/30/14
to tiddl...@googlegroups.com, jeremy...@gmail.com
Hi

I think Skeeve's idea of a 'version history' tiddler makes sense -- the developer can then post any journal entries w.r.t. the wiki into the 'version history', and anything before this gets wiped off the 'Recent' tab by default. If the developer wishes any particular tiddler to show, then it is a simple matter to open the tiddler and re-save (or update the 'modified' field directly.)

All this requires from the user's point of view is an input box in the settings to specify the title of the tiddler to be used as 'version history'.

regards
Reply all
Reply to author
Forward
0 new messages