I have created a plugin which changes the backup to use a cycle of
numbers:
file.1.html
file.2.html
.
.
file.x.html
Where x is a configrable item. you can get the plugin here.
Let me know if there are any isues with the way I hbave done this. As I
said it works well and can be configured.
Also is there a special us of the word systemTiddler, I have seen it
used but it is not referenced in the code anywhere.
Cheers
Jeremy.
--
Jeremy Ruston
mailto:jer...@osmosoft.com
http://www.tiddlywiki.com
Excellent idea!
I have just one observation:
When I repeatedly save my TiddlyWiki file, I get the following files:
file_1.html
file_2.html
file_3.html
file_4.html
file_5.html
So far so good. Next, I then save again, and it cycles back and
overwrites file_1.html. Again, this is expected. I then save again, and
it overwrites file_2.html. One more time, and it overwrites
file_3.html. Looking good!
OK, now, I exit my browser and restart it. I save the file and it
overwrites file_1.html, not file_4.html as I would expect. Is this
correct? It's really not a big deal as I DO have file dates to refer to
should I need them.
Otherwise, this is an EXCELLENT implementation!
-Jim Barr
http://TiddlyWikiTips.com
Im not sure if I have used the correct approach for this plugin but it
works :)
I have created a plugin which changes the backup to use a cycle of
numbers:
file.1.html
file.2.html
.
.
file.x.html
Where x is a configrable item. you can get the plugin here.
Anyway Ill add the cookie save to my plugin (Thats what haoppens when
you do rapid dev :) )
I liked the suggestion in the thread about the time based backups.
Maybey ill expand :)
Thanks.
I looked to see if there was a plugin that did this and could not find
one!
Anyway Ill add the cookie save to my plugin (Thats what haoppens when
you do rapid dev :) )
For a idea is there the chance a systemOption tag be used to tag
tiddler that have options in them and they get added to the Advanced
Options tiddler on the fly.
That way any plugin can have its own options tiddler and it will be
added to the system for configuration.
I looked at adding it to Advanced Options but for a cut and paste
Senario it may overwrite someone elses changes. I created a seperate
tiddler for the options.
For a idea is there the chance a systemOption tag be used to tag
tiddler that have options in them and they get added to the Advanced
Options tiddler on the fly.
That way any plugin can have its own options tiddler and it will be
added to the system for configuration.
On 6/1/06, sytone < jbu...@gmail.com> wrote:
I looked at adding it to Advanced Options but for a cut and paste
Senario it may overwrite someone elses changes. I created a seperate
tiddler for the options.
config.shadowTiddlers.AdvancedOptions += "\n<<option chkBackupCountEnabled>> Enable the Cycle Function.\n
<<option txtBackupCount>> Set the number of files to save for backups.\n Current Save ID: <<BackupCycle>>";
Something like that will add the options to the AdvancedOptions shadow tiddler, and will not overwrite any user changes. The only issue with this is that if someone has modified the AdvancedOptions tiddler prior to installing your plugin, the options wont be added.
Still, it seems worth doing as there is nothing to loose.
if (store.getTiddler("AdvancedOptions")) {
var optionTiddler = store.getTiddler("AdvancedOptions");
if (optionTiddler.text.indexOf("txtMaxBackups")==-1)
optionTiddler.set(null,optionTiddler.text+"\n MaxBackups:
<<option
txtMaxBackups>>");
} else {
config.shadowTiddlers.AdvancedOptions += "\n MaxBackups: <<option
txtMaxBackups>>";
}
Saves a unessary addition to AdvancedOptions