[tw5] Re: Options for keeping revision history?

2021-05-11 Thread si
Thank you Tones and Anders for your suggestions.

On Tuesday, 11 May 2021 at 01:01:52 UTC+1 TW Tones wrote:

> Si,
>
> Another approach or source on inspiration may be the core plugin *Save 
> Trail*: Automatically download modified tiddlers which says;
>
> *This plugin causes TiddlyWiki  to 
> continuously download (as a JSON file) the contents of any tiddler that is 
> manually changed by any of several means:*
>
>- *Confirming an edit*
>- *Deleting tiddlers*
>- *Imports*
>- *Renames/relinks*
>- *Optionally, typing in draft tiddlers can trigger a download*
>
> *Where appropriate, separate 'before' and 'after' files are downloaded. 
> Configured correctly, the browser will download the files silently in the 
> background, and they can be used as a backup in case of accidental data 
> loss.*
>
> *However read the warnings!*
>
>
> *Regards*
>
> *Tones*
> On Monday, 10 May 2021 at 02:40:48 UTC+10 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:
>>
>>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. I also 
>> use 
>>Streams a lot, where again changes made to tiddlers won't be recorded by 
>>the plugin. 
>>2. 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?
>>
>> 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?
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/115f03fd-f854-4787-8664-da85dd513069n%40googlegroups.com.


[tw5] Re: Options for keeping revision history?

2021-05-10 Thread TW Tones
Si,

Another approach or source on inspiration may be the core plugin *Save 
Trail*: Automatically download modified tiddlers which says;

*This plugin causes TiddlyWiki  to 
continuously download (as a JSON file) the contents of any tiddler that is 
manually changed by any of several means:*

   - *Confirming an edit*
   - *Deleting tiddlers*
   - *Imports*
   - *Renames/relinks*
   - *Optionally, typing in draft tiddlers can trigger a download*

*Where appropriate, separate 'before' and 'after' files are downloaded. 
Configured correctly, the browser will download the files silently in the 
background, and they can be used as a backup in case of accidental data 
loss.*

*However read the warnings!*


*Regards*

*Tones*
On Monday, 10 May 2021 at 02:40:48 UTC+10 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:
>
>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. I also use 
>Streams a lot, where again changes made to tiddlers won't be recorded by 
>the plugin. 
>2. 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?
>
> 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?
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/459750bb-dc1c-430b-af38-1df61de57ad1n%40googlegroups.com.


[tw5] Re: Options for keeping revision history?

2021-05-10 Thread Soren Bjornstad
Ah, fair enough.

On Monday, May 10, 2021 at 3:42:48 PM UTC-5 Anjar wrote:

> @Soren you're right, I was only thinking on the single file edition where 
> it would be difficult to follow a tiddler across time if the title is 
> changed
>
> mandag 10. mai 2021 kl. 21:07:19 UTC+2 skrev Soren Bjornstad:
>
>> On Monday, May 10, 2021 at 9:10:40 AM UTC-5 Anjar wrote:
>>
>>> Git isn't able to take care of title changes
>>
>>
>> Really? Git normally detects renames just fine unless you massively 
>> change the contents at the same time you change the filename. I found some 
>> examples in my own folder wiki controlled by Git too.
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/83e45ce6-f5f0-4c0a-9068-f8f425d0ef51n%40googlegroups.com.


[tw5] Re: Options for keeping revision history?

2021-05-10 Thread Anjar
@Soren you're right, I was only thinking on the single file edition where 
it would be difficult to follow a tiddler across time if the title is 
changed

mandag 10. mai 2021 kl. 21:07:19 UTC+2 skrev Soren Bjornstad:

> On Monday, May 10, 2021 at 9:10:40 AM UTC-5 Anjar wrote:
>
>> Git isn't able to take care of title changes
>
>
> Really? Git normally detects renames just fine unless you massively change 
> the contents at the same time you change the filename. I found some 
> examples in my own folder wiki controlled by Git too.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/910cc2a7-e242-4f7f-a6ec-f835ccf96a15n%40googlegroups.com.


[tw5] Re: Options for keeping revision history?

2021-05-10 Thread Soren Bjornstad
On Monday, May 10, 2021 at 9:10:40 AM UTC-5 Anjar wrote:

> Git isn't able to take care of title changes


Really? Git normally detects renames just fine unless you massively change 
the contents at the same time you change the filename. I found some 
examples in my own folder wiki controlled by Git too.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c9f70fe9-5bfc-48e5-936b-ec071d0f038an%40googlegroups.com.


[tw5] Re: Options for keeping revision history?

2021-05-10 Thread Anjar
Non-plugin alternatives include git and sqlite 
; 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=<> >
> <$vars history-tiddler-title={{{ 
> [addsuffix[/history/]addsuffix] }}} >
> <$list filter="[fields[]]" variable=field-name>
> <$action-setfield $tiddler=<> 
> $field={{{ [addsuffix[-history]] }}} $value={{{ 
> [get] }}}/>
> 
> 
> 
> \end
>
> So every time I activate this macro I should get a new "history-tiddler" 
> named /history/. Relink 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 
> /history as JSON entries (using 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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/76e7138c-506a-41df-823c-8196526151dfn%40googlegroups.com.


[tw5] Re: Options for keeping revision history?

2021-05-10 Thread 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=<> >
<$vars history-tiddler-title={{{ 
[addsuffix[/history/]addsuffix] }}} >
<$list filter="[fields[]]" variable=field-name>
<$action-setfield $tiddler=<> $field={{{ 
[addsuffix[-history]] }}} $value={{{ 
[get] }}}/>



\end

So every time I activate this macro I should get a new "history-tiddler" 
named /history/. Relink 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 
/history as JSON entries (using 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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a704506f-9370-4307-b110-b274653fc09fn%40googlegroups.com.


[tw5] Re: Options for keeping revision history?

2021-05-09 Thread PMario
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/464a658c-4e9d-40e1-9a89-6611a8c87a19n%40googlegroups.com.