Skip to content

Instantly share code, notes, and snippets.

@samdark
Created February 22, 2012 18:39
Show Gist options
  • Save samdark/1886570 to your computer and use it in GitHub Desktop.
Save samdark/1886570 to your computer and use it in GitHub Desktop.
Assembla multi-project time summary
<?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