move towards trunklog/categories
[scannr.git] / generateHourlys.php
blob:a/generateHourlys.php -> blob:b/generateHourlys.php
--- a/generateHourlys.php
+++ b/generateHourlys.php
@@ -13,11 +13,19 @@
         if ($returncode != 10) {
             //print_r($output);
             //die();
+        } else {
+        /*  insert
+          "filename" text NOT NULL,
+          "files" text ARRAY NOT NULL,
+          "datetime" timestamp NOT NULL
+          */
+          // delete wav files? can we link to times in a compilation?
         }
+
     }
 }
 $sth = $conn->prepare("select tgid, extract(hour from call_timestamp) ahour, date_trunc('day', call_timestamp) aday, count(filename), array_to_string(array_agg(filename order by call_timestamp), ',') filenames from recordings group by tgid, ahour, aday order by  aday DESC, ahour, tgid;");
-
+// TODO use tgid categories instead, tgid too specific
 $sth->execute();
 $hourlies = $sth->fetchAll(PDO::FETCH_ASSOC);
 foreach($hourlies as $hourly) {
@@ -31,3 +39,5 @@
     processHourly($hourly);
 }
 
+
+// delete uninteresting compilations