SCA Where's the Water website
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
admin fix include order Mar 24, 2018
charts do not cache charts or data Sep 15, 2018
data update river-sections-sca-copy.json from sca server Dec 13, 2018
js update river-sections-sca-copy.json from sca server Aug 26, 2018
kml teith map Oct 14, 2018
leaflet sync with sca website May 14, 2018
lib temp in weather Dec 9, 2018
old-html add copy of the current block of content used in drupal for reference Feb 25, 2018
pchart update river-sections-sca-copy.json from sca server Mar 24, 2018
php.d add php.ini used up update-charts.sh for generating charts. it sets m… Sep 24, 2018
pics remove obsolete code, add notes icon Nov 13, 2018
simple weather format Dec 7, 2018
tests temp in weather Dec 9, 2018
.gitignore Merge remote-tracking branch 'jriddell/master' into kirstens-mobile-c… Mar 15, 2018
.htaccess set no cache for json files Sep 3, 2018
LICENSE Initial commit Nov 12, 2017
README.md add CC-BY-SA 4 to data for rivermap compatibility Apr 24, 2018
andy-jackson-fund.png logos Mar 4, 2018
chart.php bloody php Sep 20, 2018
check-rivers-up-to-date.py let charts be a couple hours old Sep 19, 2018
check-rivers-up-to-date.rb and port to python Sep 15, 2018
common.php sync with sca website May 14, 2018
index.php link to simple view Sep 15, 2018
scottish-canoe-association-social.jpg logos Mar 4, 2018
sidebar.php original code from canoescotland website Nov 12, 2017
wheres-the-water.php remove this copy of the code Sep 15, 2018
wtw-external-crontab add crontab run on external server to call update and check its all w… Nov 22, 2018
wtw-external-update-cron.sh revert to right directory Nov 22, 2018

README.md

SCA Where's the Water website

  • Copyright 2010 Scottish Canoe Association
  • Copyright 2017 Jonathan Riddell
  • May be copied under the GNU GPL version 3 or later only
  • The contents of data/ may be copied under the CC-BY-SA 4.0 licence https://creativecommons.org/licenses/by-sa/4.0

wheres-the-water.php is body which can be viewed or used at http://canoescotland.org/where-go/wheres-water

sidebar.php is drupal is body of side block http://canoescotland.org/admin/structure/block/manage/block/18/ old-html/wheres-water-drupal-content.html is drupal body of old site

Old Version

The old version was written many years ago. It had a Java backend which ran on cron to download SEPA data from private database connection and put it into SCA website Drupal database. Mixing the WtW data into multiple tables in the Drupal database is unnecessary and complicates things. The Java source code has been lost so the site needs to be rewritten. These days SEPA provides public CSV files which list the gauges and ones for each river with current readings, so we just use these.

tests

./phpunit GrabSepaGaugesTest.php ./phpunit GrabSepaRiversTest.php ./phpunit GrabSepaRiverTest.php ./phpunit ScratchTest.php ./phpunit RiverSectionsTest.php (note this needs a database connection)

database connection: only used for data import from old drupal/java system which stored the river data in Drupal's mysql database config/database.php: