--- a/documents/disclogsList.php
+++ b/documents/disclogsList.php
@@ -1,4 +1,5 @@
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;
@@ -14,24 +20,35 @@
if ($rows) {
foreach ($rows as $row) {
- echo "" . $row->value->name . " (".$row->id.") | \n";
-
- echo "";
- if (isset($row->value->FOIDocumentsURL)) {
- echo ''
- .$row->value->FOIDocumentsURL.'';
- } else {
+ echo " |
" . $row->value->name . "";
+ if ($ENV == "DEV")
+ echo " (" . $row->id . ")";
+ echo " | \n";
+$agencies++;
+
+ echo "";
+ if (isset($row->value->FOIDocumentsURL)) {
+ $disclogs++;
+ echo ''
+ . $row->value->FOIDocumentsURL . '';
+ if ($ENV == "DEV")
+ echo ' ('
+ . 'view local copy)';
+ } else {
echo "✘";
}
echo " | \n";
if (isset($row->value->FOIDocumentsURL)) {
- if (file_exists("./scrapers/".$row->id.'.py')) {
- echo "✔";
- } else if (file_exists("./scrapers/".$row->id.'.txt')){
- echo "▬";
- } else {
- echo "✘";
- }
+ if (file_exists("./scrapers/" . $row->id . '.py')) {
+ echo "✔";
+ $green++;
+ } else if (file_exists("./scrapers/" . $row->id . '.txt')) {
+ echo "▬";
+ $orange++;
+ } else {
+ echo "✘";
+ $red++;
+ }
}
echo " |
\n";
}
@@ -40,5 +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();
?>
+