| xawk.com - technical wisdom served up in little slices | xawk.com -- Tags -- Ruby |
| ||||||||
xawk.com -- Tags -- Ruby -- Create Checkpoints using Ruby and MD5
Create Checkpoints using Ruby and MD5 By Brad Trupp (c) 2008 One of the things I use Ruby for is my "home-grown" CMS or content management system. To make things easy, I use a hash file of md5 checksums to be able to tell what files have changed in my output directory so I can tell what to upload and what to delete off the web server. Here is a simple Ruby script to create an initial checksum hash file. This particular example shows the basics of processing all the files in a directory and all the subdirectories underneath. In this case, my subdirectory is "out" and I am only processing files with a ".html" extension. checkpoint_create.rb
The script to identify differences will be found in a later article. Tags: Ruby Share: Del.icio.us | Digg | Facebook | Google Bookmarks | Reddit | Technorati | Windows Live | Yahoo! My Web
|
|