From: Maxious Date: Sun, 23 Sep 2012 07:05:49 +0000 Subject: add prefix for positions X-Git-Url: https://maxious.lambdacomplex.org/git/?p=disclosr.git&a=commitdiff&h=9b494cfdc6446fe3b632bc59fb665c77d9a6dc45 --- add prefix for positions Former-commit-id: 2eb28a3a36f76484db67773b1c6df6f238257aad --- --- a/.gitmodules +++ b/.gitmodules @@ -10,16 +10,22 @@ [submodule "lib/Requests"] path = lib/Requests url = https://github.com/rmccue/Requests.git -[submodule "javascripts/flotr2"] - path = javascripts/flotr2 +[submodule "js/flotr2"] + path = js/flotr2 url = https://github.com/HumbleSoftware/Flotr2.git [submodule "lib/phpquery"] path = lib/phpquery url = https://github.com/TobiaszCudnik/phpquery.git -[submodule "javascripts/sigma"] - path = javascripts/sigma +[submodule "js/sigma"] + path = js/sigma url = https://github.com/jacomyal/sigma.js.git -[submodule "javascripts/bubbletree"] - path = javascripts/bubbletree +[submodule "js/bubbletree"] + path = js/bubbletree url = https://github.com/okfn/bubbletree.git +[submodule "lib/querypath"] + path = lib/querypath + url = https://github.com/technosophos/querypath.git +[submodule "lib/amon-php"] + path = lib/amon-php + url = https://github.com/martinrusev/amon-php.git --- a/about.php +++ b/about.php @@ -1,17 +1,19 @@

About/FAQ

Lorem ipsum.

What is this?

-Disclosr is a project to monitor Australian Federal Government agencies -compliance with their "proactive disclosure requirements". -OGRE (Open Government Realization Evaluation) is a ranking of compliance with these requirements. -Prometheus is the agent which polls agency websites to assess compliance. - +Disclo.gs is a project to monitor Australian Federal Government agencies +compliance with their "proactive disclosure requirements" to make a transparency league table as suggested by gov2 taskforce http://gov2.net.au/blog/2009/09/19/a-league-ladder-of-psi-openness/. +

Attributions

+National Archives of Australia, Australian Governments’ Interactive Functions Thesaurus, 2nd edition, September 2005, published at http://www.naa.gov.au/recordkeeping/thesaurus/index.htm
+data.gov.au http://data.gov.au/dataset/directory-gov-au-full-data-export/
+directory.gov.au
+australia.gov.au http://australia.gov.au/about/copyright

Open everything

All documents released CC-BY 3 AU Open source git @ --- /dev/null +++ b/admin/agls.php @@ -1,1 +1,35 @@ + + namefunction"; +$db = $server->get_db('disclosr-agencies'); +try { + $agencies = $db->get_view("app", "byCanonicalName", null, true)->rows; + + + if ($agencies) { + foreach ($agencies as $row) { + + echo "" . $row->value->name . ""; + if (isset($row->value->metaTags)) { + if (is_array($row->value->metaTags)) { + $tags =$row->value->metaTags; + } else { + $tags = object_to_array($row->value->metaTags); + } + if (isset($tags['AGLS.Function'])) { + echo "" . $tags['AGLS.Function'] . ""; + } + } + echo ""; + } + } +} catch (SetteeRestClientException $e) { + setteErrorHandler($e); +} +include_footer(); +?> + --- /dev/null +++ b/admin/conflicts.php @@ -1,1 +1,48 @@ +get_db('disclosr-agencies'); + +try { + $rows = $db->get_view("app", "getConflicts", null, true)->rows; + //print_r($rows); + foreach ($rows as $row) { +echo "

".$row->id."

