From f9d97ae51a3d9febc0820e18d9d1202295f701ae Mon Sep 17 00:00:00 2001 From: "duncan.parkes" Date: Mon, 17 Sep 2007 16:55:52 +0000 Subject: [PATCH] remove generated cgi files --- cgi-bin/AcolnetParser.py | 504 --------------------- cgi-bin/Allerdale.cgi | 33 -- cgi-bin/Alnwick.cgi | 33 -- cgi-bin/Angus.cgi | 33 -- cgi-bin/ApplicationSearchServletParser.py | 518 ---------------------- cgi-bin/Aylesbury Vale.cgi | 33 -- cgi-bin/Babergh.cgi | 33 -- cgi-bin/Barrow.cgi | 33 -- cgi-bin/Basildon.cgi | 33 -- cgi-bin/Basingstoke and Deane.cgi | 33 -- cgi-bin/Bassetlaw.cgi | 33 -- cgi-bin/Bath.cgi | 33 -- cgi-bin/Bexley.cgi | 33 -- cgi-bin/Blaby.cgi | 33 -- cgi-bin/Bolsover.cgi | 33 -- cgi-bin/Bracknell Forest.cgi | 33 -- cgi-bin/Bridgnorth.cgi | 33 -- cgi-bin/Bristol.cgi | 33 -- cgi-bin/Broads.cgi | 33 -- cgi-bin/Bromley.cgi | 33 -- cgi-bin/Buckinghamshire.cgi | 33 -- cgi-bin/Bury.cgi | 33 -- cgi-bin/Caradon.cgi | 33 -- cgi-bin/Carlisle.cgi | 33 -- cgi-bin/Chelmsford.cgi | 33 -- cgi-bin/Cherwell.cgi | 33 -- cgi-bin/Chiltern.cgi | 33 -- cgi-bin/Chorley.cgi | 33 -- cgi-bin/City of London.cgi | 33 -- cgi-bin/Cornwall.cgi | 33 -- cgi-bin/Coventry.cgi | 33 -- cgi-bin/Craven.cgi | 33 -- cgi-bin/Croydon.cgi | 33 -- cgi-bin/Denbighshire.cgi | 33 -- cgi-bin/Derby.cgi | 33 -- cgi-bin/Doncaster.cgi | 33 -- cgi-bin/Dundee.cgi | 33 -- cgi-bin/Durham.cgi | 33 -- cgi-bin/Ealing.cgi | 33 -- cgi-bin/Easington.cgi | 33 -- cgi-bin/East Devon.cgi | 33 -- cgi-bin/East Dorset.cgi | 33 -- cgi-bin/East Lindsey.cgi | 33 -- cgi-bin/Eastleigh.cgi | 33 -- cgi-bin/Eden.cgi | 33 -- cgi-bin/Edinburgh.cgi | 33 -- cgi-bin/Epsom and Ewell.cgi | 33 -- cgi-bin/FastWeb.py | 207 --------- cgi-bin/Fenland.cgi | 33 -- cgi-bin/Fylde.cgi | 33 -- cgi-bin/Gateshead.cgi | 33 -- cgi-bin/Gedling.cgi | 33 -- cgi-bin/Gloucestershire.cgi | 33 -- cgi-bin/Gravesham.cgi | 33 -- cgi-bin/Hambleton.cgi | 33 -- cgi-bin/Hammersmith and Fulham.cgi | 33 -- cgi-bin/Haringey.cgi | 33 -- cgi-bin/Harlow.cgi | 33 -- cgi-bin/Harrogate.cgi | 33 -- cgi-bin/Hart.cgi | 33 -- cgi-bin/Hartlepool.cgi | 33 -- cgi-bin/Hertsmere.cgi | 33 -- cgi-bin/High Peak.cgi | 33 -- cgi-bin/Hinkley and Bosworth.cgi | 33 -- cgi-bin/Huntingdonshire.cgi | 33 -- cgi-bin/Kerrier.cgi | 33 -- cgi-bin/Knowsley.cgi | 33 -- cgi-bin/Lancaster.cgi | 33 -- cgi-bin/Lewisham.cgi | 33 -- cgi-bin/Luton.cgi | 33 -- cgi-bin/Malvern Hills.cgi | 33 -- cgi-bin/Manchester.cgi | 33 -- cgi-bin/Mansfield.cgi | 33 -- cgi-bin/Mid Devon.cgi | 33 -- cgi-bin/Milton Keynes.cgi | 33 -- cgi-bin/Moray.cgi | 33 -- cgi-bin/MultipartPostHandler.py | 133 ------ cgi-bin/NW Leicestershire.cgi | 33 -- cgi-bin/New Forest DC.cgi | 33 -- cgi-bin/New Forest NP.cgi | 33 -- cgi-bin/Newcastle-under-Lyme.cgi | 33 -- cgi-bin/Newcastle.cgi | 33 -- cgi-bin/Newham.cgi | 33 -- cgi-bin/North Hertfordshire.cgi | 33 -- cgi-bin/North Tyneside.cgi | 33 -- cgi-bin/North Warwickshire.cgi | 33 -- cgi-bin/North Wiltshire.cgi | 33 -- cgi-bin/Northumberland.cgi | 33 -- cgi-bin/Oadby and Wigston.cgi | 33 -- cgi-bin/Oldham.cgi | 33 -- cgi-bin/Oswestry.cgi | 33 -- cgi-bin/Perthshire.cgi | 33 -- cgi-bin/Peterborough.cgi | 33 -- cgi-bin/PlanningUtils.py | 102 ----- cgi-bin/Portsmouth.cgi | 33 -- cgi-bin/PublicAccess.py | 351 --------------- cgi-bin/README | 5 - cgi-bin/Redditch.cgi | 33 -- cgi-bin/Renfrewshire.cgi | 33 -- cgi-bin/Rushmoor.cgi | 33 -- cgi-bin/Scarborough.cgi | 33 -- cgi-bin/Selby.cgi | 33 -- cgi-bin/Sevenoaks.cgi | 33 -- cgi-bin/South Bedfordshire.cgi | 33 -- cgi-bin/South Bucks.cgi | 33 -- cgi-bin/South Lakeland.cgi | 33 -- cgi-bin/South Ribble.cgi | 33 -- cgi-bin/South Staffordshire.cgi | 33 -- cgi-bin/SouthOxfordshire.cgi | 20 - cgi-bin/SouthOxfordshireParser.py | 248 ----------- cgi-bin/Southampton.cgi | 33 -- cgi-bin/Spelthorne.cgi | 33 -- cgi-bin/St Helens.cgi | 33 -- cgi-bin/Stevenage.cgi | 33 -- cgi-bin/Stirling.cgi | 33 -- cgi-bin/Stockton-On-Tees.cgi | 33 -- cgi-bin/Stratford.cgi | 33 -- cgi-bin/Suffolk Coastal.cgi | 33 -- cgi-bin/Sunderland.cgi | 33 -- cgi-bin/Surrey Heath.cgi | 33 -- cgi-bin/Sutton.cgi | 33 -- cgi-bin/Teignbridge.cgi | 33 -- cgi-bin/Tendring.cgi | 33 -- cgi-bin/Test Valley.cgi | 33 -- cgi-bin/Tonbridge.cgi | 33 -- cgi-bin/Torbay.cgi | 33 -- cgi-bin/Vale Royal.cgi | 33 -- cgi-bin/Watford.cgi | 33 -- cgi-bin/Waveney.cgi | 33 -- cgi-bin/Wear Valley.cgi | 33 -- cgi-bin/Wellingborough.cgi | 33 -- cgi-bin/Welwyn-Hatfield.cgi | 33 -- cgi-bin/West Berkshire.cgi | 33 -- cgi-bin/West Lancashire.cgi | 33 -- cgi-bin/West Norfolk.cgi | 33 -- cgi-bin/Winchester.cgi | 33 -- cgi-bin/Woking.cgi | 33 -- cgi-bin/Wolverhampton.cgi | 33 -- cgi-bin/Wyre Forest.cgi | 33 -- cgi-bin/York.cgi | 33 -- 140 files changed, 6411 deletions(-) delete mode 100644 cgi-bin/AcolnetParser.py delete mode 100644 cgi-bin/Allerdale.cgi delete mode 100644 cgi-bin/Alnwick.cgi delete mode 100644 cgi-bin/Angus.cgi delete mode 100644 cgi-bin/ApplicationSearchServletParser.py delete mode 100644 cgi-bin/Aylesbury Vale.cgi delete mode 100644 cgi-bin/Babergh.cgi delete mode 100644 cgi-bin/Barrow.cgi delete mode 100644 cgi-bin/Basildon.cgi delete mode 100644 cgi-bin/Basingstoke and Deane.cgi delete mode 100644 cgi-bin/Bassetlaw.cgi delete mode 100644 cgi-bin/Bath.cgi delete mode 100644 cgi-bin/Bexley.cgi delete mode 100644 cgi-bin/Blaby.cgi delete mode 100644 cgi-bin/Bolsover.cgi delete mode 100755 cgi-bin/Bracknell Forest.cgi delete mode 100755 cgi-bin/Bridgnorth.cgi delete mode 100644 cgi-bin/Bristol.cgi delete mode 100755 cgi-bin/Broads.cgi delete mode 100755 cgi-bin/Bromley.cgi delete mode 100644 cgi-bin/Buckinghamshire.cgi delete mode 100644 cgi-bin/Bury.cgi delete mode 100755 cgi-bin/Caradon.cgi delete mode 100755 cgi-bin/Carlisle.cgi delete mode 100644 cgi-bin/Chelmsford.cgi delete mode 100644 cgi-bin/Cherwell.cgi delete mode 100755 cgi-bin/Chiltern.cgi delete mode 100644 cgi-bin/Chorley.cgi delete mode 100644 cgi-bin/City of London.cgi delete mode 100644 cgi-bin/Cornwall.cgi delete mode 100644 cgi-bin/Coventry.cgi delete mode 100755 cgi-bin/Craven.cgi delete mode 100755 cgi-bin/Croydon.cgi delete mode 100644 cgi-bin/Denbighshire.cgi delete mode 100644 cgi-bin/Derby.cgi delete mode 100644 cgi-bin/Doncaster.cgi delete mode 100644 cgi-bin/Dundee.cgi delete mode 100644 cgi-bin/Durham.cgi delete mode 100644 cgi-bin/Ealing.cgi delete mode 100644 cgi-bin/Easington.cgi delete mode 100644 cgi-bin/East Devon.cgi delete mode 100755 cgi-bin/East Dorset.cgi delete mode 100644 cgi-bin/East Lindsey.cgi delete mode 100755 cgi-bin/Eastleigh.cgi delete mode 100755 cgi-bin/Eden.cgi delete mode 100644 cgi-bin/Edinburgh.cgi delete mode 100644 cgi-bin/Epsom and Ewell.cgi delete mode 100644 cgi-bin/FastWeb.py delete mode 100644 cgi-bin/Fenland.cgi delete mode 100755 cgi-bin/Fylde.cgi delete mode 100755 cgi-bin/Gateshead.cgi delete mode 100644 cgi-bin/Gedling.cgi delete mode 100755 cgi-bin/Gloucestershire.cgi delete mode 100644 cgi-bin/Gravesham.cgi delete mode 100755 cgi-bin/Hambleton.cgi delete mode 100644 cgi-bin/Hammersmith and Fulham.cgi delete mode 100644 cgi-bin/Haringey.cgi delete mode 100644 cgi-bin/Harlow.cgi delete mode 100644 cgi-bin/Harrogate.cgi delete mode 100644 cgi-bin/Hart.cgi delete mode 100644 cgi-bin/Hartlepool.cgi delete mode 100644 cgi-bin/Hertsmere.cgi delete mode 100644 cgi-bin/High Peak.cgi delete mode 100755 cgi-bin/Hinkley and Bosworth.cgi delete mode 100644 cgi-bin/Huntingdonshire.cgi delete mode 100644 cgi-bin/Kerrier.cgi delete mode 100644 cgi-bin/Knowsley.cgi delete mode 100644 cgi-bin/Lancaster.cgi delete mode 100755 cgi-bin/Lewisham.cgi delete mode 100644 cgi-bin/Luton.cgi delete mode 100644 cgi-bin/Malvern Hills.cgi delete mode 100644 cgi-bin/Manchester.cgi delete mode 100755 cgi-bin/Mansfield.cgi delete mode 100644 cgi-bin/Mid Devon.cgi delete mode 100644 cgi-bin/Milton Keynes.cgi delete mode 100755 cgi-bin/Moray.cgi delete mode 100644 cgi-bin/MultipartPostHandler.py delete mode 100644 cgi-bin/NW Leicestershire.cgi delete mode 100755 cgi-bin/New Forest DC.cgi delete mode 100755 cgi-bin/New Forest NP.cgi delete mode 100755 cgi-bin/Newcastle-under-Lyme.cgi delete mode 100644 cgi-bin/Newcastle.cgi delete mode 100644 cgi-bin/Newham.cgi delete mode 100755 cgi-bin/North Hertfordshire.cgi delete mode 100644 cgi-bin/North Tyneside.cgi delete mode 100644 cgi-bin/North Warwickshire.cgi delete mode 100644 cgi-bin/North Wiltshire.cgi delete mode 100644 cgi-bin/Northumberland.cgi delete mode 100644 cgi-bin/Oadby and Wigston.cgi delete mode 100755 cgi-bin/Oldham.cgi delete mode 100644 cgi-bin/Oswestry.cgi delete mode 100755 cgi-bin/Perthshire.cgi delete mode 100644 cgi-bin/Peterborough.cgi delete mode 100644 cgi-bin/PlanningUtils.py delete mode 100644 cgi-bin/Portsmouth.cgi delete mode 100644 cgi-bin/PublicAccess.py delete mode 100644 cgi-bin/README delete mode 100644 cgi-bin/Redditch.cgi delete mode 100644 cgi-bin/Renfrewshire.cgi delete mode 100644 cgi-bin/Rushmoor.cgi delete mode 100644 cgi-bin/Scarborough.cgi delete mode 100755 cgi-bin/Selby.cgi delete mode 100644 cgi-bin/Sevenoaks.cgi delete mode 100755 cgi-bin/South Bedfordshire.cgi delete mode 100644 cgi-bin/South Bucks.cgi delete mode 100755 cgi-bin/South Lakeland.cgi delete mode 100644 cgi-bin/South Ribble.cgi delete mode 100644 cgi-bin/South Staffordshire.cgi delete mode 100644 cgi-bin/SouthOxfordshire.cgi delete mode 100644 cgi-bin/SouthOxfordshireParser.py delete mode 100644 cgi-bin/Southampton.cgi delete mode 100644 cgi-bin/Spelthorne.cgi delete mode 100644 cgi-bin/St Helens.cgi delete mode 100644 cgi-bin/Stevenage.cgi delete mode 100644 cgi-bin/Stirling.cgi delete mode 100644 cgi-bin/Stockton-On-Tees.cgi delete mode 100644 cgi-bin/Stratford.cgi delete mode 100644 cgi-bin/Suffolk Coastal.cgi delete mode 100644 cgi-bin/Sunderland.cgi delete mode 100755 cgi-bin/Surrey Heath.cgi delete mode 100755 cgi-bin/Sutton.cgi delete mode 100644 cgi-bin/Teignbridge.cgi delete mode 100755 cgi-bin/Tendring.cgi delete mode 100644 cgi-bin/Test Valley.cgi delete mode 100644 cgi-bin/Tonbridge.cgi delete mode 100644 cgi-bin/Torbay.cgi delete mode 100755 cgi-bin/Vale Royal.cgi delete mode 100755 cgi-bin/Watford.cgi delete mode 100644 cgi-bin/Waveney.cgi delete mode 100644 cgi-bin/Wear Valley.cgi delete mode 100644 cgi-bin/Wellingborough.cgi delete mode 100755 cgi-bin/Welwyn-Hatfield.cgi delete mode 100644 cgi-bin/West Berkshire.cgi delete mode 100644 cgi-bin/West Lancashire.cgi delete mode 100644 cgi-bin/West Norfolk.cgi delete mode 100755 cgi-bin/Winchester.cgi delete mode 100644 cgi-bin/Woking.cgi delete mode 100755 cgi-bin/Wolverhampton.cgi delete mode 100755 cgi-bin/Wyre Forest.cgi delete mode 100644 cgi-bin/York.cgi diff --git a/cgi-bin/AcolnetParser.py b/cgi-bin/AcolnetParser.py deleted file mode 100644 index 40dcba1..0000000 --- a/cgi-bin/AcolnetParser.py +++ /dev/null @@ -1,504 +0,0 @@ -#!/usr/local/bin/python - -import urllib, urllib2 -import HTMLParser -#from BeautifulSoup import BeautifulSoup - -# Adding this to try to help Surrey Heath - Duncan 14/9/2007 -import cookielib -cookie_jar = cookielib.CookieJar() -################ - -import urlparse - -import re - -end_head_regex = re.compile("]*action=\"([^\"]*ACTION=UNWRAP&RIPSESSION=[^\"]*)\"[^>]*>", re.IGNORECASE) - - def __init__(self, - authority_name, - authority_short_name, - base_url, - debug=False): - - - HTMLParser.HTMLParser.__init__(self) - - self.authority_name = authority_name - self.authority_short_name = authority_short_name - self.base_url = base_url - - self.debug = debug - - self._tr_number = 0 - - # This will be used to track the subtable depth - # when we are in a results-table, in order to - # avoid adding an application before we have got to - # the end of the results-table - self._subtable_depth = None - - self._in_td = False - - # This in where we store the results - self._results = PlanningAuthorityResults(self.authority_name, self.authority_short_name) - - # This will store the planning application we are currently working on. - self._current_application = None - - - def _cleanupHTML(self, html): - """This method should be overridden in subclasses to perform site specific - HTML cleanup.""" - return html - - def handle_starttag(self, tag, attrs): - #print tag, attrs - - if tag == "table": - if self._current_application is None: - # Each application is in a separate table with class "results-table" - for key, value in attrs: - if key == "class" and value == "results-table": - #print "found results-table" - self._current_application = PlanningApplication() - self._tr_number = 0 - self._subtable_depth = 0 - self._current_application.comment_url = self.comments_email_address - break - else: - # We are already in a results-table, and this is the start of a subtable, - # so increment the subtable depth. - self._subtable_depth += 1 - - elif self._current_application is not None: - if tag == "tr" and self._subtable_depth == 0: - self._tr_number += 1 - if tag == "td": - self._in_td = True - if tag == "a" and self._tr_number == self.case_number_tr: - # this is where we get the info link and the case number - for key, value in attrs: - if key == "href": - self._current_application.info_url = value - - system_key = system_key_regex.search(value).groups()[0] - - if self.comments_email_address is not None: - self._current_application.comment_url = self.comments_email_address - else: - self._current_application.comment_url = value.replace("PgeResultDetail", "PgeCommentForm") - - def handle_data(self, data): - # If we are in the tr which contains the case number, - # then data is the council reference, so - # add it to self._current_application. - if self._in_td: - if self._tr_number == self.case_number_tr: - self._current_application.council_reference = data.strip() - elif self._tr_number == self.reg_date_tr: - # we need to make a date object out of data - date_as_str = ''.join(data.strip().split()) - received_date = date(*strptime(date_as_str, date_format)[0:3]) - - #print received_date - - self._current_application.date_received = received_date - - elif self._tr_number == self.location_tr: - location = data.strip() - - self._current_application.address = location - self._current_application.postcode = getPostcodeFromText(location) - elif self._tr_number == self.proposal_tr: - self._current_application.description = data.strip() - - - def handle_endtag(self, tag): - #print "ending: ", tag - if tag == "table" and self._current_application is not None: - if self._subtable_depth > 0: - self._subtable_depth -= 1 - else: - # We need to add the last application in the table - if self._current_application is not None: - #print "adding application" - self._results.addApplication(self._current_application) - #print self._current_application - self._current_application = None - self._tr_number = None - self._subtable_depth = None - elif tag == "td": - self._in_td = False - - - def _getSearchResponse(self): - # It looks like we sometimes need to do some stuff to get around a - # javascript redirect and cookies. - search_form_request = urllib2.Request(self.base_url) - search_form_response = urllib2.urlopen(search_form_request) - - return search_form_response - - - def getResultsByDayMonthYear(self, day, month, year): - # first we fetch the search page to get ourselves some session info... - search_form_response = self._getSearchResponse() - - search_form_contents = search_form_response.read() - - #outfile = open("tmpfile", "w") - #outfile.write(search_form_contents) - - # This sometimes causes a problem in HTMLParser, so let's just get the link - # out with a regex... - - groups = self.action_regex.search(search_form_contents).groups() - - action = groups[0] - #print action - - action_url = urlparse.urljoin(self.base_url, action) - #print action_url - - our_date = date(year, month, day) - - search_data = {"regdate1": our_date.strftime(date_format), - "regdate2": our_date.strftime(date_format), - } - - opener = urllib2.build_opener(MultipartPostHandler.MultipartPostHandler) - response = opener.open(action_url, search_data) - results_html = response.read() - - # This is for doing site specific html cleanup - results_html = self._cleanupHTML(results_html) - - #some javascript garbage in the header upsets HTMLParser, - #so we'll just have the body - just_body = "" + end_head_regex.split(results_html)[-1] - - #outfile = open(self.authority_short_name + ".debug", "w") - #outfile.write(just_body) - - self.feed(just_body) - - return self._results - - - - def getResults(self, day, month, year): - return self.getResultsByDayMonthYear(int(day), int(month), int(year)).displayXML() - - -class BaberghParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - - # It would be nice to scrape this... - comments_email_address = "planning.reception@babergh.gov.uk" - -class BasingstokeParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 3 - location_tr = 6 - proposal_tr = 8 - - # It would be nice to scrape this... - comments_email_address = "development.control@basingstoke.gov.uk" - -class BassetlawParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 5 - proposal_tr = 6 - - comments_email_address = "planning@bassetlaw.gov.uk" - - def _cleanupHTML(self, html): - """There is a broken div in this page. We don't need any divs, so - let's get rid of them all.""" - - div_regex = re.compile("]*>", re.IGNORECASE) - return div_regex.sub('', html) - - -class BridgnorthParser(AcolnetParser): - # This site is currently down... - #search_url = "http://www2.bridgnorth-dc.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.PgeSearch" - #authority_name = "Bridgenorth District Council" - #authority_short_name = "Bridgenorth" - - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - - comments_email_address = "contactus@bridgnorth-dc.gov.uk" - -class BuryParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - - comments_email_address = "development.control@bury.gov.uk" - -## class CanterburyParser(AcolnetParser): -## search_url = "http://planning.canterbury.gov.uk/scripts/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -## case_number_tr = 1 # this one can be got by the td class attribute -## reg_date_tr = 2 -## location_tr = 4 -## proposal_tr = 5 - -## authority_name = "Canterbury City Council" -## authority_short_name = "Canterbury" - -## comments_email_address = "" - -class CarlisleParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 5 - proposal_tr = 6 - - comments_email_address = "dc@carlisle.gov.uk" - -class DerbyParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 3 - location_tr = 4 - proposal_tr = 5 - - comments_email_address = "developmentcontrol@derby.gov.uk" - -class CroydonParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 3 - location_tr = 5 - proposal_tr = 6 - - comments_email_address = "planning.control@croydon.gov.uk" - -class EastLindseyParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 3 - location_tr = 5 - proposal_tr = 6 - - comments_email_address = "development.control@e-lindsey.gov.uk" - -class FyldeParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - - comments_email_address = "planning@fylde.gov.uk" - -class HarlowParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - - comments_email_address = "Planning.services@harlow.gov.uk" - -class HavantParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 3 - location_tr = 6 - proposal_tr = 8 - - comments_email_address = "representations@havant.gov.uk" - -class HertsmereParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - - comments_email_address = "planning@hertsmere.gov.uk" - -class LewishamParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - - comments_email_address = "planning@lewisham.gov.uk" - -class NorthHertfordshireParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - -## class MidSuffolkParser(AcolnetParser): -## case_number_tr = 1 # this one can be got by the td class attribute -## reg_date_tr = 2 -## location_tr = 4 -## proposal_tr = 5 - -## comments_email_address = "planning@lewisham.gov.uk" -## #action_regex = re.compile("
]*>", re.IGNORECASE) - -class NewForestNPParser(AcolnetParser): - # In this case there is an online comment facility at the - # bottom of each view app page... - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - -class NewForestDCParser(AcolnetParser): - # In this case there is an online comment facility at the - # bottom of each view app page... - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 5 - proposal_tr = 6 - -class NorthWiltshireParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 3 - location_tr = 6 - proposal_tr = 7 - -class OldhamParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 3 - location_tr = 6 - proposal_tr = 7 - - def _cleanupHTML(self, html): - """There is a bad table end tag in this one. - Fix it before we start""" - - bad_table_end = '' - good_table_end = '' - return html.replace(bad_table_end, good_table_end) - - -class RenfrewshireParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - - comments_email_address = "pt@renfrewshire.gov.uk" - -class SouthBedfordshireParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 3 - location_tr = 5 - proposal_tr = 6 - -class SuffolkCoastalParser(AcolnetParser): - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - - comments_email_address = "d.c.admin@suffolkcoastal.gov.uk" - -class GuildfordParser(AcolnetParser): - case_number_tr = 1 - reg_date_tr = 7 - location_tr = 2 - proposal_tr = 3 - - #http://www.guildford.gov.uk/acolnet/acolnetcgi.gov?ACTION=UNWRAP&Root=PgeSearch - -class SurreyHeathParser(AcolnetParser): - # This is not working yet. - # _getSearchResponse is an attempt to work around - # cookies and a javascript redirect. - # I may have a bit more of a go at this at some point if I have time. - case_number_tr = 1 # this one can be got by the td class attribute - reg_date_tr = 2 - location_tr = 4 - proposal_tr = 5 - - comments_email_address = "development-control@surreyheath.gov.uk" - - def _getSearchResponse(self): - # It looks like we sometimes need to do some stuff to get around a - # javascript redirect and cookies. - search_form_request = urllib2.Request(self.base_url) - - # Lying about the user-agent doesn't seem to help. - #search_form_request.add_header("user-agent", "Mozilla/5.0 (compatible; Konqu...L/3.5.6 (like Gecko) (Kubuntu)") - - search_form_response = urllib2.urlopen(search_form_request) - - cookie_jar.extract_cookies(search_form_response, search_form_request) - - - print search_form_response.geturl() - print search_form_response.info() - - print search_form_response.read() -# validate_url = "https://www.public.surreyheath-online.gov.uk/whalecom7cace3215643e22bb7b0b8cc97a7/whalecom0/InternalSite/Validate.asp" -# javascript_redirect_url = urlparse.urljoin(self.base_url, "/whalecom7cace3215643e22bb7b0b8cc97a7/whalecom0/InternalSite/RedirectToOrigURL.asp?site_name=public&secure=1") - -# javascript_redirect_request = urllib2.Request(javascript_redirect_url) -# javascript_redirect_request.add_header('Referer', validate_url) - -# cookie_jar.add_cookie_header(javascript_redirect_request) - -# javascript_redirect_response = urllib2.urlopen(javascript_redirect_request) - -# return javascript_redirect_response - - -if __name__ == '__main__': - day = 22 - month = 2 - year = 2005 - - # returns error 400 - bad request - #parser = BridgenorthParser() - - # cambridgeshire is a bit different... - # no advanced search page - - # canterbury - # results as columns of one table - - #parser = SurreyHeathParser("Surrey Heath", "Surrey Heath", "https://www.public.surreyheath-online.gov.uk/whalecom60b1ef305f59f921/whalecom0/Scripts/PlanningPagesOnline/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch") - - parser = GuildfordParser("Guildford", "Guildford", "http://www.guildford.gov.uk/acolnet/acolnetcgi.gov?ACTION=UNWRAP&Root=PgeSearch") - print parser.getResults(day, month, year) - diff --git a/cgi-bin/Allerdale.cgi b/cgi-bin/Allerdale.cgi deleted file mode 100644 index 8305e56..0000000 --- a/cgi-bin/Allerdale.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Allerdale Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Allerdale Borough Council" -authority_short_name = "Allerdale" -base_url = "http://planning.allerdale.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.AllerdaleSearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Alnwick.cgi b/cgi-bin/Alnwick.cgi deleted file mode 100644 index 7ce11b6..0000000 --- a/cgi-bin/Alnwick.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Alnwick District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Alnwick District Council" -authority_short_name = "Alnwick" -base_url = "http://services.castlemorpeth.gov.uk:7777/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.AlnwickSearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Angus.cgi b/cgi-bin/Angus.cgi deleted file mode 100644 index dd1da6d..0000000 --- a/cgi-bin/Angus.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Angus Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Angus Council" -authority_short_name = "Angus" -base_url = "http://planning.angus.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/ApplicationSearchServletParser.py b/cgi-bin/ApplicationSearchServletParser.py deleted file mode 100644 index b1db56f..0000000 --- a/cgi-bin/ApplicationSearchServletParser.py +++ /dev/null @@ -1,518 +0,0 @@ - -import urllib, urllib2 - -import HTMLParser -import urlparse -import datetime, time - - -from PlanningUtils import PlanningAuthorityResults, \ - getPostcodeFromText, \ - PlanningApplication - - -# The search results list will give us reference, location, description, -# and info url of each app. - -# The info page gives us the received date, -# and comment_url - -class ApplicationSearchServletParser(HTMLParser.HTMLParser): - """Parser for ApplicationSearchServlet sites. - """ - - - # These indicate the column of the main table containing this - # piece of information. - # They should be overridden in subclasses - - #self._rows_to_ignore_at_start = None - - _reference_col_no = None - _location_col_no = None - _description_col_no = None - - def __init__(self, - authority_name, - authority_short_name, - base_url, - debug=False): - HTMLParser.HTMLParser.__init__(self) - - self.authority_name = authority_name - self.authority_short_name = authority_short_name - self.base_url = base_url - self.debug = debug - - self.search_url = urlparse.urljoin(self.base_url, "portal/servlets/ApplicationSearchServlet") - - self._comment_url = urlparse.urljoin(self.base_url, "portal/servlets/PlanningComments?REFNO=%(council_reference)s") - - self._requested_date = None - - # 0 - no - # 1 - maybe - # 2 - yes - # 3 - finished - self._in_results_table = 0 - self._tr_count = 0 - self._td_count = 0 - self._data_list = [] - - # this will hold the application we are currently working on. - self._current_application = None - - # The object which stores our set of planning application results - self._results = PlanningAuthorityResults(self.authority_name, self.authority_short_name) - - def _checkAttrsForResultsTable(self, attrs): - raise SystemError - - def handle_starttag(self, tag, attrs): - if self.debug: - print tag, attrs - if tag == "table" and self._in_results_table == 0: - self._in_results_table = 1 - self._checkAttrsForResultsTable(attrs) - elif tag == "tr" and self._in_results_table == 2: - self._tr_count += 1 - self._td_count = 0 - self._data_list = [] - self._current_application = PlanningApplication() - - elif tag == "td" and self._in_results_table == 2: - self._td_count += 1 - - elif tag == "a" and self._in_results_table == 2 and self._td_count == self._reference_col_no: - # The href attribute contains the link to the info page - for (key, value) in attrs: - if key == "href": - self._current_application.info_url = urlparse.urljoin(self.search_url, value) - - def handle_endtag(self, tag): - if self.debug: - print "ending: " , tag - - if tag == "table" and self._in_results_table == 2: - self._in_results_table = 3 - elif tag == "tr" and self._in_results_table == 2: - if self._current_application.council_reference is not None: - - # get the received date - #info_response = urllib2.urlopen(self._current_application.info_url) - #info_page_parser = InfoPageParser() - #info_page_parser.feed(info_response.read()) - self._current_application.date_received = self._requested_date#info_page_parser.date_received - self._results.addApplication(self._current_application) - elif tag == "td" and self._in_results_table == 2: - if self._td_count == self._location_col_no: - data = ' '.join(self._data_list).strip() - self._current_application.address = data - postcode = getPostcodeFromText(data) - if postcode is not None: - self._current_application.postcode = postcode - self._data_list = [] - elif self._td_count == self._description_col_no: - data = ' '.join(self._data_list).strip() - self._current_application.description = data - self._data_list = [] - elif tag == 'a' and self._in_results_table == 2 and self._td_count == self._reference_col_no: - data = ''.join(self._data_list).strip() - self._current_application.council_reference = data - self._current_application.comment_url = self._comment_url %{"council_reference": data} - self._data_list = [] - - def handle_data(self, data): - if self.debug: - print data - - if self._in_results_table == 2: - if self._td_count == self._reference_col_no or \ - self._td_count == self._location_col_no or \ - self._td_count == self._description_col_no: - self._data_list.append(data.strip()) - - - def getResultsByDayMonthYear(self, day, month, year): - """This will return an ApplicationResults object containg the - applications for the date passed in.""" - - # Were going to need a datetime object for the requested date - self._requested_date = datetime.date(year, month, day) - - required_format = "%d-%m-%Y" - - search_data = urllib.urlencode({"ReceivedDateFrom":self._requested_date.strftime(required_format), - "ReceivedDateTo":self._requested_date.strftime(required_format)}) - - search_request = urllib2.Request(self.search_url, search_data) - search_response = urllib2.urlopen(search_request) - search_contents = search_response.read() - - self.feed(search_contents) - - return self._results - - def getResults(self, day, month, year): - return self.getResultsByDayMonthYear(int(day), int(month), int(year)).displayXML() - - -class CoventrySearchParser(ApplicationSearchServletParser): - # results table spotter - # width="100%" border="0" - - _reference_col_no = 1 - _location_col_no = 5 - _description_col_no = 8 - - def _checkAttrsForResultsTable(self, attrs): - got_width = False - got_border = False - - for key, value in attrs: - if key == 'width' and value == '100%': - got_width = True - elif key == 'border' and value == '0': - got_border = True - - if got_width and got_border: - self._in_results_table = 2 - else: - self._in_results_table = 0 - - - -class AllerdaleSearchParser(ApplicationSearchServletParser): - # results table spotter -#class="nis_table" summary="Table of planning applications that matched your query, showing reference number, received date, and address" - - _reference_col_no = 1 - _location_col_no = 3 - _description_col_no = 6 - - def _checkAttrsForResultsTable(self, attrs): - got_class = False - got_summary = False - - for key, value in attrs: - if key == 'class' and value == 'nis_table': - got_class = True - elif key == 'summary' and value == 'Table of planning applications that matched your query, showing reference number, received date, and address': - got_summary = True - - if got_class and got_summary: - self._in_results_table = 2 - else: - self._in_results_table = 0 - - - -class AlnwickSearchParser(ApplicationSearchServletParser): - # results table spotter - # width="100%" class="niscontent" - _reference_col_no = 1 - _location_col_no = 2 - _description_col_no = 7 - - def _checkAttrsForResultsTable(self, attrs): - got_class = False - - for key, value in attrs: - if key == 'class' and value == 'niscontent': - got_class = True - - if got_class: - self._in_results_table = 2 - else: - self._in_results_table = 0 - - -class BarrowSearchParser(ApplicationSearchServletParser): - # results table spotter - # width="100%" border="0" - _reference_col_no = 1 - _location_col_no = 3 - _description_col_no = 6 - - def _checkAttrsForResultsTable(self, attrs): - got_width = False - got_border = False - - for key, value in attrs: - if key == 'width' and value == '100%': - got_width = True - elif key == 'border' and value == '0': - got_border = True - - if got_width and got_border: - self._in_results_table = 2 - else: - self._in_results_table = 0 - - -class HartlepoolSearchParser(ApplicationSearchServletParser): - # results table spotter - # summary="Table of planning applications that matched your query, showing reference number, received date, and address" - _reference_col_no = 1 - _location_col_no = 2 - _description_col_no = 3 - - def _checkAttrsForResultsTable(self, attrs): - got_summary = False - - for key, value in attrs: - if key == 'summary' and value == "Table of planning applications that matched your query, showing reference number, received date, and address": - got_summary = True - - if got_summary: - self._in_results_table = 2 - else: - self._in_results_table = 0 - - -class NorthWarksSearchParser(ApplicationSearchServletParser): - # results table spotter - # table width="100%" border="0" cellspacing="0" cellpadding="0" - _reference_col_no = 1 - _location_col_no = 3 - _description_col_no = 4 - - def _checkAttrsForResultsTable(self, attrs): - got_width = False - got_border = False - got_cellspacing = False - got_cellpadding = False - - for key, value in attrs: - if key == 'width' and value == "100%": - got_width = True - elif key == 'border' and value == '0': - got_border = True - elif key == 'cellspacing' and value == '0': - got_cellspacing = True - elif key == 'cellpadding' and value == '0': - got_cellpadding = True - - if got_width and got_border and got_cellspacing and got_cellpadding: - self._in_results_table = 2 - else: - self._in_results_table = 0 - -class StHelensSearchParser(ApplicationSearchServletParser): - # results table spotter - # summary="Search Results List" - _reference_col_no = 1 - _location_col_no = 2 - _description_col_no = 5 - - def _checkAttrsForResultsTable(self, attrs): - got_summary = False - - for key, value in attrs: - if key == 'summary' and value == "Search Results List": - got_summary = True - - if got_summary: - self._in_results_table = 2 - else: - self._in_results_table = 0 - -class EasingtonSearchParser(ApplicationSearchServletParser): - # results table spotter - #table width="100%" border="0" cellspacing="0" cellpadding="0" - _reference_col_no = 1 - _location_col_no = 3 - _description_col_no = 6 - - def _checkAttrsForResultsTable(self, attrs): - got_width = False - got_border = False - got_cellspacing = False - got_cellpadding = False - - for key, value in attrs: - if key == 'width' and value == "100%": - got_width = True - elif key == 'border' and value == '0': - got_border = True - elif key == 'cellspacing' and value == '0': - got_cellspacing = True - elif key == 'cellpadding' and value == '0': - got_cellpadding = True - - if got_width and got_border and got_cellspacing and got_cellpadding: - self._in_results_table = 2 - else: - self._in_results_table = 0 - - -class HighPeakSearchParser(ApplicationSearchServletParser): - # results table spotter - # table class="data" width="95%" - _reference_col_no = 1 - _location_col_no = 2 - _description_col_no = 5 - - def _checkAttrsForResultsTable(self, attrs): - got_class = False - got_width = False - - for key, value in attrs: - if key == 'class' and value == "data": - got_class = True - if key == 'width' and value == "95%": - got_width = True - - if got_class and got_width: - self._in_results_table = 2 - else: - self._in_results_table = 0 - - -class WearValleySearchParser(ApplicationSearchServletParser): - # results table spotter - # table summary="Table of planning applications that matched your query, showing reference number, received date, and address" - _reference_col_no = 1 - _location_col_no = 3 - _description_col_no = 4 - - def _checkAttrsForResultsTable(self, attrs): - got_summary= False - - for key, value in attrs: - if key == 'summary' and value == "Table of planning applications that matched your query, showing reference number, received date, and address": - got_summary = True - - if got_summary: - self._in_results_table = 2 - else: - self._in_results_table = 0 - - -class WellingboroughSearchParser(ApplicationSearchServletParser): - # results table spotter - #table width="100%" border="0" - _reference_col_no = 1 - _location_col_no = 3 - _description_col_no = 6 - - def _checkAttrsForResultsTable(self, attrs): - got_width = False - got_border = False - - for key, value in attrs: - if key == 'width' and value == "100%": - got_width = True - elif key == 'border' and value == "0": - got_border = True - - if got_width and got_border: - self._in_results_table = 2 - else: - self._in_results_table = 0 - -class EalingSearchParser(ApplicationSearchServletParser): - # results table spotter - # table width="100%" cellspacing="0px" border="1px" cellpadding="2px" bordercolor="#FFFFFF" - _reference_col_no = 1 - _location_col_no = 3 - _description_col_no = 4 - - def _checkAttrsForResultsTable(self, attrs): - got_width = False - got_cellspacing = False - got_border = False - got_cellpadding = False - got_bordercolor = False - - for key, value in attrs: - if key == 'width' and value == "100%": - got_width = True - elif key == 'cellspacing' and value == "0px": - got_cellspacing = True - elif key == 'border' and value == "1px": - got_border = True - elif key == 'cellpadding' and value == "2px": - got_cellpadding = True - elif key == 'bordercolor' and value == "#FFFFFF": - got_bordercolor = True - - if got_width and got_cellspacing and got_border and got_cellpadding and got_bordercolor: - self._in_results_table = 2 - else: - self._in_results_table = 0 - - -class HaringeySearchParser(ApplicationSearchServletParser): - # results table spotter - # summary="Application Results" - _reference_col_no = 1 - _location_col_no = 2 - _description_col_no = 5 - - def _checkAttrsForResultsTable(self, attrs): - got_summary= False - - for key, value in attrs: - if key == 'summary' and value == "Application Results": - got_summary = True - - if got_summary: - self._in_results_table = 2 - else: - self._in_results_table = 0 - - -class DenbighshireSearchParser(ApplicationSearchServletParser): - # results table spotter - #table width="100%" border="0" - _reference_col_no = 1 - _location_col_no = 3 - _description_col_no = 5 - - def _checkAttrsForResultsTable(self, attrs): - got_width = False - got_border = False - - for key, value in attrs: - if key == 'width' and value == "100%": - got_width = True - elif key == 'border' and value == "0": - got_border = True - - if got_width and got_border: - self._in_results_table = 2 - else: - self._in_results_table = 0 - - -if __name__ == "__main__": - #parser = CoventrySearchParser("Coventry", "Coventry", "http://planning.coventry.gov.uk") - #print parser.getResults(28,3,2007) - #parser = AllerdaleSearchParser("Allerdale", "Allerdale", "http://planning.allerdale.gov.uk") - #print parser.getResults(28,3,2007) - #parser = AlnwickSearchParser("Alnwick", "Alnwick", "http://services.castlemorpeth.gov.uk:7777") - #print parser.getResults(28,3,2007) - #parser = BarrowSearchParser("Barrow", "Barrow", "http://localportal.barrowbc.gov.uk") - #print parser.getResults(28,3,2007) - #parser = HartlepoolSearchParser("Hartlepool", "Hartlepool", "http://eforms.hartlepool.gov.uk:7777") - #print parser.getResults(28,3,2007) - #parser = NorthWarksSearchParser("North Warwickshire", "North Warks", "http://planning.northwarks.gov.uk") - #print parser.getResults(28,3,2007) - #parser = StHelensSearchParser("St Helens", "St Helens", "http://212.248.225.150:8080") - #print parser.getResults(28,3,2007) - #parser = EasingtonSearchParser("Easington", "Easington", "http://planning.easington.gov.uk") - #print parser.getResults(28,3,2007) - #parser = HighPeakSearchParser("High Peak", "High Peak", "http://planning.highpeak.gov.uk") - #print parser.getResults(20,3,2007) - #parser = WearValleySearchParser("Wear Valley", "Wear Valley", "http://planning.wearvalley.gov.uk") - #print parser.getResults(20,3,2007) - #parser = WellingboroughSearchParser("Wellingborough", "Wellingborough", "http://planning.wellingborough.gov.uk") - #print parser.getResults(20,3,2007) - #parser = EalingSearchParser("Ealing", "Ealing", "http://www.pam.ealing.gov.uk") - #print parser.getResults(20,3,2007) - #parser = HaringeySearchParser("Haringey", "Haringey", "http://www.planningservices.haringey.gov.uk") - #print parser.getResults(20,3,2007) - #parser = DenbighshireSearchParser("Denbighshire", "Denbighshire", "http://planning.denbighshire.gov.uk") - #print parser.getResults(20,3,2007) - pass diff --git a/cgi-bin/Aylesbury Vale.cgi b/cgi-bin/Aylesbury Vale.cgi deleted file mode 100644 index 8396d47..0000000 --- a/cgi-bin/Aylesbury Vale.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Aylesbury Vale District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Aylesbury Vale District Council" -authority_short_name = "Aylesbury Vale" -base_url = "http://eplanning.aylesburyvaledc.gov.uk/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Babergh.cgi b/cgi-bin/Babergh.cgi deleted file mode 100644 index 1bbddfe..0000000 --- a/cgi-bin/Babergh.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Babergh District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Babergh District Council" -authority_short_name = "Babergh" -base_url = "http://planning.babergh.gov.uk/dataOnlinePlanning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.BaberghParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Barrow.cgi b/cgi-bin/Barrow.cgi deleted file mode 100644 index 07d07a7..0000000 --- a/cgi-bin/Barrow.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Barrow Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Barrow Borough Council" -authority_short_name = "Barrow" -base_url = "http://localportal.barrowbc.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.BarrowSearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Basildon.cgi b/cgi-bin/Basildon.cgi deleted file mode 100644 index 72056b0..0000000 --- a/cgi-bin/Basildon.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Basildon District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Basildon District Council" -authority_short_name = "Basildon" -base_url = "http://planning.basildon.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Basingstoke and Deane.cgi b/cgi-bin/Basingstoke and Deane.cgi deleted file mode 100644 index 0f22435..0000000 --- a/cgi-bin/Basingstoke and Deane.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Basingstoke and Deane Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Basingstoke and Deane Borough Council" -authority_short_name = "Basingstoke and Deane" -base_url = "http://planning.basingstoke.gov.uk/DCOnline2/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.BasingstokeParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Bassetlaw.cgi b/cgi-bin/Bassetlaw.cgi deleted file mode 100644 index ccb8a15..0000000 --- a/cgi-bin/Bassetlaw.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Bassetlaw District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Bassetlaw District Council" -authority_short_name = "Bassetlaw" -base_url = "http://www.bassetlaw.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.BassetlawParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Bath.cgi b/cgi-bin/Bath.cgi deleted file mode 100644 index befad60..0000000 --- a/cgi-bin/Bath.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Bath and North East Somerset. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Bath and North East Somerset" -authority_short_name = "Bath" -base_url = "http://planning.bathnes.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Bexley.cgi b/cgi-bin/Bexley.cgi deleted file mode 100644 index 5d3dceb..0000000 --- a/cgi-bin/Bexley.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Bexley Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Bexley Council" -authority_short_name = "Bexley" -base_url = "http://publicaccess.bexley.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Blaby.cgi b/cgi-bin/Blaby.cgi deleted file mode 100644 index a2db43e..0000000 --- a/cgi-bin/Blaby.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Blaby District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Blaby District Council" -authority_short_name = "Blaby" -base_url = "http://www.blaby.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Bolsover.cgi b/cgi-bin/Bolsover.cgi deleted file mode 100644 index 27e4e61..0000000 --- a/cgi-bin/Bolsover.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Bolsover District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Bolsover District Council" -authority_short_name = "Bolsover" -base_url = "http://217.158.161.181/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Bracknell Forest.cgi b/cgi-bin/Bracknell Forest.cgi deleted file mode 100755 index 141a7a2..0000000 --- a/cgi-bin/Bracknell Forest.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Bracknell Forest Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Bracknell Forest Borough Council" -authority_short_name = "Bracknell Forest" -base_url = "https://my.bracknell-forest.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Bridgnorth.cgi b/cgi-bin/Bridgnorth.cgi deleted file mode 100755 index cd7847f..0000000 --- a/cgi-bin/Bridgnorth.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Bridgnorth District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Bridgnorth District Council" -authority_short_name = "Bridgnorth" -base_url = "http://www2.bridgnorth-dc.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.PgeSearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.BridgnorthParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Bristol.cgi b/cgi-bin/Bristol.cgi deleted file mode 100644 index 0ce8341..0000000 --- a/cgi-bin/Bristol.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Bristol City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Bristol City Council" -authority_short_name = "Bristol" -base_url = "http://e2eweb.bristol-city.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Broads.cgi b/cgi-bin/Broads.cgi deleted file mode 100755 index f3f0925..0000000 --- a/cgi-bin/Broads.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Broads Authority. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Broads Authority" -authority_short_name = "Broads" -base_url = "https://planning.broads-authority.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Bromley.cgi b/cgi-bin/Bromley.cgi deleted file mode 100755 index 8408d9f..0000000 --- a/cgi-bin/Bromley.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for London Borough of Bromley. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "London Borough of Bromley" -authority_short_name = "Bromley" -base_url = "http://planningaccess.bromley.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Buckinghamshire.cgi b/cgi-bin/Buckinghamshire.cgi deleted file mode 100644 index 0ced796..0000000 --- a/cgi-bin/Buckinghamshire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Buckinghamshire County Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Buckinghamshire County Council" -authority_short_name = "Buckinghamshire" -base_url = "http://www.bucksplanning.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Bury.cgi b/cgi-bin/Bury.cgi deleted file mode 100644 index 5e26c0c..0000000 --- a/cgi-bin/Bury.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Bury Metropolitan Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Bury Metropolitan Borough Council" -authority_short_name = "Bury" -base_url = "http://e-planning.bury.gov.uk/ePlanning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.PgeSearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.BuryParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Caradon.cgi b/cgi-bin/Caradon.cgi deleted file mode 100755 index 38d3ddc..0000000 --- a/cgi-bin/Caradon.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Caradon District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Caradon District Council" -authority_short_name = "Caradon" -base_url = "http://publicaccess.caradon.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Carlisle.cgi b/cgi-bin/Carlisle.cgi deleted file mode 100755 index 932065f..0000000 --- a/cgi-bin/Carlisle.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Carlisle City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Carlisle City Council" -authority_short_name = "Carlisle" -base_url = "http://planning.carlisle.gov.uk/acolnet/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.CarlisleParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Chelmsford.cgi b/cgi-bin/Chelmsford.cgi deleted file mode 100644 index 9bde9f6..0000000 --- a/cgi-bin/Chelmsford.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Chelmsford Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Chelmsford Borough Council" -authority_short_name = "Chelmsford" -base_url = "http://web1.chelmsfordbc.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Cherwell.cgi b/cgi-bin/Cherwell.cgi deleted file mode 100644 index 7ee56aa..0000000 --- a/cgi-bin/Cherwell.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Cherwell District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Cherwell District Council" -authority_short_name = "Cherwell" -base_url = "http://cherweb.cherwell-dc.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Chiltern.cgi b/cgi-bin/Chiltern.cgi deleted file mode 100755 index c4dc480..0000000 --- a/cgi-bin/Chiltern.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Chiltern District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Chiltern District Council" -authority_short_name = "Chiltern" -base_url = "https://isa.chiltern.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Chorley.cgi b/cgi-bin/Chorley.cgi deleted file mode 100644 index f590329..0000000 --- a/cgi-bin/Chorley.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Chorley Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Chorley Borough Council" -authority_short_name = "Chorley" -base_url = "http://planning.chorley.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/City of London.cgi b/cgi-bin/City of London.cgi deleted file mode 100644 index b4b305f..0000000 --- a/cgi-bin/City of London.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for City of London. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "City of London" -authority_short_name = "City of London" -base_url = "http://www.planning.cityoflondon.gov.uk/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Cornwall.cgi b/cgi-bin/Cornwall.cgi deleted file mode 100644 index ff7801b..0000000 --- a/cgi-bin/Cornwall.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Cornwall County Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Cornwall County Council" -authority_short_name = "Cornwall" -base_url = "http://planapps.cornwall.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Coventry.cgi b/cgi-bin/Coventry.cgi deleted file mode 100644 index c9f5413..0000000 --- a/cgi-bin/Coventry.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Coventry City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Coventry City Council" -authority_short_name = "Coventry" -base_url = "http://planning.coventry.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.CoventrySearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Craven.cgi b/cgi-bin/Craven.cgi deleted file mode 100755 index 26cb141..0000000 --- a/cgi-bin/Craven.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Craven District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Craven District Council" -authority_short_name = "Craven" -base_url = "http://www.planning.cravendc.gov.uk/fastweb/" - -#print "Content-Type: text/html" # HTML is following -#print - -import FastWeb - -parser = FastWeb.FastWeb(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Croydon.cgi b/cgi-bin/Croydon.cgi deleted file mode 100755 index 09ae306..0000000 --- a/cgi-bin/Croydon.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for London Borough of Croydon. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "London Borough of Croydon" -authority_short_name = "Croydon" -base_url = "http://planning.croydon.gov.uk/DCWebPages/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.CroydonParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Denbighshire.cgi b/cgi-bin/Denbighshire.cgi deleted file mode 100644 index 4e4c6ef..0000000 --- a/cgi-bin/Denbighshire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Denbighshire County Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Denbighshire County Council" -authority_short_name = "Denbighshire" -base_url = "http://planning.denbighshire.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.DenbighshireSearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Derby.cgi b/cgi-bin/Derby.cgi deleted file mode 100644 index 87a439b..0000000 --- a/cgi-bin/Derby.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Derby City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Derby City Council" -authority_short_name = "Derby" -base_url = "http://195.224.106.204/scripts/planningpages02%5CXSLPagesDC_DERBY%5CDCWebPages/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.DerbyParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Doncaster.cgi b/cgi-bin/Doncaster.cgi deleted file mode 100644 index d66c155..0000000 --- a/cgi-bin/Doncaster.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Doncaster Metropolitan Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Doncaster Metropolitan Borough Council" -authority_short_name = "Doncaster" -base_url = "http://local.doncaster.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Dundee.cgi b/cgi-bin/Dundee.cgi deleted file mode 100644 index 150db95..0000000 --- a/cgi-bin/Dundee.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Dundee City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Dundee City Council" -authority_short_name = "Dundee" -base_url = "http://bwarrant.dundeecity.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Durham.cgi b/cgi-bin/Durham.cgi deleted file mode 100644 index f6d6341..0000000 --- a/cgi-bin/Durham.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Durham City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Durham City Council" -authority_short_name = "Durham" -base_url = "http://publicaccess.durhamcity.gov.uk/publicaccess/dc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Ealing.cgi b/cgi-bin/Ealing.cgi deleted file mode 100644 index a784ff5..0000000 --- a/cgi-bin/Ealing.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Ealing Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Ealing Council" -authority_short_name = "Ealing" -base_url = "http://www.pam.ealing.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.EalingSearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Easington.cgi b/cgi-bin/Easington.cgi deleted file mode 100644 index 5932476..0000000 --- a/cgi-bin/Easington.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for District of Easington. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "District of Easington" -authority_short_name = "Easington" -base_url = "http://planning.easington.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.EasingtonSearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/East Devon.cgi b/cgi-bin/East Devon.cgi deleted file mode 100644 index 45651a4..0000000 --- a/cgi-bin/East Devon.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for East Devon District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "East Devon District Council" -authority_short_name = "East Devon" -base_url = "http://planning.eastdevon.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/East Dorset.cgi b/cgi-bin/East Dorset.cgi deleted file mode 100755 index 41fdc72..0000000 --- a/cgi-bin/East Dorset.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for East Dorset District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "East Dorset District Council" -authority_short_name = "East Dorset" -base_url = "http://193.243.228.16/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/East Lindsey.cgi b/cgi-bin/East Lindsey.cgi deleted file mode 100644 index a34054c..0000000 --- a/cgi-bin/East Lindsey.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for East Lindsey District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "East Lindsey District Council" -authority_short_name = "East Lindsey" -base_url = "http://www.e-lindsey.gov.uk/planning/AcolnetCGI.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.EastLindseyParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Eastleigh.cgi b/cgi-bin/Eastleigh.cgi deleted file mode 100755 index 6047701..0000000 --- a/cgi-bin/Eastleigh.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Eastleigh Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Eastleigh Borough Council" -authority_short_name = "Eastleigh" -base_url = "http://www.eastleigh.gov.uk/FastWEB/" - -#print "Content-Type: text/html" # HTML is following -#print - -import FastWeb - -parser = FastWeb.FastWeb(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Eden.cgi b/cgi-bin/Eden.cgi deleted file mode 100755 index bdb930e..0000000 --- a/cgi-bin/Eden.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Eden District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Eden District Council" -authority_short_name = "Eden" -base_url = "http://eforms.eden.gov.uk/fastweb/" - -#print "Content-Type: text/html" # HTML is following -#print - -import FastWeb - -parser = FastWeb.FastWeb(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Edinburgh.cgi b/cgi-bin/Edinburgh.cgi deleted file mode 100644 index 2796e49..0000000 --- a/cgi-bin/Edinburgh.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for The City of Edinburgh Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "The City of Edinburgh Council" -authority_short_name = "Edinburgh" -base_url = "http://citydev-portal.edinburgh.gov.uk/publicaccess/dc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Epsom and Ewell.cgi b/cgi-bin/Epsom and Ewell.cgi deleted file mode 100644 index a69174d..0000000 --- a/cgi-bin/Epsom and Ewell.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Epsom and Ewell Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Epsom and Ewell Borough Council" -authority_short_name = "Epsom and Ewell" -base_url = "http://eplanning.epsom-ewell.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/FastWeb.py b/cgi-bin/FastWeb.py deleted file mode 100644 index 508d893..0000000 --- a/cgi-bin/FastWeb.py +++ /dev/null @@ -1,207 +0,0 @@ - -import urllib2 -import HTMLParser -import urlparse -import datetime - -from PlanningUtils import getPostcodeFromText, PlanningAuthorityResults, PlanningApplication - -# example url -# http://www.planning.cravendc.gov.uk/fastweb/results.asp?Scroll=1&DateReceivedStart=1%2F1%2F2007&DateReceivedEnd=1%2F7%2F2007 - -search_form_url_end = "results.asp?Scroll=%(scroll)d&DateReceivedStart=%(day)d%%2F%(month)d%%2F%(year)d&DateReceivedEnd=%(day)d%%2F%(month)d%%2F%(year)d" - -# for testing paging -#search_form_url_end = "results.asp?Scroll=%(scroll)d&DateReceivedStart=10%%2F7%%2F2007&DateReceivedEnd=%(day)d%%2F%(month)d%%2F%(year)d" - -comment_url_end = "comment.asp?AltRef=%s" -info_url_end = "detail.asp?AltRef=%s" - -class FastWeb: - def __init__(self, - authority_name, - authority_short_name, - base_url, - debug=False): - - self.authority_name = authority_name - self.authority_short_name = authority_short_name - self.base_url = base_url - - self.debug = debug - - # The object which stores our set of planning application results - self._results = PlanningAuthorityResults(self.authority_name, self.authority_short_name) - - def getResultsByDayMonthYear(self, day, month, year): - requested_date = datetime.date(year, month, day) - - # What we should do: - - #1) Work out if the page we get back is a results page or the search page again. The search page indicates no results for this day. - - # Assuming we have a results page: - #2) Get the total number of results out of it. We can use this to work out how many times we need to request the page, and with what scroll numbers - - #3) Iterate over scroll numbers. - - scroll = 0 - first_time = True - number_of_results = 0 - - while first_time or scroll * 20 < number_of_results: - scroll += 1 - - this_search_url = search_form_url_end %{"scroll":scroll, "day":day, "month":month, "year":year} - url = urlparse.urljoin(self.base_url, this_search_url) - response = urllib2.urlopen(url) - - contents = response.read() - - if first_time: - # We can now use the returned URL to tell us if there were no results. - returned_url = response.geturl() - - # example URL of no results page - # http://www.planning.cravendc.gov.uk/fastweb/search.asp?Results=none& - if returned_url.count("search.asp"): - # We got back the search page, there were no results for this date - break - - results_page_parser = FastWebResultsPageParser(self._results, requested_date, self.base_url) - results_page_parser.feed(contents) - - if first_time: - number_of_results += results_page_parser.number_of_results - - first_time = False - - return self._results - - def getResults(self, day, month, year): - return self.getResultsByDayMonthYear(int(day), int(month), int(year)).displayXML() - - - -# States - -STARTING = 1 -GOT_RESULTS_COUNT = 2 -IN_RESULTS_TABLE = 3 -IN_RESULTS_TABLE_TD = 4 -IN_INNER_TABLE = 5 -FINISHED = -1 - - -class FastWebResultsPageParser(HTMLParser.HTMLParser): - def __init__(self, results, requested_date, base_url): - - self.results = results - - self.requested_date = requested_date - self.base_url = base_url - - - HTMLParser.HTMLParser.__init__(self) - - # We'll use this to store the number of results returned for this search - self.number_of_results = None - - self._state = STARTING - self._td_count = None - - self._data_list = [] - - # This will store the planning application we are currently working on. - self._current_application = None - - def get_data(self, flush=True): - data = " ".join(self._data_list) - - if flush: - self.flush_data() - - return data - - def flush_data(self): - self._data_list = [] - - def handle_starttag(self, tag, attrs): - if self._state == STARTING and tag == "input": - self._state = GOT_RESULTS_COUNT - - # This is where the number of results returned is stored - attr_dict = {} - - for attr_name, attr_value in attrs: - attr_dict[attr_name] = attr_value - - if attr_dict.get("id") == "RecCount": - self.number_of_results = int(attr_dict.get("value")) - - elif self._state == GOT_RESULTS_COUNT and tag == "table": - self._state = IN_RESULTS_TABLE - - elif self._state == IN_RESULTS_TABLE and tag == "td": - self._state = IN_RESULTS_TABLE_TD - elif self._state == IN_RESULTS_TABLE_TD and tag == "table": - self._state = IN_INNER_TABLE - self._td_count = 0 - self._current_application = PlanningApplication() - self._current_application.date_received = self.requested_date - - elif self._state == IN_INNER_TABLE and tag == "td": - self._td_count += 1 - self.flush_data() - - def handle_endtag(self, tag): - if self._state == IN_INNER_TABLE and tag == "table": - # The next if should never be false, but it pays to be careful :-) - if self._current_application.council_reference is not None: - self.results.addApplication(self._current_application) - self._state = IN_RESULTS_TABLE_TD - - elif self._state == IN_RESULTS_TABLE_TD and tag == "td": - self._state = FINISHED - - elif self._state == IN_INNER_TABLE and tag == "td": - if self._td_count == 2: - # This data is the App No. - council_reference = self.get_data().strip() - self._current_application.council_reference = council_reference - - # This also gives us everything we need for the info and comment urls - self._current_application.info_url = urlparse.urljoin(self.base_url, info_url_end %(council_reference)) - self._current_application.comment_url = urlparse.urljoin(self.base_url, comment_url_end %(council_reference)) - - elif self._td_count == 4: - # This data is the address - self._current_application.address = self.get_data().strip() - self._current_application.postcode = getPostcodeFromText(self._current_application.address) - elif self._td_count == 7: - # This data is the description - self._current_application.description = self.get_data().strip() - - - def handle_data(self, data): - self._data_list.append(data) - - - -# for debug purposes - -#cravenparser = FastWeb("Craven District Council", "Craven", "http://www.planning.cravendc.gov.uk/fastweb/") - -#eastleighparser = FastWeb("EastLeigh Borough Council", "Eastleigh", "http://www.eastleigh.gov.uk/FastWEB/") - - -#suttonparser = FastWeb("Sutton", "Sutton", "http://82.43.4.135/FASTWEB/") - -#print eastleighparser.getResults(10,8,2007) -#print cravenparser.getResults(25,12,2006) -#print suttonparser.getResults(10,8,2007) - -#south_lakeland_parser = FastWeb("South Lakeland", "South Lakeland", "http://www.southlakeland.gov.uk/fastweb/") - -#print south_lakeland_parser.getResults(27,11,2006) - diff --git a/cgi-bin/Fenland.cgi b/cgi-bin/Fenland.cgi deleted file mode 100644 index 3b60b73..0000000 --- a/cgi-bin/Fenland.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Fenland District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Fenland District Council" -authority_short_name = "Fenland" -base_url = "http://www.fenland.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Fylde.cgi b/cgi-bin/Fylde.cgi deleted file mode 100755 index 4048088..0000000 --- a/cgi-bin/Fylde.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Fylde Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Fylde Borough Council" -authority_short_name = "Fylde" -base_url = "http://www2.fylde.gov.uk/planning/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.FyldeParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Gateshead.cgi b/cgi-bin/Gateshead.cgi deleted file mode 100755 index 4037705..0000000 --- a/cgi-bin/Gateshead.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Gateshead Metropolitan Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Gateshead Metropolitan Borough Council" -authority_short_name = "Gateshead" -base_url = "http://planning.gateshead.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Gedling.cgi b/cgi-bin/Gedling.cgi deleted file mode 100644 index c612988..0000000 --- a/cgi-bin/Gedling.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Gedling Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Gedling Borough Council" -authority_short_name = "Gedling" -base_url = "http://publicaccess.gedling.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Gloucestershire.cgi b/cgi-bin/Gloucestershire.cgi deleted file mode 100755 index d5732c7..0000000 --- a/cgi-bin/Gloucestershire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Gloucestershire County Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Gloucestershire County Council" -authority_short_name = "Gloucestershire" -base_url = "http://planning.gloucestershire.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Gravesham.cgi b/cgi-bin/Gravesham.cgi deleted file mode 100644 index a576a58..0000000 --- a/cgi-bin/Gravesham.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Gravesham Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Gravesham Borough Council" -authority_short_name = "Gravesham" -base_url = "http://195.102.67.4/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Hambleton.cgi b/cgi-bin/Hambleton.cgi deleted file mode 100755 index 8221dec..0000000 --- a/cgi-bin/Hambleton.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Hambleton District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Hambleton District Council" -authority_short_name = "Hambleton" -base_url = "http://planning.hambleton.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Hammersmith and Fulham.cgi b/cgi-bin/Hammersmith and Fulham.cgi deleted file mode 100644 index cce92a9..0000000 --- a/cgi-bin/Hammersmith and Fulham.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for London Borough Of Hammersmith and Fulham. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "London Borough Of Hammersmith and Fulham" -authority_short_name = "Hammersmith and Fulham" -base_url = "http://www.apps.lbhf.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Haringey.cgi b/cgi-bin/Haringey.cgi deleted file mode 100644 index 89fd0a4..0000000 --- a/cgi-bin/Haringey.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Haringey Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Haringey Council" -authority_short_name = "Haringey" -base_url = "http://www.planningservices.haringey.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.HaringeySearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Harlow.cgi b/cgi-bin/Harlow.cgi deleted file mode 100644 index db5c0b1..0000000 --- a/cgi-bin/Harlow.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Harlow Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Harlow Council" -authority_short_name = "Harlow" -base_url = "http://planning.harlow.gov.uk/PlanningSearch/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.HarlowParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Harrogate.cgi b/cgi-bin/Harrogate.cgi deleted file mode 100644 index 7cb90d0..0000000 --- a/cgi-bin/Harrogate.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Harrogate Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Harrogate Borough Council" -authority_short_name = "Harrogate" -base_url = "http://publicaccess.harrogate.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Hart.cgi b/cgi-bin/Hart.cgi deleted file mode 100644 index ca65fc1..0000000 --- a/cgi-bin/Hart.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Hart District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Hart District Council" -authority_short_name = "Hart" -base_url = "http://publicaccess.hart.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Hartlepool.cgi b/cgi-bin/Hartlepool.cgi deleted file mode 100644 index 540d96f..0000000 --- a/cgi-bin/Hartlepool.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Hartlepool Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Hartlepool Borough Council" -authority_short_name = "Hartlepool" -base_url = "http://eforms.hartlepool.gov.uk:7777/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.HartlepoolSearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Hertsmere.cgi b/cgi-bin/Hertsmere.cgi deleted file mode 100644 index 0c0cfb9..0000000 --- a/cgi-bin/Hertsmere.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Hertsmere Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Hertsmere Borough Council" -authority_short_name = "Hertsmere" -base_url = "http://www2.hertsmere.gov.uk/ACOLNET/DCOnline//acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.HertsmereParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/High Peak.cgi b/cgi-bin/High Peak.cgi deleted file mode 100644 index 4220a8c..0000000 --- a/cgi-bin/High Peak.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for High Peak Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "High Peak Borough Council" -authority_short_name = "High Peak" -base_url = "http://planning.highpeak.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.HighPeakSearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Hinkley and Bosworth.cgi b/cgi-bin/Hinkley and Bosworth.cgi deleted file mode 100755 index 751287d..0000000 --- a/cgi-bin/Hinkley and Bosworth.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Hinkley and Bosworth Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Hinkley and Bosworth Borough Council" -authority_short_name = "Hinkley and Bosworth" -base_url = "https://cx.hinckley-bosworth.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Huntingdonshire.cgi b/cgi-bin/Huntingdonshire.cgi deleted file mode 100644 index c737902..0000000 --- a/cgi-bin/Huntingdonshire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Huntingdonshire District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Huntingdonshire District Council" -authority_short_name = "Huntingdonshire" -base_url = "http://planning.huntsdc.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Kerrier.cgi b/cgi-bin/Kerrier.cgi deleted file mode 100644 index 92f587e..0000000 --- a/cgi-bin/Kerrier.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Kerrier District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Kerrier District Council" -authority_short_name = "Kerrier" -base_url = "http://publicaccess.kerrier.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Knowsley.cgi b/cgi-bin/Knowsley.cgi deleted file mode 100644 index fcd7375..0000000 --- a/cgi-bin/Knowsley.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Knowsley Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Knowsley Council" -authority_short_name = "Knowsley" -base_url = "http://publicaccess.knowsley.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Lancaster.cgi b/cgi-bin/Lancaster.cgi deleted file mode 100644 index de817d1..0000000 --- a/cgi-bin/Lancaster.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Lancaster City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Lancaster City Council" -authority_short_name = "Lancaster" -base_url = "http://planapps.lancaster.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Lewisham.cgi b/cgi-bin/Lewisham.cgi deleted file mode 100755 index baddf8d..0000000 --- a/cgi-bin/Lewisham.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for London Borough of Lewisham. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "London Borough of Lewisham" -authority_short_name = "Lewisham" -base_url = "http://acolnet.lewisham.gov.uk/lewis-xslpagesdc/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.PgeSearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.LewishamParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Luton.cgi b/cgi-bin/Luton.cgi deleted file mode 100644 index e0d529a..0000000 --- a/cgi-bin/Luton.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Luton Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Luton Borough Council" -authority_short_name = "Luton" -base_url = "http://www.eplan.luton.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Malvern Hills.cgi b/cgi-bin/Malvern Hills.cgi deleted file mode 100644 index 9292df6..0000000 --- a/cgi-bin/Malvern Hills.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Malvern Hills District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Malvern Hills District Council" -authority_short_name = "Malvern Hills" -base_url = "http://public.malvernhills.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Manchester.cgi b/cgi-bin/Manchester.cgi deleted file mode 100644 index 1c3c548..0000000 --- a/cgi-bin/Manchester.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Manchester City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Manchester City Council" -authority_short_name = "Manchester" -base_url = "http://www.publicaccess.manchester.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Mansfield.cgi b/cgi-bin/Mansfield.cgi deleted file mode 100755 index fbb227c..0000000 --- a/cgi-bin/Mansfield.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Mansfield District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Mansfield District Council" -authority_short_name = "Mansfield" -base_url = "http://www.mansfield.gov.uk/Fastweb23/" - -#print "Content-Type: text/html" # HTML is following -#print - -import FastWeb - -parser = FastWeb.FastWeb(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Mid Devon.cgi b/cgi-bin/Mid Devon.cgi deleted file mode 100644 index 9d54e5a..0000000 --- a/cgi-bin/Mid Devon.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Mid Devon District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Mid Devon District Council" -authority_short_name = "Mid Devon" -base_url = "http://planning.middevon.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Milton Keynes.cgi b/cgi-bin/Milton Keynes.cgi deleted file mode 100644 index b37904b..0000000 --- a/cgi-bin/Milton Keynes.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Milton Keynes Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Milton Keynes Council" -authority_short_name = "Milton Keynes" -base_url = "http://publicaccess.milton-keynes.gov.uk/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Moray.cgi b/cgi-bin/Moray.cgi deleted file mode 100755 index 4514ab9..0000000 --- a/cgi-bin/Moray.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Moray Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Moray Council" -authority_short_name = "Moray" -base_url = "http://public.moray.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/MultipartPostHandler.py b/cgi-bin/MultipartPostHandler.py deleted file mode 100644 index c427613..0000000 --- a/cgi-bin/MultipartPostHandler.py +++ /dev/null @@ -1,133 +0,0 @@ -#### -# 02/2006 Will Holcomb -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# - -# I have edited out a bit in the middle of this which reverts to a normal -# post with "application/x-www-form-urlencoded" content-type when there are -# no files. -# Duncan 5/5/2007 - -""" -Usage: - Enables the use of multipart/form-data for posting forms - -Inspirations: - Upload files in python: - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306 - urllib2_file: - Fabien Seisen: - -Example: - import MultipartPostHandler, urllib2, cookielib - - cookies = cookielib.CookieJar() - opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookies), - MultipartPostHandler.MultipartPostHandler) - params = { "username" : "bob", "password" : "riviera", - "file" : open("filename", "rb") } - opener.open("http://wwww.bobsite.com/upload/", params) - -Further Example: - The main function of this file is a sample which downloads a page and - then uploads it to the W3C validator. -""" - -import urllib -import urllib2 -import mimetools, mimetypes -import os, stat - -class Callable: - def __init__(self, anycallable): - self.__call__ = anycallable - -# Controls how sequences are uncoded. If true, elements may be given multiple values by -# assigning a sequence. -doseq = 1 - -class MultipartPostHandler(urllib2.BaseHandler): - handler_order = urllib2.HTTPHandler.handler_order - 10 # needs to run first - - def http_request(self, request): - data = request.get_data() - if data is not None and type(data) != str: - v_files = [] - v_vars = [] - try: - for(key, value) in data.items(): - if type(value) == file: - v_files.append((key, value)) - else: - v_vars.append((key, value)) - except TypeError: - systype, value, traceback = sys.exc_info() - raise TypeError, "not a valid non-string sequence or mapping object", traceback - - boundary, data = self.multipart_encode(v_vars, v_files) - contenttype = 'multipart/form-data; boundary=%s' % boundary - if(request.has_header('Content-Type') - and request.get_header('Content-Type').find('multipart/form-data') != 0): - print "Replacing %s with %s" % (request.get_header('content-type'), 'multipart/form-data') - request.add_unredirected_header('Content-Type', contenttype) - - request.add_data(data) - return request - - def multipart_encode(vars, files, boundary = None, buffer = None): - if boundary is None: - boundary = mimetools.choose_boundary() - if buffer is None: - buffer = '' - for(key, value) in vars: - buffer += '--%s\r\n' % boundary - buffer += 'Content-Disposition: form-data; name="%s"' % key - buffer += '\r\n\r\n' + value + '\r\n' - for(key, fd) in files: - file_size = os.fstat(fd.fileno())[stat.ST_SIZE] - filename = fd.name.split('/')[-1] - contenttype = mimetypes.guess_type(filename)[0] or 'application/octet-stream' - buffer += '--%s\r\n' % boundary - buffer += 'Content-Disposition: form-data; name="%s"; filename="%s"\r\n' % (key, filename) - buffer += 'Content-Type: %s\r\n' % contenttype - # buffer += 'Content-Length: %s\r\n' % file_size - fd.seek(0) - buffer += '\r\n' + fd.read() + '\r\n' - buffer += '--%s--\r\n\r\n' % boundary - return boundary, buffer - multipart_encode = Callable(multipart_encode) - - https_request = http_request - -## def main(): -## import tempfile, sys - -## validatorURL = "http://validator.w3.org/check" -## opener = urllib2.build_opener(MultipartPostHandler) - -## def validateFile(url): -## temp = tempfile.mkstemp(suffix=".html") -## os.write(temp[0], opener.open(url).read()) -## params = { "ss" : "0", # show source -## "doctype" : "Inline", -## "uploaded_file" : open(temp[1], "rb") } -## print opener.open(validatorURL, params).read() -## os.remove(temp[1]) - -## if len(sys.argv[1:]) > 0: -## for arg in sys.argv[1:]: -## validateFile(arg) -## else: -## validateFile("http://www.google.com") - -## if __name__=="__main__": -## main() diff --git a/cgi-bin/NW Leicestershire.cgi b/cgi-bin/NW Leicestershire.cgi deleted file mode 100644 index c653c9d..0000000 --- a/cgi-bin/NW Leicestershire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for North West Leicestershire District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "North West Leicestershire District Council" -authority_short_name = "NW Leicestershire" -base_url = "http://paccess.nwleics.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/New Forest DC.cgi b/cgi-bin/New Forest DC.cgi deleted file mode 100755 index 43bf326..0000000 --- a/cgi-bin/New Forest DC.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for New Forest District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "New Forest District Council" -authority_short_name = "New Forest DC" -base_url = "http://web3.newforest.gov.uk/planningonline/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.NewForestDCParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/New Forest NP.cgi b/cgi-bin/New Forest NP.cgi deleted file mode 100755 index f55b029..0000000 --- a/cgi-bin/New Forest NP.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for New Forest National Park. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "New Forest National Park" -authority_short_name = "New Forest NP" -base_url = "http://web01.newforestnpa.gov.uk/planningpages/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.NewForestNPParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Newcastle-under-Lyme.cgi b/cgi-bin/Newcastle-under-Lyme.cgi deleted file mode 100755 index ff1f8b3..0000000 --- a/cgi-bin/Newcastle-under-Lyme.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Newcastle-under-Lyme Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Newcastle-under-Lyme Borough Council" -authority_short_name = "Newcastle-under-Lyme" -base_url = "http://publicaccess.newcastle-staffs.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Newcastle.cgi b/cgi-bin/Newcastle.cgi deleted file mode 100644 index feb7a42..0000000 --- a/cgi-bin/Newcastle.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Newcastle City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Newcastle City Council" -authority_short_name = "Newcastle" -base_url = "http://gispublic.newcastle.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Newham.cgi b/cgi-bin/Newham.cgi deleted file mode 100644 index d6c4e87..0000000 --- a/cgi-bin/Newham.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for London Borough Of Newham. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "London Borough Of Newham" -authority_short_name = "Newham" -base_url = "http://pacaps.newham.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/North Hertfordshire.cgi b/cgi-bin/North Hertfordshire.cgi deleted file mode 100755 index d4e3fbd..0000000 --- a/cgi-bin/North Hertfordshire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for North Hertfordshire District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "North Hertfordshire District Council" -authority_short_name = "North Hertfordshire" -base_url = "http://www.north-herts.gov.uk/dcdataonline/Pages/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.PgeSearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.NorthHertfordshireParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/North Tyneside.cgi b/cgi-bin/North Tyneside.cgi deleted file mode 100644 index 978b96c..0000000 --- a/cgi-bin/North Tyneside.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for North Tyneside Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "North Tyneside Council" -authority_short_name = "North Tyneside" -base_url = "http://publicaccess.northtyneside.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/North Warwickshire.cgi b/cgi-bin/North Warwickshire.cgi deleted file mode 100644 index 2d5d86f..0000000 --- a/cgi-bin/North Warwickshire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for North Warwickshire Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "North Warwickshire Borough Council" -authority_short_name = "North Warwickshire" -base_url = "http://planning.northwarks.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.NorthWarksSearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/North Wiltshire.cgi b/cgi-bin/North Wiltshire.cgi deleted file mode 100644 index 063bd15..0000000 --- a/cgi-bin/North Wiltshire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for North Wiltshire District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "North Wiltshire District Council" -authority_short_name = "North Wiltshire" -base_url = "http://planning.northwilts.gov.uk/DCOnline/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.NorthWiltshireParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Northumberland.cgi b/cgi-bin/Northumberland.cgi deleted file mode 100644 index 159ec3b..0000000 --- a/cgi-bin/Northumberland.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Northumberland County Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Northumberland County Council" -authority_short_name = "Northumberland" -base_url = "http://planning.northumberland.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Oadby and Wigston.cgi b/cgi-bin/Oadby and Wigston.cgi deleted file mode 100644 index 571580f..0000000 --- a/cgi-bin/Oadby and Wigston.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for The Borough of Oadby and Wigston. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "The Borough of Oadby and Wigston" -authority_short_name = "Oadby and Wigston" -base_url = "http://web.owbc.net/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Oldham.cgi b/cgi-bin/Oldham.cgi deleted file mode 100755 index d0e2b79..0000000 --- a/cgi-bin/Oldham.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Oldham District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Oldham District Council" -authority_short_name = "Oldham" -base_url = "http://planning.oldham.gov.uk/planning//acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.OldhamParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Oswestry.cgi b/cgi-bin/Oswestry.cgi deleted file mode 100644 index 126e0f4..0000000 --- a/cgi-bin/Oswestry.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Oswestry Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Oswestry Borough Council" -authority_short_name = "Oswestry" -base_url = "http://193.114.205.78/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Perthshire.cgi b/cgi-bin/Perthshire.cgi deleted file mode 100755 index 6171290..0000000 --- a/cgi-bin/Perthshire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Perth and Kinross Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Perth and Kinross Council" -authority_short_name = "Perthshire" -base_url = "http://193.63.61.22/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Peterborough.cgi b/cgi-bin/Peterborough.cgi deleted file mode 100644 index 14387ee..0000000 --- a/cgi-bin/Peterborough.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Peterborough City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Peterborough City Council" -authority_short_name = "Peterborough" -base_url = "http://194.72.246.15/publicaccess/dc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/PlanningUtils.py b/cgi-bin/PlanningUtils.py deleted file mode 100644 index 9210446..0000000 --- a/cgi-bin/PlanningUtils.py +++ /dev/null @@ -1,102 +0,0 @@ -__auth__ = None - -import re - -date_format = "%d/%m/%Y" - - -def xmlQuote(text): - # Change &s to &s - # I suspect there is probably some standard python - # function I should be using for this... - return text.replace('&', '&') - -def fixNewlines(text): - # This can be used to sort out windows newlines - return text.replace("\r\n","\n") - -# So what can a postcode look like then? -# This list of formats comes from http://www.mailsorttechnical.com/frequentlyaskedquestions.cfm -#AN NAA M1 1AA -#ANN NAA M60 1NW -#AAN NAA CR2 6XH -#AANN NAA DN55 1PT -#ANA NAA W1A 1HP -#AANA NAA EC1A 1BB - -postcode_regex = re.compile("[A-Z][A-Z]?\d(\d|[A-Z])? ?\d[A-Z][A-Z]") - -def getPostcodeFromText(text): - """This function takes a piece of text and returns the first - bit of it that looks like a postcode.""" - - postcode_match = postcode_regex.search(text) - - if postcode_match is not None: - return postcode_match.group() - - -class PlanningAuthorityResults: - """This class represents a set of results of a planning search. - - This should probably be separated out so that it can be used for - authorities other than Cherwell. - """ - - def __init__(self, authority_name, authority_short_name): - self.authority_name = authority_name - self.authority_short_name = authority_short_name - - # this will be a list of PlanningApplication objects - self.planning_applications = [] - - - def addApplication(self, application): - self.planning_applications.append(application) - - def __repr__(self): - return self.displayXML() - - def displayXML(self): - """This should display the contents of this object in the planningalerts format. - i.e. in the same format as this one: - http://www.planningalerts.com/lambeth.xml - """ - - applications_bit = "".join([x.displayXML() for x in self.planning_applications]) - - return "\n" +\ - "%s\n" %self.authority_name +\ - "%s\n" %self.authority_short_name +\ - "\n" + applications_bit +\ - "\n" +\ - "\n" - - - -class PlanningApplication: - def __init__(self, no_postcode_default='No postcode'): - self.council_reference = None - self.address = None - self.postcode = no_postcode_default - self.description = None - self.info_url = None - self.comment_url = None - - # expecting this as a datetime.date object - self.date_received = None - - def __repr__(self): - return self.displayXML() - - def displayXML(self): - #print self.council_reference, self.address, self.postcode, self.description, self.info_url, self.comment_url, self.date_received - return "\n" +\ - "%s\n" %xmlQuote(self.council_reference) +\ - "
%s
\n" %xmlQuote(self.address) +\ - "%s\n" %self.postcode +\ - "%s\n" %xmlQuote(self.description) +\ - "%s\n" %xmlQuote(self.info_url) +\ - "%s\n" %xmlQuote(self.comment_url) +\ - "%s\n" %self.date_received.strftime(date_format) +\ - "
\n" diff --git a/cgi-bin/Portsmouth.cgi b/cgi-bin/Portsmouth.cgi deleted file mode 100644 index c6d38f3..0000000 --- a/cgi-bin/Portsmouth.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Portsmouth City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Portsmouth City Council" -authority_short_name = "Portsmouth" -base_url = "http://planning.portsmouth.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/PublicAccess.py b/cgi-bin/PublicAccess.py deleted file mode 100644 index 5f82ba9..0000000 --- a/cgi-bin/PublicAccess.py +++ /dev/null @@ -1,351 +0,0 @@ -#!/usr/local/bin/python - -import urllib, urllib2 -import HTMLParser -import urlparse -import datetime, time - -import cookielib - -cookie_jar = cookielib.CookieJar() - - -from PlanningUtils import fixNewlines, getPostcodeFromText, PlanningAuthorityResults, PlanningApplication - - -search_form_url_end = "DcApplication/application_searchform.aspx" -search_results_url_end = "DcApplication/application_searchresults.aspx" -comments_url_end = "DcApplication/application_comments_entryform.aspx" - -class PublicAccessParser(HTMLParser.HTMLParser): - """This is the class which parses the PublicAccess search results page. - """ - - def __init__(self, - authority_name, - authority_short_name, - base_url, - debug=False): - - HTMLParser.HTMLParser.__init__(self) - - self.authority_name = authority_name - self.authority_short_name = authority_short_name - self.base_url = base_url - - self.debug = debug - - # this will change to True when we enter the table of results - self._in_results_table = False - - # this will be set to True when we have passed the header row - # in the results table - self._past_header_row = False - - # this will be true when we are in a in the results table - self._in_td = False - - # For each row, this will say how many tds we have seen so far - self._td_count = 0 - - # The object which stores our set of planning application results - self._results = PlanningAuthorityResults(self.authority_name, self.authority_short_name) - - # This will store the planning application we are currently working on. - self._current_application = None - - def handle_starttag(self, tag, attrs): - if tag == "table": - self.handle_start_table(attrs) - # we are only interested in tr tags if we are in the results table - elif self._in_results_table and tag == "tr": - self.handle_start_tr(attrs) - # we are only interested in td tags if we are in the results table - elif self._in_results_table and tag == "td": - self.handle_start_td(attrs) - # we are only interested in tags if we are in the 6th td in - # the results table. - # UPDATE: It seems that, in the case of Chiltern, we are interested in - # td 5. - elif self._in_td and (self._td_count == 5 or self._td_count == 6) and tag == "a": - self.handle_start_a(attrs) - # If the tag is not one of these then we aren't interested - - def handle_endtag(self, tag): - # we only need to consider end tags if we are in the results table - if self._in_results_table: - if tag == "table": - self.handle_end_table() - if tag == "tr": - self.handle_end_tr() - if tag == "td": - self.handle_end_td() - - def handle_start_table(self, attrs): - for attr,value in attrs: - if attr == "class": - if value == "cResultsForm": - self._in_results_table = True - break - - def handle_end_table(self): - # If we see an end table tag, then note that we have left the - # results table. This method is only called if we are in that table. - self._in_results_table = False - - - def handle_start_tr(self, attrs): - # The first tr we meet in the results table is just headers - # We will set a flag at the end of that tr to avoid creating - # a blank PlanningApplication - if self._past_header_row: - # Create a candidate result object - self._current_application = PlanningApplication() - self._td_count = 0 - - def handle_end_tr(self): - # If we are in the results table, and not finishing the header row - # append the current result to the results list. - if self._past_header_row: - self._results.addApplication(self._current_application) - else: - # The first row of the results table is headers - # We want to do nothing until after it - self._past_header_row = True - - def handle_start_td(self, attrs): - # increase the td count by one - self._td_count += 1 - - # note that we are now in a td - self._in_td = True - - def handle_end_td(self): - # note that we are now not in a td - self._in_td = False - - def handle_start_a(self, attrs): - # this method is only getting called if we are in the - # 6th td of a non-header row of the results table. - - # go through the attributes of the looking for one - # named 'href' - for attr,value in attrs: - if attr == "href": - # the value of this tag is a relative url. - # parse it so we can get the query string from it - parsed_info_url = urlparse.urlparse(value) - - # the 4th part of the tuple is the query string - query_string = parsed_info_url[4] - - # join this query string to the search URL, and store this as - # the info URL of the current planning application - self._current_application.info_url = urlparse.urljoin(self.base_url, value) - - # Join this query string to the comments URL, and store this as - # the comments URL of the current planning application - comments_url = urlparse.urljoin(self.base_url, comments_url_end) - self._current_application.comment_url = "?".join([comments_url, query_string]) - - # while we're here, let's follow some links to find the postcode... - # the postcode is in an input tag in the property page. This page - # can be found by following the info url. - # The newlines in the info page need fixing. - info_file_contents = fixNewlines(urllib2.urlopen(self._current_application.info_url).read()) - - info_file_parser = PublicAccessInfoPageParser() - info_file_parser.feed(info_file_contents) - - property_page_url = urlparse.urljoin(self._current_application.info_url, info_file_parser.property_page_url) - - # the newlines in this page need fixing - property_file_contents = fixNewlines(urllib2.urlopen(property_page_url).read()) - - property_file_parser = PublicAccessPropertyPageParser() - property_file_parser.feed(property_file_contents) - - # Set the postcode on the current planning application from the - # one found on the property page - if property_file_parser.postcode is not None: - self._current_application.postcode = property_file_parser.postcode - else: - # If there is no postcode in here, then we'll have to make do with regexing one out of the address. - self._current_application.postcode = getPostcodeFromText(self._current_application.address) - - # There is no need for us to look at any more attributes. - break - - - def handle_data(self, data): - if self._in_td: - # The first td contains the reference - if self._td_count == 1: - self._current_application.council_reference = data - - # The second td contains the date the application was received - elif self._td_count == 2: - year, month, day = time.strptime(data, "%d/%m/%Y")[:3] - received_date = datetime.date(year, month, day) - - self._current_application.date_received = received_date - - # The third td contains the address - elif self._td_count == 3: - #data = data.replace("^M","\n") - self._current_application.address = data - - # The fourth td contains the description - elif self._td_count == 4: - self._current_application.description = data - # 5 is status - we don't need it. - # 6 is a button - this is where we will get our postcode, - # comment_url, and info_url from (when handling the tag). - - - def getResultsByDayMonthYear(self, day, month, year): - # First download the search form (in order to get a session cookie - search_form_request = urllib2.Request(urlparse.urljoin(self.base_url, search_form_url_end)) - search_form_response = urllib2.urlopen(search_form_request) - - cookie_jar.extract_cookies(search_form_response, search_form_request) - - - # We are only doing this first search in order to get a cookie - # The paging on the site doesn't work with cookies turned off. - - search_data1 = urllib.urlencode({"searchType":"ADV", - "caseNo":"", - "PPReference":"", - "AltReference":"", - "srchtype":"", - "srchstatus":"", - "srchdecision":"", - "srchapstatus":"", - "srchappealdecision":"", - "srchwardcode":"", - "srchparishcode":"", - "srchagentdetails":"", - "srchDateReceivedStart":"%(day)02d/%(month)02d/%(year)d" %{"day":day ,"month": month ,"year": year}, - "srchDateReceivedEnd":"%(day)02d/%(month)02d/%(year)d" %{"day":day, "month":month, "year":year} }) - - if self.debug: - print search_data1 - - - search_url = urlparse.urljoin(self.base_url, search_results_url_end) - request1 = urllib2.Request(search_url, search_data1) - cookie_jar.add_cookie_header(request1) - response1 = urllib2.urlopen(request1) - - # This search is the one we will actually use. - # a maximum of 100 results are returned on this site, - # hence setting "pagesize" to 100. I doubt there will ever - # be more than 100 in one day in PublicAccess... - # "currentpage" = 1 gets us to the first page of results - # (there will only be one anyway, as we are asking for 100 results...) - -#http://planning.york.gov.uk/PublicAccess/tdc/DcApplication/application_searchresults.aspx?szSearchDescription=Applications%20received%20between%2022/02/2007%20and%2022/02/2007&searchType=ADV&bccaseno=¤tpage=2&pagesize=10&module=P3 - - search_data2 = urllib.urlencode((("szSearchDescription","Applications received between %(day)02d/%(month)02d/%(year)d and %(day)02d/%(month)02d/%(year)d"%{"day":day ,"month": month ,"year": year}), ("searchType","ADV"), ("bccaseno",""), ("currentpage","1"), ("pagesize","100"), ("module","P3"))) - - if self.debug: - print search_data2 - - # This time we want to do a get request, so add the search data into the url - request2_url = urlparse.urljoin(self.base_url, search_results_url_end + "?" + search_data2) - - request2 = urllib2.Request(request2_url) - - # add the cookie we stored from our first search - cookie_jar.add_cookie_header(request2) - - response2 = urllib2.urlopen(request2) - - contents = fixNewlines(response2.read()) - - if self.debug: - print contents - - self.feed(contents) - - return self._results - - - def getResults(self, day, month, year): - return self.getResultsByDayMonthYear(int(day), int(month), int(year)).displayXML() - - - - -class PublicAccessInfoPageParser(HTMLParser.HTMLParser): - """A parser to get the URL for the property details page out of the - info page (this url is needed in order to get the postcode of the - application. - """ - - def __init__(self): - HTMLParser.HTMLParser.__init__(self) - - self.property_page_url = None - - def handle_starttag(self, tag, attrs): - """The URL of the property details page is contained in an tag in - an attribute with key 'A_btnPropertyDetails'. There is some garbage on - either side of it which we will have to clear up before storing it... - - We go through the tags looking for one with an attribute with - key 'id' and value 'A_btnPropertyDetails'. When we find it we go through - its attributes looking for one with key 'href' - the value of this attribute - contains the URL we want, after a bit of tidying up. - - Once we have got the URL, there is no need for us to look at any more tags. - """ - if tag == "a" and self.property_page_url is None: - - #print attrs - if attrs.count(("id","A_btnPropertyDetails")) > 0: - for attr,value in attrs: - if attr == "href": - the_link = value - - # this may have some garbage on either side of it... - # let's strip that off - - # If the stripping fails, take the whole link - - # the garbage on the left is separated by whitespace. - # the garbage on the right is separated by a "'". - try: - self.property_page_url = the_link.split()[1].split("'")[0] - except IndexError: - self.property_page_url = the_link - - -class PublicAccessPropertyPageParser(HTMLParser.HTMLParser): - """A parser to get the postcode out of the property details page.""" - def __init__(self): - HTMLParser.HTMLParser.__init__(self) - - self.postcode = None - - def handle_starttag(self, tag, attrs): - """The postcode is contained in an tag. - This tag has an attribute 'name' with value postcode. - It also has an attribute 'value' with value the postcode of this application. - - We go through the input tags looking for one with an attribute with - key 'name' and value 'postcode'. When we find one, - we look through its attributes for one with key 'value' - we store the value of this - attribute as self.postcode. - - Once we have the postcode, there is no need to look at any more input tags. - """ - - if tag == "input" and self.postcode is None: - if attrs.count(("name","postcode")) > 0: - for attr,value in attrs: - if attr == "value": - self.postcode = value - - diff --git a/cgi-bin/README b/cgi-bin/README deleted file mode 100644 index 6261806..0000000 --- a/cgi-bin/README +++ /dev/null @@ -1,5 +0,0 @@ - -WARNING - this directory is only for generated files -and files which are automatically copied in. -Anything manually added here will be svn deleted. - diff --git a/cgi-bin/Redditch.cgi b/cgi-bin/Redditch.cgi deleted file mode 100644 index a69c2a2..0000000 --- a/cgi-bin/Redditch.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Redditch Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Redditch Borough Council" -authority_short_name = "Redditch" -base_url = "http://access.redditchbc.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Renfrewshire.cgi b/cgi-bin/Renfrewshire.cgi deleted file mode 100644 index e8ccea4..0000000 --- a/cgi-bin/Renfrewshire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Renfrewshire Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Renfrewshire Council" -authority_short_name = "Renfrewshire" -base_url = "http://planning.renfrewshire.gov.uk/acolnetDCpages/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.PgeSearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.RenfrewshireParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Rushmoor.cgi b/cgi-bin/Rushmoor.cgi deleted file mode 100644 index e91ef2e..0000000 --- a/cgi-bin/Rushmoor.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Rushmoor Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Rushmoor Borough Council" -authority_short_name = "Rushmoor" -base_url = "http://pa-dc.rushmoor.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Scarborough.cgi b/cgi-bin/Scarborough.cgi deleted file mode 100644 index 02abde3..0000000 --- a/cgi-bin/Scarborough.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Scarborough Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Scarborough Borough Council" -authority_short_name = "Scarborough" -base_url = "http://planning.scarborough.gov.uk/publicaccess/dc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Selby.cgi b/cgi-bin/Selby.cgi deleted file mode 100755 index bb6bdac..0000000 --- a/cgi-bin/Selby.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Selby District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Selby District Council" -authority_short_name = "Selby" -base_url = "http://publicaccess.selby.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Sevenoaks.cgi b/cgi-bin/Sevenoaks.cgi deleted file mode 100644 index d264e37..0000000 --- a/cgi-bin/Sevenoaks.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Sevenoaks District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Sevenoaks District Council" -authority_short_name = "Sevenoaks" -base_url = "http://publicaccess.sevenoaks.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/South Bedfordshire.cgi b/cgi-bin/South Bedfordshire.cgi deleted file mode 100755 index f8322b9..0000000 --- a/cgi-bin/South Bedfordshire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for South Bedfordshire District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "South Bedfordshire District Council" -authority_short_name = "South Bedfordshire" -base_url = "http://planning.southbeds.gov.uk/plantech/DCWebPages/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.PgeSearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.SouthBedfordshireParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/South Bucks.cgi b/cgi-bin/South Bucks.cgi deleted file mode 100644 index f4cf41d..0000000 --- a/cgi-bin/South Bucks.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for South Bucks District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "South Bucks District Council" -authority_short_name = "South Bucks" -base_url = "http://sbdc-paweb.southbucks.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/South Lakeland.cgi b/cgi-bin/South Lakeland.cgi deleted file mode 100755 index bfa0312..0000000 --- a/cgi-bin/South Lakeland.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for South Lakeland District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "South Lakeland District Council" -authority_short_name = "South Lakeland" -base_url = "http://www.southlakeland.gov.uk/fastweb/" - -#print "Content-Type: text/html" # HTML is following -#print - -import FastWeb - -parser = FastWeb.FastWeb(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/South Ribble.cgi b/cgi-bin/South Ribble.cgi deleted file mode 100644 index 3e7d8ed..0000000 --- a/cgi-bin/South Ribble.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for South Ribble Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "South Ribble Borough Council" -authority_short_name = "South Ribble" -base_url = "http://publicaccess.southribble.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/South Staffordshire.cgi b/cgi-bin/South Staffordshire.cgi deleted file mode 100644 index 2e3f1ff..0000000 --- a/cgi-bin/South Staffordshire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for South Staffordshire Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "South Staffordshire Council" -authority_short_name = "South Staffordshire" -base_url = "https://services.sstaffs.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/SouthOxfordshire.cgi b/cgi-bin/SouthOxfordshire.cgi deleted file mode 100644 index c2c615e..0000000 --- a/cgi-bin/SouthOxfordshire.cgi +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/local/bin/python - -import cgi -import cgitb; cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - -from SouthOxfordshireParser import SouthOxfordshireParser - -parser = SouthOxfordshireParser() - -xml = parser.getResults(day, month, year) - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/SouthOxfordshireParser.py b/cgi-bin/SouthOxfordshireParser.py deleted file mode 100644 index 0097ee5..0000000 --- a/cgi-bin/SouthOxfordshireParser.py +++ /dev/null @@ -1,248 +0,0 @@ - -import urllib, urllib2 - -import HTMLParser -import urlparse -import datetime, time - -# This needs a page number inserting -search_url = "http://www.southoxon.gov.uk/ccm/planning/ApplicationList.jsp?PAGE=%d" - -# This needs the council reference -comment_url = "https://forms.southoxon.gov.uk/ufs/ufsmain?formid=PLANNINGCOMMENT&PLNGAPPL_REFERENCE=%(reference)s" - -authority_name = "South Oxfordshire District Council" -authority_short_name = "South Oxfordshire" - - -from PlanningUtils import fixNewlines, \ - getPostcodeFromText, \ - PlanningAuthorityResults, \ - PlanningApplication - -class SouthOxfordshireParser(HTMLParser.HTMLParser): - """In this case we'll take the date, so that we can avoid doing dowloads for - the other days in this week's file. This date should be a datetime.date object. - """ - def __init__(self): - HTMLParser.HTMLParser.__init__(self) - - self._requested_date = None - - # We'll keep a count of the number of tables we have seen. - # All the interesting stuff is in table 3 - self._table_count = 0 - - # While inside table 3, we'll keep a count of the number of - # s we have seen. What is in which numbered is detailed below. - # 1 reference - # 3 place and description - # 5 date received - # 2 and 4 are just padding - self._td_count = 0 - - # This is just a flag to say that we are now ready to get the reference - # from the next bit of data - self._get_reference = False - - self._data = '' - - # this will hold the application we are currently working on. - self._current_application = None - - # The object which stores our set of planning application results - self._results = PlanningAuthorityResults(authority_name, authority_short_name) - - def handle_starttag(self, tag, attrs): - # if we see a table tag, increment the table count. - if tag == 'table': - self._table_count += 1 - - # we are only interested in other tags if we are in table 3. - if self._table_count == 3: - - # If we are starting a , create a new PlanningApplication object - # for the application currently being processed - if tag == 'tr': - self._current_application = PlanningApplication() - - # if we see a td, increment the count. - if tag == 'td': - self._td_count += 1 - - # if we are in the first , and we see a link, - # then it is to the info page for this applicaion. - if tag == 'a' and self._td_count == 1: - for key, value in attrs: - if key == 'href': - url_end = value - self._current_application.info_url = urlparse.urljoin(search_url,url_end) - - # We now know that the next bit of data is the reference - self._get_reference = True - - # href is the only attribute we are interested in. - break - - def handle_endtag(self, tag): - # There is no need to do anything unless we are in table 3. - if self._table_count == 3: - - # The end indicates that the current application is finished. - # Now we can fetch the info_page to get the address, postcode, - # and description. - # If we don't have a reference, then we are in the header row, - # which we don't want. - # There is no point in doing this if the date is not the requested one. - - if tag == 'tr' and \ - self._current_application.council_reference is not None and \ - self._current_application.date_received == self._requested_date: - - info_page_parser = SouthOxfordshireInfoURLParser() - info_page_parser.feed(urllib2.urlopen(self._current_application.info_url).read()) - - self._current_application.address = info_page_parser.address - self._current_application.postcode = getPostcodeFromText(info_page_parser.address) - self._current_application.description = info_page_parser.description - - # Add the current application to the results set - self._results.addApplication(self._current_application) - - # At the end of the 5th , self._data should contain - # the received date of the application. - if tag == 'td' and self._td_count == 5: - app_year, app_month, app_day = tuple(time.strptime(self._data, "%d %B %Y")[:3]) - self._current_application.date_received = datetime.date(app_year, app_month, app_day) - self._data = '' - self._td_count = 0 - - def handle_data(self, data): - # There is no need to do anything if we aren't in table 3. - if self._table_count == 3: - # If we are in the first , and the get_reference flag is set, - # then the next data is the reference. - if self._td_count == 1 and self._get_reference: - self._current_application.council_reference = data - - # The comment url can now be made, as it depends only on the reference. - # On this site, the link to the comment page is only displayed once - # the planning authority has decided who is handling this application - # and has opened consultations. The link below works straight away, - # and also works for apps for which the consultation period is over. - # I have no idea if anything is actually done with these comments if - # it is followed too early... - self._current_application.comment_url = comment_url %{'reference': self._current_application.council_reference} - - # Set the get_reference flag back to False. - self._get_reference = False - - # If we are in the 5th , then we need to collect all the data together - # before we can use it. This is actually processed in handle_endtag. - if self._td_count == 5: - self._data += data - - def handle_entityref( self, ref ): - # We might have some entity_refs to clear up. - # there is no need to bother with this if we aren't in the results table. - if self._table_count == 3 and self._td_count == 5: - if ref == 'nbsp': - self._data += ' ' - - - def getResultsByDayMonthYear(self, day, month, year): - """This will return an ApplicationResults object containg the - applications for the date passed in.""" - - today = datetime.date.today() - self._requested_date = datetime.date(year, month, day) - delta = today - self._requested_date - - # to get the correct page, we need - # page ((days mod 7) + 1) - page_number = delta.days/7 + 1 - - response = urllib2.urlopen(search_url %page_number) - - contents = response.read() - - self.feed(contents) - - return self._results - - - def getResults(self, day, month, year): - return self.getResultsByDayMonthYear(int(day), int(month), int(year)).displayXML() - -class SouthOxfordshireInfoURLParser(HTMLParser.HTMLParser): - """This parser is to get the description and address out of the info page - for a South Oxfordshire application.""" - - def __init__(self): - HTMLParser.HTMLParser.__init__(self) - - self.address = None - self.description = None - - # These two states will be set to: - # 0 - if we haven't yet got that bit - # 1 - if we are currently working on it - # 2 - if we have finished - self._address_state = 0 - self._description_state = 0 - - # We well need to know whether or not we are in a - self._in_td = False - - # This is used for collecting together date which comes in several bits. - self._data = '' - - def handle_starttag(self, tag, attrs): - # If we see the start of a and we are still interested in some data - # then set the td flag to true, and blank the data - if tag == 'td' and (self._address_state < 2 or self._description_state < 2): - self._in_td = True - self._data = '' - - def handle_endtag(self, tag): - if tag == 'td' and (self._address_state < 2 or self._description_state < 2): - # If we are working on the description, - # set description from _data and note that we need to work on it no more. - if self._description_state == 1: - self.description = self._data - self._description_state = 2 - - - # If we are working on the address, - # set address from _data and note that we need to work on it no more. - elif self._address_state == 1: - self.address = self._data - self._address_state = 2 - - # If we see data which says 'Descripton', - # then set the description state to working. - elif self._data.strip() == 'Description': - self._description_state = 1 - - # If we see data which says 'Location', - # then set the addresss state to working. - elif self._data.strip() == 'Location': - self._address_state = 1 - - # Note that we are leaving the - self._in_td = False - - def handle_data(self, data): - # if we are in a td, and we are still interested in the data for something, - # append the current bit to self._data - if self._in_td and (self._address_state < 2 or self._description_state < 2): - self._data += data - - -# TODO - -# find out what time of day this is run - does it matter that -# we aren't being careful with daylight saving time etc. - -# Can we check that scraped email address really is -# an email address? diff --git a/cgi-bin/Southampton.cgi b/cgi-bin/Southampton.cgi deleted file mode 100644 index bc879c4..0000000 --- a/cgi-bin/Southampton.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Southampton City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Southampton City Council" -authority_short_name = "Southampton" -base_url = "http://publicaccess.southampton.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Spelthorne.cgi b/cgi-bin/Spelthorne.cgi deleted file mode 100644 index 8506bfa..0000000 --- a/cgi-bin/Spelthorne.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Spelthorne Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Spelthorne Borough Council" -authority_short_name = "Spelthorne" -base_url = "http://phoenix.spelthorne.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/St Helens.cgi b/cgi-bin/St Helens.cgi deleted file mode 100644 index 022f0a6..0000000 --- a/cgi-bin/St Helens.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for St Helens Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "St Helens Council" -authority_short_name = "St Helens" -base_url = "http://212.248.225.150:8080/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.StHelensSearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Stevenage.cgi b/cgi-bin/Stevenage.cgi deleted file mode 100644 index e0fcf0d..0000000 --- a/cgi-bin/Stevenage.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Stevenage Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Stevenage Borough Council" -authority_short_name = "Stevenage" -base_url = "http://publicaccess.stevenage.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Stirling.cgi b/cgi-bin/Stirling.cgi deleted file mode 100644 index 9fa9017..0000000 --- a/cgi-bin/Stirling.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Stirling Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Stirling Council" -authority_short_name = "Stirling" -base_url = "http://planpub.stirling.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Stockton-On-Tees.cgi b/cgi-bin/Stockton-On-Tees.cgi deleted file mode 100644 index 0a40e3b..0000000 --- a/cgi-bin/Stockton-On-Tees.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Stockton-On-Tees Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Stockton-On-Tees Borough Council" -authority_short_name = "Stockton-On-Tees" -base_url = "http://www.developmentcontrol.stockton.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Stratford.cgi b/cgi-bin/Stratford.cgi deleted file mode 100644 index e58549f..0000000 --- a/cgi-bin/Stratford.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Stratford-on-Avon District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Stratford-on-Avon District Council" -authority_short_name = "Stratford" -base_url = "http://apps.stratford.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Suffolk Coastal.cgi b/cgi-bin/Suffolk Coastal.cgi deleted file mode 100644 index 59a892d..0000000 --- a/cgi-bin/Suffolk Coastal.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Suffolk Coastal District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Suffolk Coastal District Council" -authority_short_name = "Suffolk Coastal" -base_url = "https://apps3.suffolkcoastal.gov.uk/planningonline/acolnetcgi.exe?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.SuffolkCoastalParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Sunderland.cgi b/cgi-bin/Sunderland.cgi deleted file mode 100644 index a36d963..0000000 --- a/cgi-bin/Sunderland.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Sunderland City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Sunderland City Council" -authority_short_name = "Sunderland" -base_url = "http://www.sunderland.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Surrey Heath.cgi b/cgi-bin/Surrey Heath.cgi deleted file mode 100755 index b9f0980..0000000 --- a/cgi-bin/Surrey Heath.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Surrey Heath Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Surrey Heath Borough Council" -authority_short_name = "Surrey Heath" -base_url = "https://www.public.surreyheath-online.gov.uk/whalecom60b1ef305f59f921/whalecom0/Scripts/PlanningPagesOnline/acolnetcgi.gov?ACTION=UNWRAP&RIPNAME=Root.pgesearch" - -#print "Content-Type: text/html" # HTML is following -#print - -import AcolnetParser - -parser = AcolnetParser.SurreyHeathParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Sutton.cgi b/cgi-bin/Sutton.cgi deleted file mode 100755 index b563c76..0000000 --- a/cgi-bin/Sutton.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for London Borough of Sutton. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "London Borough of Sutton" -authority_short_name = "Sutton" -base_url = "http://82.43.4.135/FASTWEB/" - -#print "Content-Type: text/html" # HTML is following -#print - -import FastWeb - -parser = FastWeb.FastWeb(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Teignbridge.cgi b/cgi-bin/Teignbridge.cgi deleted file mode 100644 index b3a58e6..0000000 --- a/cgi-bin/Teignbridge.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Teignbridge District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Teignbridge District Council" -authority_short_name = "Teignbridge" -base_url = "http://213.152.63.161/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Tendring.cgi b/cgi-bin/Tendring.cgi deleted file mode 100755 index 60f9846..0000000 --- a/cgi-bin/Tendring.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Tendring District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Tendring District Council" -authority_short_name = "Tendring" -base_url = "http://195.99.151.54/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Test Valley.cgi b/cgi-bin/Test Valley.cgi deleted file mode 100644 index 2299312..0000000 --- a/cgi-bin/Test Valley.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Test Valley Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Test Valley Borough Council" -authority_short_name = "Test Valley" -base_url = "http://publicaccess.testvalley.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Tonbridge.cgi b/cgi-bin/Tonbridge.cgi deleted file mode 100644 index 6f1f3cc..0000000 --- a/cgi-bin/Tonbridge.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Tonbridge and Malling Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Tonbridge and Malling Borough Council" -authority_short_name = "Tonbridge" -base_url = "http://publicaccess.tmbc.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Torbay.cgi b/cgi-bin/Torbay.cgi deleted file mode 100644 index 5c0acb3..0000000 --- a/cgi-bin/Torbay.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Torbay Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Torbay Council" -authority_short_name = "Torbay" -base_url = "http://www.torbay.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Vale Royal.cgi b/cgi-bin/Vale Royal.cgi deleted file mode 100755 index b307656..0000000 --- a/cgi-bin/Vale Royal.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Vale Royal Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Vale Royal Borough Council" -authority_short_name = "Vale Royal" -base_url = "http://pa.valeroyal.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Watford.cgi b/cgi-bin/Watford.cgi deleted file mode 100755 index ec58fbf..0000000 --- a/cgi-bin/Watford.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Watford Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Watford Borough Council" -authority_short_name = "Watford" -base_url = "http://ww3.watford.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Waveney.cgi b/cgi-bin/Waveney.cgi deleted file mode 100644 index 6720172..0000000 --- a/cgi-bin/Waveney.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Waveney District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Waveney District Council" -authority_short_name = "Waveney" -base_url = "http://publicaccess.waveney.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Wear Valley.cgi b/cgi-bin/Wear Valley.cgi deleted file mode 100644 index a3da0dc..0000000 --- a/cgi-bin/Wear Valley.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Wear Valley District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Wear Valley District Council" -authority_short_name = "Wear Valley" -base_url = "http://planning.wearvalley.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.WearValleySearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Wellingborough.cgi b/cgi-bin/Wellingborough.cgi deleted file mode 100644 index 11bbeb7..0000000 --- a/cgi-bin/Wellingborough.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Wellingborough Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Wellingborough Borough Council" -authority_short_name = "Wellingborough" -base_url = "http://planning.wellingborough.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import ApplicationSearchServletParser - -parser = ApplicationSearchServletParser.WellingboroughSearchParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Welwyn-Hatfield.cgi b/cgi-bin/Welwyn-Hatfield.cgi deleted file mode 100755 index e07924e..0000000 --- a/cgi-bin/Welwyn-Hatfield.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Welwyn-Hatfield District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Welwyn-Hatfield District Council" -authority_short_name = "Welwyn-Hatfield" -base_url = "https://fastweb.welhat.gov.uk/" - -#print "Content-Type: text/html" # HTML is following -#print - -import FastWeb - -parser = FastWeb.FastWeb(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/West Berkshire.cgi b/cgi-bin/West Berkshire.cgi deleted file mode 100644 index f96f0f9..0000000 --- a/cgi-bin/West Berkshire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for West Berkshire Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "West Berkshire Council" -authority_short_name = "West Berkshire" -base_url = "http://ww2.westberks.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/West Lancashire.cgi b/cgi-bin/West Lancashire.cgi deleted file mode 100644 index e62975c..0000000 --- a/cgi-bin/West Lancashire.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for West Lancashire District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "West Lancashire District Council" -authority_short_name = "West Lancashire" -base_url = "http://publicaccess.westlancsdc.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/West Norfolk.cgi b/cgi-bin/West Norfolk.cgi deleted file mode 100644 index c644cfb..0000000 --- a/cgi-bin/West Norfolk.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Kings Lynn and West Norfolk Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Kings Lynn and West Norfolk Borough Council" -authority_short_name = "West Norfolk" -base_url = "http://online.west-norfolk.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Winchester.cgi b/cgi-bin/Winchester.cgi deleted file mode 100755 index a71218f..0000000 --- a/cgi-bin/Winchester.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Winchester City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Winchester City Council" -authority_short_name = "Winchester" -base_url = "http://win2padmz.winchester.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Woking.cgi b/cgi-bin/Woking.cgi deleted file mode 100644 index 74b8027..0000000 --- a/cgi-bin/Woking.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Woking Borough Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Woking Borough Council" -authority_short_name = "Woking" -base_url = "http://caps.woking.gov.uk/publicaccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Wolverhampton.cgi b/cgi-bin/Wolverhampton.cgi deleted file mode 100755 index f91ad61..0000000 --- a/cgi-bin/Wolverhampton.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Wolverhampton City Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Wolverhampton City Council" -authority_short_name = "Wolverhampton" -base_url = "http://planningonline.wolverhampton.gov.uk/PublicAccess/dc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/Wyre Forest.cgi b/cgi-bin/Wyre Forest.cgi deleted file mode 100755 index b249410..0000000 --- a/cgi-bin/Wyre Forest.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for Wyre Forest District Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "Wyre Forest District Council" -authority_short_name = "Wyre Forest" -base_url = "http://www.wyreforest.gov.uk/fastweb/" - -#print "Content-Type: text/html" # HTML is following -#print - -import FastWeb - -parser = FastWeb.FastWeb(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml diff --git a/cgi-bin/York.cgi b/cgi-bin/York.cgi deleted file mode 100644 index 11030b7..0000000 --- a/cgi-bin/York.cgi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/python - -# This is the parser for City of York Council. -# it is generated from the file CGITemplate - -import cgi -import cgitb -#cgitb.enable(display=0, logdir="/tmp") - - -form = cgi.FieldStorage() -day = form.getfirst('day') -month = form.getfirst('month') -year = form.getfirst('year') - - -authority_name = "City of York Council" -authority_short_name = "York" -base_url = "http://planning.york.gov.uk/PublicAccess/tdc/" - -#print "Content-Type: text/html" # HTML is following -#print - -import PublicAccess - -parser = PublicAccess.PublicAccessParser(authority_name, authority_short_name, base_url) - -xml = parser.getResults(day, month, year) - - -print "Content-Type: text/xml" # XML is following -print -print xml # print the xml