diff --git a/browsing_analysis.php b/browsing_analysis.php
new file mode 100755
index 0000000..8fac28d
--- /dev/null
+++ b/browsing_analysis.php
@@ -0,0 +1,70 @@
+query($req_count_total) as $res)
+ { $total = $res['counted']; }
+
+ foreach ($dbh->query($req_count_entertainment) as $res)
+ { $entertainment = $res['counted']; }
+ foreach ($dbh->query($req_count_work) as $res)
+ { $work = $res['counted']; }
+ foreach ($dbh->query($req_count_social) as $res)
+ { $social = $res['counted']; }
+
+ $first_request = "[date unkown]";
+ # to define by getting the date of the first request
+ print "
Browsing since $first_request
\n";
+
+ $rest = $total - $entertainment + $social + $work;
+ print "
Distribution
$total = entertainment ($entertainment) + social ($social) + work ($work) + the rest.\n";
+ print "
";
+
+ if ( $rest > ($total / 4) )
+ print "Warning: more than a quarter of the total are not classified, patterns should be improved.
\n";
+
+ print "
Top 20 websites
\n";
+
+ print "\n";
+ print "Visits | Title (if missing, URL) | |
\n";
+ foreach ($dbh->query($top_request) as $row) {
+ if ($row['title']=="")
+ print "".$row['visit_count']." | ".$row['url']." | |
\n";
+ else
+ print "".$row['visit_count']." | ".$row['title']." | |
\n";
+ }
+ print "
\n";
+
+ /*** close the database connection ***/
+ $dbh = null;
+}
+catch(PDOException $e) {
+ echo $e->getMessage();
+}
+
+?>
diff --git a/live_wikifest_report.php b/live_wikifest_report.php
new file mode 100755
index 0000000..8999255
--- /dev/null
+++ b/live_wikifest_report.php
@@ -0,0 +1,87 @@
+ ('.$last_conf_start_timestamp.')';
+# for each specific talk : conf_start_timestamp_talk%
+# handle the stop timestamp too
+
+$req_total = $getvisited;
+$req_entertainment = $getvisited.$filterentertainment;
+$req_work = $getvisited.$filterwork;
+$req_social = $getvisited.$filtersocial;
+
+$req_count_total = $countedvisited;
+$req_count_entertainment = $countedvisited.$filterentertainment;
+$req_count_work = $countedvisited.$filterwork;
+$req_count_social = $countedvisited.$filtersocial;
+
+try {
+ /*** connect to SQLite database ***/
+ $dbh = new PDO("sqlite:".$sqlitedb);
+ foreach ($dbh->query($last_conf_start_timestamp) as $res)
+ { $startedconf = $res['visit_date']; }
+
+/*
+ foreach ($dbh->query($req_count_entertainment) as $res)
+ { $entertainment = $res['counted']; }
+ foreach ($dbh->query($req_count_work) as $res)
+ { $work = $res['counted']; }
+ foreach ($dbh->query($req_count_social) as $res)
+ { $social = $res['counted']; }
+ */
+
+ print "Browsing during the last (tagged) conference
\n";
+
+ print "
Last websites since $startedconf
\n";
+
+ $pmwiki_formated_result = "\n";
+ print "\n";
+ foreach ($dbh->query($visit_conf_start_timestamp) as $row)
+ {
+ print "".$row['moment']." | ".$row['title']." | |
\n";
+ # to do
+ ## improved filtering
+ ## track last_conf_start_timestamp last_conf_start_timestamp% last_conf_end_timestamp
+ ## SELECT replace(url,"http://fabien.benetou.fr/Events/PleniereCommunauteIngenierieConnaissances?action=conf_","") as triggering_event,visit_date,time(visit_date/1000000, "unixepoch","localtime") as moment FROM moz_historyvisits, moz_places WHERE moz_historyvisits.place_id = moz_places.id AND url like "%Events/%?action=conf_%_timestamp%" ORDER BY visit_date
+ $pmwiki_formated_result .= "** ".$row['moment']."[[".$row['url']."|".$row['title']."]]\n";
+ # consider putting a link to put this output in import\ so that PmWiki can directly get it
+ }
+ print "
\n";
+
+ print "
" . $pmwiki_formated_result;
+ # output to PmWiki format
+
+ /*** close the database connection ***/
+ $dbh = null;
+ }
+catch(PDOException $e)
+ {
+ echo $e->getMessage();
+ }
+
+?>