logo separator

[mkgmap-dev] bounds and sea on pleiades

From Bernd Weigelt weigelt.bernd at web.de on Fri Jan 31 15:29:24 GMT 2014

Am Freitag, 31. Januar 2014, 15:37:50 schrieb Patrik Brunner:
> So one could always download the latest file from the paths 
> ./bounds/latest/bounds.zip and ./sea/latest/sea.zip
> 
> Not sure how complex it is to achieve this during your automated 
> generation/preparation/publishing, but guessing from my scripting 
> experience it shouldn't be that hard.

I think is better to use a link, named bounds.zip, to the latest file, with my 
python script i check for the date in latest/

if config.get('navmap', 'sea') == "latest":
      target = http.client.HTTPConnection("osm2.pleiades.uni-wuppertal.de")
      target.request("GET", "/sea/latest/")
      htmlcontent =  target.getresponse()
      data = htmlcontent.read()
      data = data.decode('utf8')
      pattern = re.compile('sea_201\d{5}.zip')
      sea_rev_pre = sorted(pattern.findall(data), reverse=True)[1]
      sea_rev = os.path.splitext(os.path.basename(sea_rev_pre))[0]
      target.close()
      
      config.set('navmap', 'sea_rev', (sea_rev))

m2c
Bernd

-- 
amarok2 now playing:






More information about the mkgmap-dev mailing list