--- a/documents/disclogsList.php
+++ b/documents/disclogsList.php
@@ -8,6 +8,11 @@
Agency Name | Disclosure Log URL recorded? | Do we monitor this URL? |
";
$agenciesdb = $server->get_db('disclosr-agencies');
$docsdb = $server->get_db('disclosr-documents');
+$agencies = 0;
+$disclogs = 0;
+$red = 0;
+$green = 0;
+$orange = 0;
try {
$rows = $agenciesdb->get_view("app", "byCanonicalName", null, true)->rows;
@@ -19,10 +24,11 @@
if ($ENV == "DEV")
echo "
(" . $row->id . ")";
echo "\n";
-
+$agencies++;
echo "";
if (isset($row->value->FOIDocumentsURL)) {
+ $disclogs++;
echo ''
. $row->value->FOIDocumentsURL . '';
if ($ENV == "DEV")
@@ -35,10 +41,13 @@
if (isset($row->value->FOIDocumentsURL)) {
if (file_exists("./scrapers/" . $row->id . '.py')) {
echo "✔";
+ $green++;
} else if (file_exists("./scrapers/" . $row->id . '.txt')) {
echo "▬";
+ $orange++;
} else {
echo "✘";
+ $red++;
}
}
echo " | \n";
@@ -48,6 +57,8 @@
setteErrorHandler($e);
}
echo "";
+echo $agencies." agencies ".(($disclogs/$agencies)*100)."% with disclosure logs, ".(($green/$disclogs)*100)."% with scrapers ".(($red/$disclogs)*100)."% without scrapers ".(($orange/$disclogs)*100)."% WIP scrapers ";
+
include_footer_documents();
?>