Created
February 22, 2012 18:39
-
-
Save samdark/1886570 to your computer and use it in GitHub Desktop.
Assembla multi-project time summary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// first you need to export all your time you want to sum up and copy to this script dir | |
$sum = 0; | |
$f = fopen('export_tasks.csv', 'r'); | |
if($f) | |
{ | |
while (($data = fgetcsv($f, 1000, ",")) !== FALSE) { | |
if(!isset($data[4])) | |
continue; | |
$sum += $data[4]; | |
} | |
fclose($f); | |
} | |
else { | |
echo "Failed to open file.\n"; | |
} | |
echo "Total is $sum hr.\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment