User:Youremyjuliet/Code

Automation!
In Spring 2007 Dana wrote this short program that spits out the hours worked. (Note: this is most likely out of date.)


 * 1) !/usr/bin/perl -wl
 * 2) takes wiki table code and does stuff


 * 1) Dana Merrick
 * 2) 3/22/07


 * 1) use strict;

$file=shift;
 * 1) file now, STDIN later

open TABLE,$file or die "Can't open $file: $!\n"; $/="|-\n"; while ($row =  )
 * Handle whole table (headers, beginning and ending stuff, etc).
 * Handle multiple tables (one for each week, adding total for period).
 * Get/post data automagically (this could be a cron job!).
 * Scary hour stuff (leaving before noon, coming in after noon).
 * What if only Morgan works or something like that?
 * What does it do with %total?