Based on a idea from a Kos tweet, I thought it would be a nice to have in the toolkit. This little app is browser based and uses local storage to track changes in files by MD5 the contents ( read from the local file as a binary string). It creates a JSON for local storage that is persisted across sessions.
The Key to the storage object is the file's name, the object that is stored looks like:
{fileName:"somefile",history:[{time:"",hash:"",data:""},...]}.
Time is defined as:
Math.round(new Date().getTime() / 1000).
If the file's hash is different, then a new history item is pushed onto the history array.
To clear out the local storage, just hit the "Clear Storage" button.
To download a copy of what is being stored, click the "Show Me the Goods" button.
http://pajhome.org.uk/crypt/md5/ - For the MD5 stuff http://www.html5rocks.com/en/tutorials/file/dndfiles/ - DnD and FileReader stuff http://dean.edwards.name/weblog/2006/06/again/ - Bad Ass JS dudes - Dean Edwards/Matthias Miller/John Resig