Showing posts with label TiddlyWiki. Show all posts
Showing posts with label TiddlyWiki. Show all posts

Friday, 10 August 2007

Create Mirror Copy of TiddlyWiki for Mobile Sync

In an attempt to resolve my synchronisation woes keeping a copy of my TiddlyWiki on my N95 I've added a new option to my TiddlyWiki file. This allows me to specify a path to create a mirror copy of the file. This points to my N95 synchonisation folder.

If I do work out how to enable editing on the phone I'll have to work out another approach but this does mean I can have a copy to read. Another benefit is that I can leave the backup copies accumulating in the folder or sub-folder and not have those copy across automatically as well.

I've created a new version of an empty TiddlyWiki and copied it to : ftp://ftp.esendex.com/adam/Tiddlywiki.AEB.v2.MirrorPath.html. The changes are summarised below.

Ln 571, added a new item to the config.options array:

txtMirrorPath: ""

Ln 791, added a new item to the config.optionsDesc array:

txtMirrorPath: "Path to mirror the file to"

Ln 831, added two new items to config.messages array:

mirrorSaved: "Mirror saved",
mirrorFailed: "Failed to save mirror file"

Ln 6152, added a new method saveMirror. Note this expects a complete path and not a relative folder as in the backup folder option.

function saveMirror(localPath,original)
{
 var mirrorPath = config.options.txtMirrorPath;
 var saveMirrorFile = mirrorPath != "";
 if (saveMirrorFile)
 {
 // add backslash if not present at end
     var backslashPos = mirrorPath.lastIndexOf("\\");
     var pathLastIndex = mirrorPath.length - 1;
     var backslashEnd = backslashPos == pathLastIndex;
     
     mirrorPath = mirrorPath + (backslashEnd ? "" : "\\");
     
 // copy to relevant locations
     var mirror = config.browser.isIE ? ieCopyFile(mirrorPath,localPath) : saveFile(mirrorPath,original);
     if(mirror)
      displayMessage(config.messages.mirrorSaved,"file://" + mirrorPath);
     else
      alert(config.messages.mirrorFailed);
 }
}

Ln 6133, added a call to the saveMirror method from the saveChanges method:

saveMirror(localPath,original);

Do let me know what you think.

Tuesday, 7 August 2007

TiddlyWiki - mobile synchronisation problems

Hmmmm seems that I'm having issues with the automatic synchronisation. Versions being overwritten, notes getting lost, etc.

Back to the drawing board

Friday, 3 August 2007

TiddlyWiki - browser shortcut

Created a bookmark in my phone browser to the file. It's save on my phone memory, waiting for a big Micro SD card (somehow sounds oxymoronic!) to come. The path I'm using is:

c:\data\briefcase\mytiddlywiki.htm

c: - for the phone and the rest is the path.

TiddlyWiki - backup

I'm having a few issues backing up my TiddlyWiki to a different location to the main file. The reason I want to do this is that every save results in a new complete copy of the file being created which is quickly filling up my phone.

In the interim I found this Alternate Backup Method which saves everything to one file.

TiddlyWiki goes mobile too

Jonathon at work found this little gem: TiddlyWiki.

It's a Wiki site encapsulated into one HTML file. You view and edit it like a Wiki but save it locally. It's your very own web notebook.

Here at Esendex, we're big fans of Wikis having an internal one which contains a wealth of knowledge on how our company operates. This includes, system documentation, sales and finance processes, system performance records and a whole host more.

What's really neat about Tiddlywiki for me is that I can push this HTML file to my Nokia N95 and it works a treat. I've got access to everything I want to make notes about, wherever I am. All I've done is saved the file to a synchronisation folder on my PC so it's always in sync.

The only thing I can't do currently is save changes made on the phone which I'll investigate further. In the meantime I'm definitely moving from a random collection of notes in Outlook to this far more useful contextual notebook.