"; +$request = Requests::get($serverAddr."disclosr-agencies/".$row->id); +$origSort = object_to_array(json_decode($request->body)); +ksort($origSort); + $origDoc = explode(",",json_encode($origSort)); + foreach($row->value as $conflictRev) { +$conflictURL = $serverAddr."disclosr-agencies/".$row->id."?rev=".$conflictRev; +$request = Requests::get($conflictURL); +$conflictSort = object_to_array(json_decode($request->body)); +ksort($conflictSort); + $conflictDoc = explode(",",json_encode($conflictSort)); +echo "curl -X DELETE ".$conflictURL."
".PHP_EOL; + // Options for generating the diff + $options = array( + //'ignoreWhitespace' => true, + //'ignoreCase' => true, + ); + + // Initialize the diff class + $diff = new Diff($conflictDoc, $origDoc, $options); + + // Generate a side by side diff + $renderer = new Diff_Renderer_Html_SideBySide; + echo $diff->Render($renderer); +} +die(); + + } +} catch (SetteeRestClientException $e) { + setteErrorHandler($e); +} + +include_footer(); +?> + --- a/admin/exportEmployees.csv.php +++ b/admin/exportEmployees.csv.php @@ -5,7 +5,6 @@ $format = "csv"; //$format = "json"; if (isset($_REQUEST['format'])) $format = $_REQUEST['format']; - setlocale(LC_CTYPE, 'C'); if ($format == "csv") { $headers = Array("name"); --- /dev/null +++ b/admin/genericAgencyFixer.php @@ -1,1 +1,44 @@ +get_db('disclosr-agencies'); + +try { + $agencies = $db->get_view("app", "byCanonicalName", null, true)->rows; + //print_r($rows); + foreach ($agencies as $agency) { + //echo $agency->value->name . " ".$agency->value->website."
\n"; + // print_r($agency); + //hasRestricitiveLicence" hasRestrictiveLicense -> has Restrictive Licence + // "hasYoutube" -> Tube + // "comment" -> "comments" + if (!isset($agency->value->metaTags) && isset($agency->value->website)) { + echo $agency->value->name . " ".$agency->value->website."
\n"; + $agency->value->metaTags = Array(); + $request = Requests::get($agency->value->website); + $html = phpQuery::newDocumentHTML($request->body); + phpQuery::selectDocument($html); + foreach (pq('meta')->elements as $meta) { + $tagName = $meta->getAttribute('name');; + $content = $meta->getAttribute('content'); + if ($tagName != "") { +echo "$tagName == $content
\n"; + $agency->value->metaTags[$tagName] = $content; + } + } + //print_r($agency->value->metaTags); + $db->save($agency->value); + echo "
"; + flush(); + } + } +} catch (SetteeRestClientException $e) { + setteErrorHandler($e); +} +?> + --- /dev/null +++ b/admin/naa-agift-tree.php @@ -1,1 +1,2504 @@ + + + + Demo of the tree layout in D3.js + + + + + +
+
+ + + + + + + + + + --- /dev/null +++ b/admin/naa-agift.json @@ -1,1 +1,2232 @@ - +[ + "Home", + "index.htm", + [ + "BUSINESS SUPPORT AND REGULATION", + "000411.htm", + [ + "Association registration", + "000396.htm" + ], + [ + "Business process auditing", + "000413.htm" + ], + [ + "Business registration and licensing", + "000414.htm" + ], + [ + "Business sponsorship", + "001371.htm" + ], + [ + "Consumer protection", + "000439.htm" + ], + [ + "Fair trading compliance", + "000482.htm", + [ + "Prices surveillance", + "000533.htm" + ], + [ + "Product safety", + "000534.htm" + ], + [ + "Trade practices compliance", + "000583.htm" + ] + ], + [ + "Financial institutions regulation", + "000485.htm" + ], + [ + "Government procurement regulation", + "000491.htm" + ], + [ + "Industry assistance schemes", + "000499.htm" + ], + [ + "Industry development", + "000500.htm" + ], + [ + "Insurance regulation", + "000501.htm", + [ + "General insurance", + "000489.htm" + ], + [ + "Life insurance", + "000505.htm" + ] + ], + [ + "Professional accreditation", + "000535.htm" + ], + [ + "Small business services", + "000565.htm", + [ + "Small business advocacy", + "000563.htm" + ], + [ + "Small business development", + "000564.htm" + ] + ], + [ + "Stock market regulation", + "000572.htm" + ] + ], + [ + "CIVIC INFRASTRUCTURE", + "000424.htm", + [ + "Civic management", + "000425.htm", + [ + "Architectural services", + "000387.htm" + ], + [ + "Building approval services", + "000406.htm" + ], + [ + "Building regulations and standards", + "000408.htm" + ], + [ + "Engineering services", + "000477.htm" + ], + [ + "Town planning", + "000582.htm" + ] + ], + [ + "Energy supply", + "000476.htm" + ], + [ + "Integrated services planning", + "000503.htm" + ], + [ + "Public housing", + "000536.htm", + [ + "Public housing construction", + "000537.htm" + ], + [ + "Public housing design", + "000538.htm" + ], + [ + "Public housing maintenance", + "000540.htm" + ] + ], + [ + "Public land management", + "000541.htm", + [ + "Burial ground management", + "000410.htm" + ], + [ + "Cultural centre management", + "000444.htm" + ], + [ + "Garden management", + "000488.htm" + ], + [ + "Memorial maintenance", + "000509.htm" + ], + [ + "Recreational park management", + "000549.htm" + ], + [ + "Sporting facilities management", + "000571.htm" + ] + ], + [ + "Regional development", + "000552.htm" + ], + [ + "Transport network maintenance", + "000586.htm" + ], + [ + "Waste management", + "001349.htm" + ] + ], + [ + "COMMUNICATIONS", + "000433.htm", + [ + "Advertising standards", + "000381.htm" + ], + [ + "Broadcas