Non-plugin alternatives include git and sqlite 
<https://github.com/andjar/TW-sqlite3>; both will keep the wiki size low, 
but neither will have the history directly available in the wiki. Git isn't 
able to take care of title changes, whereas the SQLite-history follows the 
toddler (but it needs a server and is still under development)

Best,
Anders

mandag 10. mai 2021 kl. 14:33:39 UTC+2 skrev si:

> Thanks Mario for the comprehensive reply.
>
> I have decided to create my own history-saving macro, which I will use 
> only in specific instances, rather than across my whole wiki. For now I'm 
> just saving data, I will worry about other features in the future.
>
> This is what I have at the moment:
>
> \define save-history()
>     <$vars timestamp=<<now "[UTC]YYYY0MM0DD0hh0mm0ssXXX">> >
>     <$vars history-tiddler-title={{{ 
> [<currentTiddler>addsuffix[/history/]addsuffix<timestamp>] }}} >
>         <$list filter="[<currentTiddler>fields[]]" variable=field-name>
>             <$action-setfield $tiddler=<<history-tiddler-title>> 
> $field={{{ [<field-name>addsuffix[-history]] }}} $value={{{ 
> [<currentTiddler>get<field-name>] }}}/>
>         </$list>
>     </$vars>
>     </$vars>
> \end
>
> So every time I activate this macro I should get a new "history-tiddler" 
> named <currentTiddler>/history/<timestamp>. Relink titles 
> <https://flibbles.github.io/tw5-relink/#%24%3A%2Fplugins%2Fflibbles%2Frelink-titles>
>  
> will make sure that this data remains associated with the correct tiddler.
>
> I am wondering if it would make more sense to use a JSON tiddler to store 
> history? I would do essentially the same thing, but all history for a 
> particular tiddler would be stored in a single tiddler called 
> <currentTiddler>/history as JSON entries (using JsonMangler 
> <https://chronicles.wiki/TW5-JsonMangler/>). Would this be better in 
> terms of performance when I end up with a large number of history-tiddlers, 
> or do you think it makes more sense to stick with what I have done?
> On Sunday, 9 May 2021 at 18:12:35 UTC+1 PMario wrote:
>
>> On Sunday, May 9, 2021 at 6:40:48 PM UTC+2 si wrote:
>>
>>> I've become kind of interested in keeping a full revision history of my 
>>> wiki - i.e. be able to see every single change I've made to every tiddler. 
>>>
>> I know about http://j.d.revisions.tiddlyspot.com/, which I like a lot, 
>>> but it has a couple of disadvantages for my use case:
>>>
>>
>> As far as I know, that's the only plugin which create revisions. And 
>> there is the "trashbin plugin" [1]
>>  
>>
>>>
>>>    1. Revisions are only created when you click the save button from 
>>>    the edit toolbar. Most of the time I save tiddlers with Ctrl+Enter. 
>>>
>>> IMO this can be solved. .. but you'll need to mess with the core 
>> EditTemplate ... \define save-tiddler-actions() 
>>
>>>
>>>    1. I also use Streams a lot, where again changes made to tiddlers 
>>>    won't be recorded by the plugin. 
>>>
>>> I think, Streams is designed, to be modified a lot and it uses 
>> dynamically created tiddler titles. .. So you will probably create a lot of 
>> "strange looking titles". So without some heavy support for a "recovery UI" 
>> you will get problems there. 
>>
>>>
>>>    1. I use a single html wiki for all my stuff. Presumably having a 
>>>    new tiddler created for every change I make will soon start to inflate 
>>> and 
>>>    slow down my wiki? Or maybe I am wrong about this?
>>>
>>> IMO it will make the whole thing a lot more complex. 
>>  
>>
>>> So I guess I'm interested in whether it is even practical to keep such 
>>> an extensive history of my wiki use, and if so what options are available?
>>>
>>
>> I did think about a possibility (just in my mind), that it should 
>> possible to store the "diffs only". ... So similar to, what can be seen in 
>> the TW import mechanism. Where you can see "the diff" the difference 
>> between the newly imported tiddler and an existing one. ... 
>>
>> A similar mechanism would allow us to create something that is called a 
>> "patch". ... So it contains the commands, that need to be applied to the 
>> existing tiddler, to get the OLD tiddler back. ... 
>>
>> The problem with a mechanism like this, would be, that you'll need to 
>> apply the patches in order. .. If 1 patch gets lost, there will be a 
>> problem. ... 
>>
>> So the whole handling thing will be complex. .. I didn't think about it 
>> in detail. 
>>
>> -mario
>>
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/76e7138c-506a-41df-823c-8196526151dfn%40googlegroups.com.

Reply via email to