Your message dated Sat, 30 May 2009 12:02:04 +0000
with message-id <[email protected]>
and subject line Bug#530718: fixed in tangogps 0.9.6-3
has caused the Debian Bug report #530718,
regarding tangogps: script to import GeoRSS points into TangoGPS POI database
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
530718: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530718
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: tangogps
Severity: wishlist
Tags: patch
Forwarded: Marcus Bauer <[email protected]>

Please include the attached python script, which imports GeoRSS points
into the TangoGPS POI database. It uses the sqlite3, feedparser and
beautifulsoup python modules. I only tested it on the Madrid free WiFi
points feed and the DebConf9 overlay so it may choke on other feeds with
different HTML in the description. It handles GeoRSS-Simple and
GeoRSS-GML points, but doesn't handle lines, polygons etc because
tangogps doesn't seem to have support for those. It is MIT/Expat
licensed. I've also forwarded it to the upstream author but I would like
it in Debian sid too.

-- 
bye,
pabs

http://wiki.debian.org/PaulWise
#!/usr/bin/python
#
# Basic program to import GeoRSS points into TangoGPS as points of interest
#
# Copyright 2009 Paul Wise
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import os
import sys
import random
import sqlite3
import feedparser
from BeautifulSoup import BeautifulSoup, BeautifulStoneSoup

def link2txt(a):
	a_text = ''.join(a).strip()

	if a['href'][0] == '/':
		a['href'] = 'http://maps.google.com%s' % a['href']

	if a_text == '':
		return a['href']

	if a_text.lower() == a['href'].lower():
		return a['href']

	return '%s (%s)' % (a_text,a['href'])


poi = []

con = sqlite3.connect(os.path.expanduser('~/.tangogps/poi.db'))
cur = con.cursor()

for arg in sys.argv[1:]:
	for e in feedparser.parse(arg).entries:
		if e.has_key('georss_point'):
			(lat, lon) = e.georss_point.split()
		elif e.has_key('gml_pos'):
			(lat, lon) = e.gml_pos.split()
		else:
			print 'georss2poi: warning: %s: unhandled feed item (not a point): %s' % (arg, e.title)
			continue
		rand1 = random.randint(100000000,1000000000)
		rand2 = random.randint(100000000,1000000000)
		rand = '%s%s' % (rand1,rand2)
		desc = e.description
		soup = BeautifulSoup(desc,convertEntities=BeautifulStoneSoup.HTML_ENTITIES,smartQuotesTo=None)
		[img.extract() for img in soup.findAll('img')]
		[br.replaceWith('\n') for br in soup.findAll('br')]
		[a.replaceWith(link2txt(a)) for a in soup.findAll('a')]
		desc = ''.join(soup.findAll(text=True)).strip()
		poi.append((rand,lat,lon,e.title,desc))

cur.executemany('INSERT INTO poi (idmd5,lat,lon,keywords,desc,visibility,cat,subcat,price_range,extended_open) VALUES (?,?,?,?,?,1.0,0.0,0.0,1.0,0.0)', poi)

con.commit()
con.close()

Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---
--- Begin Message ---
Source: tangogps
Source-Version: 0.9.6-3

We believe that the bug you reported is fixed in the latest version of
tangogps, which is due to be installed in the Debian FTP archive:

tangogps_0.9.6-3.diff.gz
  to pool/main/t/tangogps/tangogps_0.9.6-3.diff.gz
tangogps_0.9.6-3.dsc
  to pool/main/t/tangogps/tangogps_0.9.6-3.dsc
tangogps_0.9.6-3_i386.deb
  to pool/main/t/tangogps/tangogps_0.9.6-3_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <[email protected]> (supplier of updated tangogps package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 30 May 2009 13:55:45 +0200
Source: tangogps
Binary: tangogps
Architecture: source i386
Version: 0.9.6-3
Distribution: unstable
Urgency: low
Maintainer: Daniel Baumann <[email protected]>
Changed-By: Daniel Baumann <[email protected]>
Description: 
 tangogps   - GTK+ mapping and GPS application
Closes: 530718
Changes: 
 tangogps (0.9.6-3) unstable; urgency=low
 .
   * Using correct rfc-2822 date formats in changelog.
   * Using more common directory name to store local debian additions.
   * Adding georss2angogps-poi script from Paul Wise <[email protected]>
     (Closes: #530718).
   * Tidy rules file.
Checksums-Sha1: 
 d0af4b412d7c900e6d5012495179ab0834ee4e8a 1199 tangogps_0.9.6-3.dsc
 68b7b15c21767cc68658fc2eaff858f1e26d9ca8 6289 tangogps_0.9.6-3.diff.gz
 d3f53296af498114d45469c7f53fcda6d5243360 134058 tangogps_0.9.6-3_i386.deb
Checksums-Sha256: 
 a8df369e1694cb068f45f0febec2bf2edc9c1fd9aeec2d5c6832d89a091f9f67 1199 
tangogps_0.9.6-3.dsc
 2ef50cf7f91e1756c23b9c064fa780ec185c71b272acd6ac342875b2925ced79 6289 
tangogps_0.9.6-3.diff.gz
 67338ce1491717adf64a09176b6df1afaf58e520922af19c8ff6c4320396d4c4 134058 
tangogps_0.9.6-3_i386.deb
Files: 
 98dffe77f55d1df56484236408378251 1199 comm optional tangogps_0.9.6-3.dsc
 a1c8ca3d1f7429a8912dbfb55b0fccea 6289 comm optional tangogps_0.9.6-3.diff.gz
 2fdccd38ffb22b24b57326a41c3d2185 134058 comm optional tangogps_0.9.6-3_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkohH00ACgkQ+C5cwEsrK54V6QCfUH8DELDC5YM+h8DSKOXueg0h
D+IAoKTxSlwK+719fFDTAEZmo1d6ZcWw
=OFt9
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to