Clean unimplemented files
Clean unimplemented files


Former-commit-id: a22e9f755ca7a5948d41e17941d609b336a2adc7

--- a/admin/importGov2RegisterRSSFacebookTwitter.php
+++ b/admin/importGov2RegisterRSSFacebookTwitter.php
@@ -1,7 +1,7 @@
 <?php
 
 require_once '../include/common.inc.php';
-require($basePath . 'lib/phpquery/phpQuery/phpQuery.php');
+require($basePath.'lib/phpquery/phpQuery/phpQuery.php');
 
 $db = $server->get_db('disclosr-agencies');
 $rows = $db->get_view("app", "byName")->rows;
@@ -10,40 +10,41 @@
 foreach ($rows as $row) {
     $nametoid[trim($row->key)] = $row->value;
 }
-
 function extractHTMLAccounts($url, $accountType) {
     global $accounts, $nametoid;
     $request = Requests::get($url);
     $doc = phpQuery::newDocumentHTML($request->body);
     phpQuery::selectDocument($doc);
     foreach (pq('tr')->elements as $tr) {
-        //echo $tr->nodeValue.PHP_EOL;
-        $agency = "";
-        $url = "";
-        foreach ($tr->childNodes as $td) {
-            $class = $td->getAttribute("class");
-            //echo "cccc $class ".$td->nodeValue.PHP_EOL;
-            if ($class == "s11" || $class == "s10" || $class == "s7") {
-                $agency = $td->nodeValue;
-            } else if ($class == "s6" || $class == "s9") {
-                $url = $td->nodeValue;
-                foreach ($td->childNodes as $a) {
-                    $href = $a->getAttribute("href");
-                    if ($href != "") {
-                        $url = $href;
+       //echo $tr->nodeValue.PHP_EOL;
+       $agency = "";
+       $url = "";
+       foreach ($tr->childNodes as $td) {
+           $class = $td->getAttribute("class");
+           //echo "cccc $class ".$td->nodeValue.PHP_EOL;
+           if ($class == "s11" || $class == "s10" || $class == "s7") {
+               $agency = $td->nodeValue;
+           } else if ($class == "s6" || $class == "s9"){
+               $url = $td->nodeValue;
+               foreach($td->childNodes as $a) {
+                   $href = $a->getAttribute("href");
+                   if ($href != "") {
+                       $url = $href;
+                   }
+               }
+           }
+       }
+       if ($agency != "" && $url != "") {
+           if (!in_array(trim($agency), array_keys($nametoid))) {
+                        echo trim($agency)." missing" . PHP_EOL;
+                    } else {
+                     //   echo $agency." = ".$url.PHP_EOL;
+                        $accounts[$nametoid[trim($agency)]][$accountType][] = $url;
                     }
-                }
-            }
-        }
-        if ($agency != "" && $url != "") {
-            if (!in_array(trim($agency), array_keys($nametoid))) {
-                echo trim($agency) . " missing" . PHP_EOL;
-            } else {
-                //   echo $agency." = ".$url.PHP_EOL;
-                $accounts[$nametoid[trim($agency)]][$accountType][] = $url;
-            }
-        }
+       
+       }
     }
+    
 }
 
 function extractCSVAccounts($url, $accountType, $nameField, $accountField, $filter) {
@@ -52,7 +53,7 @@
     $Data = str_getcsv($request->body, "\n"); //parse the rows 
     $headers = Array();
     foreach ($Data as $num => $line) {
-        $Row = str_getcsv($line, ",", '"');
+        $Row = str_getcsv($line, ",",'"');
         if ($num == 0) {
             
         } else if ($num == 1) {
@@ -63,7 +64,7 @@
                 $agencyName = $Row[array_search($nameField, $headers)];
                 if (!$filter || $Row[array_search("State", $headers)] == "NAT") {
                     if (!in_array(trim($agencyName), array_keys($nametoid))) {
-                        echo trim($agencyName) . " missing" . PHP_EOL;
+                        echo trim($agencyName)." missing" . PHP_EOL;
                     } else {
                         // echo $Row[array_search($nameField, $headers)] . PHP_EOL;
                         $accounts[$nametoid[trim($agencyName)]][$accountType][] = $Row[array_search($accountField, $headers)];
@@ -83,18 +84,6 @@
 extractHTMLAccounts("https://docs.google.com/spreadsheet/pub?hl=en_GB&hl=en_GB&key=0Ah41IAK0HzSTdGJxandJREhLSGlWWUZfZ2xKOTNHZ0E&output=html", "RSS");
 // facebook 
 extractHTMLAccounts("https://docs.google.com/spreadsheet/pub?hl=en_GB&hl=en_GB&key=0Ah41IAK0HzSTdGtjcW9vOXdyZ3pOV21vQU51VmhzQnc&single=true&gid=0&output=html", "Facebook");
-foreach ($accounts as $id => $accountTypes) {
-    echo $id . "<br>" . PHP_EOL;
-    $doc = object_to_array($db->get($id));
-    // print_r($doc);
 
-    foreach ($accountTypes as $accountType => $accounts) {
-        if (!isset($doc["has" . $accountType]) || !is_array($doc["has" . $accountType])) {
-            $doc["has" . $accountType] = Array();
-        }
-        $doc["has" . $accountType] = array_unique(array_merge($doc["has" . $accountType], $accounts));
-    }
-    $db->save($doc);
-}
 ?>
 

file:a/admin/validation.py (deleted)
--- a/admin/validation.py
+++ /dev/null
@@ -1,30 +1,1 @@
-#http://packages.python.org/CouchDB/client.html
-import couchdb
-import json
-import pprint
-import re
-from tidylib import tidy_document
 
-couch = couchdb.Server('http://127.0.0.1:5984/')
-
-# select database
-docsdb = couch['disclosr-documents']
-
-def f(x):
-	invalid = re.compile(r"ensure|testing|flicker|updating|longdesc|Accessibility Checks|not recognized")
-	valid = re.compile(r"line")
-	return (not invalid.search(x)) and valid.search(x) and x != ''
-
-for row in docsdb.view('app/getValidationRequired'): 
-    print row.id
-    html = docsdb.get_attachment(row.id,row.value.iterkeys().next()).read()
-    #print html
-    document, errors = tidy_document(html,options={'accessibility-check':1,'show-warnings':0,'markup':0},keep_doc=True)
-    #http://www.aprompt.ca/Tidy/accessibilitychecks.html
-    #print document
-    errors = '\n'.join(filter(f,errors.split('\n')))
-    #print errors
-    doc = docsdb.get(row.id)
-    doc['validation'] = errors
-    docsdb.save(doc)
-

directory:a/couchdb/settee -> directory:b/couchdb/settee
--- a/couchdb/settee
+++ b/couchdb/settee

file:a/graph.php -> file:b/graph.php
--- a/graph.php
+++ b/graph.php
@@ -113,12 +113,12 @@
  sigInst.bind('downnodes',function(event){
     var nodes = event.content;
  });
-  // Draw the graph :
-  sigInst.draw();
   // Start the ForceAtlas2 algorithm
   // (requires "sigma.forceatlas2.js" to be included)
   sigInst.startForceAtlas2();
   
+  // Draw the graph :
+  sigInst.draw();
 }
 
 if (document.addEventListener) {

--- a/include/couchdb.inc.php
+++ b/include/couchdb.inc.php
@@ -22,10 +22,7 @@
        },
        "byWebServer": {
            "map": "function(doc) {\n  emit(doc.web_server, doc);\n}"
-       },
-  "getValidationRequired": {
-       "map": "function(doc) {\nif (doc.mime_type == \"text/html\" \n&& typeof(doc.validation) == \"undefined\") {\n  emit(doc._id, doc._attachments);\n}\n}"
-   }
+       }
    }*/
 }
 
@@ -170,4 +167,3 @@
 function setteErrorHandler($e) {
     echo $e->getMessage() . "<br>" . PHP_EOL;
 }
-

--- a/unimplemented/foundation.html
+++ /dev/null
@@ -1,137 +1,1 @@
-<!DOCTYPE html>
 
-<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
-<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
-<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
-<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
-<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
-<head>
-	<meta charset="utf-8" />
-
-	<!-- Set the viewport width to device width for mobile -->
-	<meta name="viewport" content="width=device-width" />
-
-	<title>Welcome to Foundation</title>
-  
-	<!-- Included CSS Files -->
-	<link rel="stylesheet" href="stylesheets/foundation.css">
-	<link rel="stylesheet" href="stylesheets/app.css">
-
-	<!--[if lt IE 9]>
-		<link rel="stylesheet" href="stylesheets/ie.css">
-	<![endif]-->
-
-
-	<!-- IE Fix for HTML5 Tags -->
-	<!--[if lt IE 9]>
-		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
-	<![endif]-->
-
-</head>
-<body>
-
-	<!-- container -->
-	<div class="container">
-
-		<div class="row">
-			<div class="twelve columns">
-				<h2>Welcome to Foundation</h2>
-				<p>This is version 2.1.4 released on December 19, 2011</p>
-				<hr />
-			</div>
-		</div>
-
-		<div class="row">
-			<div class="eight columns">
-				<h3>The Grid</h3>
-
-				<!-- Grid Example -->
-				<div class="row">
-					<div class="twelve columns">
-						<div class="panel">
-							<p>This is a twelve column section in a row. Each of these includes a div.panel element so you can see where the columns are - it's not required at all for the grid.</p>
-						</div>
-					</div>
-				</div>
-				<div class="row">
-					<div class="six columns">
-						<div class="panel">
-							<p>Six columns</p>
-						</div>
-					</div>
-					<div class="six columns">
-						<div class="panel">
-							<p>Six columns</p>
-						</div>
-					</div>
-				</div>
-				<div class="row">
-					<div class="four columns">
-						<div class="panel">
-							<p>Four columns</p>
-						</div>
-					</div>
-					<div class="four columns">
-						<div class="panel">
-							<p>Four columns</p>
-						</div>
-					</div>
-					<div class="four columns">
-						<div class="panel">
-							<p>Four columns</p>
-						</div>
-					</div>
-				</div>
-
-				<h3>Tabs</h3>
-				<dl class="tabs">
-					<dd><a href="#simple1" class="active">Simple Tab 1</a></dd>
-					<dd><a href="#simple2">Simple Tab 2</a></dd>
-					<dd><a href="#simple3">Simple Tab 3</a></dd>
-				</dl>
-
-				<ul class="tabs-content">
-					<li class="active" id="simple1Tab">This is simple tab 1's content. Pretty neat, huh?</li>
-					<li id="simple2Tab">This is simple tab 2's content. Now you see it!</li>
-					<li id="simple3Tab">This is simple tab 3's content. It's, you know...okay.</li>
-				</ul>
-
-				<h3>Buttons</h3>
-
-				<p><a href="#" class="small blue button">Small Blue Button</a></p>
-				<p><a href="#" class="blue button">Medium Blue Button</a></p>
-				<p><a href="#" class="large blue button">Large Blue Button</a></p>
-
-				<p><a href="#" class="nice radius small blue button">Nice Blue Button</a></p>
-				<p><a href="#" class="nice radius blue button">Nice Blue Button</a></p>
-				<p><a href="#" class="nice radius large blue button">Nice Blue Button</a></p>
-
-			</div>
-
-			<div class="four columns">			
-				<h4>Getting Started</h4>
-				<p>We're stoked you want to try Foundation! To get going, this file (index.html) includes some basic styles you can modify, play around with, or totally destroy to get going.</p>
-
-				<h4>Other Resources</h4>
-				<p>Once you've exhausted the fun in this document, you should check out:</p>
-				<ul class="disc">
-					<li><a href="http://foundation.zurb.com/docs">Foundation Documentation</a><br />Everything you need to know about using the framework.</li>
-					<li><a href="http://github.com/zurb/foundation">Foundation on Github</a><br />Latest code, issue reports, feature requests and more.</li>
-					<li><a href="http://twitter.com/foundationzurb">@foundationzurb</a><br />Ping us on Twitter if you have questions. If you build something with this we'd love to see it (and send you a totally boss sticker).</li>
-				</ul>
-			</div>
-		</div>
-
-	</div>
-	<!-- container -->
-
-
-
-
-	<!-- Included JS Files -->
-	<script src="javascripts/foundation.js"></script>
-	<script src="javascripts/app.js"></script>
-
-</body>
-</html>
-

--- a/unimplemented/humans.txt
+++ /dev/null
@@ -1,8 +1,1 @@
-/* Foundation was made by ZURB, an interaction design and design strategy firm in Campbell, CA */
-/* zurb.com */
-/* humanstxt.org */
 
-/* SITE */
-  Standards: HTML5, CSS3
-  Components: jQuery, Orbit, Reveal
-  Software: Coda, Textmate, Git

--- a/unimplemented/lastUpdated.php
+++ /dev/null
@@ -1,2 +1,1 @@
-for each agency, record when last changed (number of days too) and show a couple of URLs that were in that change
 

--- a/unimplemented/validation.php
+++ /dev/null

--- a/unimplemented/webservers.php
+++ /dev/null
@@ -1,1 +1,1 @@
-for each agency, find a scrapped document and read the webserver off it
+