You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
(1) |
Mar
(15) |
Apr
(20) |
May
(2) |
Jun
(9) |
Jul
(3) |
Aug
(2) |
Sep
(17) |
Oct
(16) |
Nov
(38) |
Dec
(40) |
2010 |
Jan
(51) |
Feb
(11) |
Mar
(24) |
Apr
(31) |
May
(24) |
Jun
(3) |
Jul
(9) |
Aug
(1) |
Sep
(29) |
Oct
(33) |
Nov
(81) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(4) |
Mar
(13) |
Apr
(4) |
May
(24) |
Jun
(4) |
Jul
(19) |
Aug
(46) |
Sep
(10) |
Oct
(28) |
Nov
(31) |
Dec
|
From: <jli...@us...> - 2009-04-12 11:08:07
|
Revision: 318 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=318&view=rev Author: jliljenfeldt Date: 2009-04-12 11:08:01 +0000 (Sun, 12 Apr 2009) Log Message: ----------- The gpx file was not copied to home dir. Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/gpx.py Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-04-09 15:49:12 UTC (rev 317) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-04-12 11:08:01 UTC (rev 318) @@ -244,7 +244,7 @@ logging.debug('>>') xmlParser = XMLParser(gtrnctrFile) selectedEntry = xmlParser.getTrackFromDates(gtrnctrFile,entry,0) - newGPXEntry = "/tmp/new_entry.gpx" + newGPXEntry = self.conf.tmpdir + "/new_entry.gpx" gtrnctr2gpx(selectedEntry, newGPXEntry) logging.debug('<<') return newGPXEntry This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vu...@us...> - 2009-04-09 15:49:19
|
Revision: 317 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=317&view=rev Author: vud1 Date: 2009-04-09 15:49:12 +0000 (Thu, 09 Apr 2009) Log Message: ----------- "repair html wordpress plugin bug (<strong> tag non-closed) " Modified Paths: -------------- pytrainer/trunk/extensions/wordpress/main.py pytrainer/trunk/pytrainer/lib/gpx.py Modified: pytrainer/trunk/extensions/wordpress/main.py =================================================================== --- pytrainer/trunk/extensions/wordpress/main.py 2009-04-05 15:27:34 UTC (rev 316) +++ pytrainer/trunk/extensions/wordpress/main.py 2009-04-09 15:49:12 UTC (rev 317) @@ -41,7 +41,7 @@ hfile = self.wp.newMediaObject(htmlpath) kfile = self.wp.newMediaObject(kmlpath) - description_route = '''<strong>Map: <strong> <br/> + description_route = '''<strong>Map: </strong> <br/> <iframe width='480' height='480' src='%s'> Need frame support </iframe><br/> <a href='%s'>Gpx-format</a> <a href='%s'>Kml-format (GoogleEarth)</a><br/><br/>''' %(hfile,gfile,kfile) return description_route Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-04-05 15:27:34 UTC (rev 316) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-04-09 15:49:12 UTC (rev 317) @@ -63,11 +63,7 @@ logging.debug("parsing content from "+self.filename) self.dom = xml.dom.minidom.parse(self.filename) logging.debug("getting values...") - time1 = time.time() self.Values = self._getValues() - time2 = time.time() - time_ = time2-time1 - print "loading gpx file. Time: %f seconds " %time_ logging.debug("<<") def getMaxValues(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vu...@us...> - 2009-04-05 15:27:42
|
Revision: 316 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=316&view=rev Author: vud1 Date: 2009-04-05 15:27:34 +0000 (Sun, 05 Apr 2009) Log Message: ----------- "changing newgpx.gpx to new_entry.gpx string" Modified Paths: -------------- pytrainer/trunk/pytrainer/record.py Modified: pytrainer/trunk/pytrainer/record.py =================================================================== --- pytrainer/trunk/pytrainer/record.py 2009-04-04 07:28:12 UTC (rev 315) +++ pytrainer/trunk/pytrainer/record.py 2009-04-05 15:27:34 UTC (rev 316) @@ -150,7 +150,7 @@ cells,values = self._formatRecordNew(list_options) self.ddbb.insert("records",cells,values) logging.debug('DB updated: '+str(cells)+' | '+str(values)) - gpxOrig = self.conf.tmpdir+"/newgpx.gpx" + gpxOrig = self.conf.tmpdir+"/new_entry.gpx" if os.path.isfile(gpxOrig): gpxDest = self.conf.getValue("gpxdir") id_record = self.ddbb.lastRecord("records") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jli...@us...> - 2009-04-04 07:28:17
|
Revision: 315 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=315&view=rev Author: jliljenfeldt Date: 2009-04-04 07:28:12 +0000 (Sat, 04 Apr 2009) Log Message: ----------- Wordpress export support working again. Added some more fields and translated blog output to English. Modified Paths: -------------- pytrainer/trunk/extensions/wordpress/googlemaps.py pytrainer/trunk/extensions/wordpress/main.py pytrainer/trunk/pytrainer/lib/soapUtils.py Modified: pytrainer/trunk/extensions/wordpress/googlemaps.py =================================================================== --- pytrainer/trunk/extensions/wordpress/googlemaps.py 2009-04-04 07:15:00 UTC (rev 314) +++ pytrainer/trunk/extensions/wordpress/googlemaps.py 2009-04-04 07:28:12 UTC (rev 315) @@ -18,17 +18,30 @@ import os import re - -from pytrainer.lib.gpx import Gpx -import pytrainer.lib.points as Points -from pytrainer.lib.fileUtils import fileUtils - +import sys +sys.path.insert(0,os.path.join(sys.path[0],'../../pytrainer/lib')) +from gpx import Gpx +import points as Points +from fileUtils import fileUtils +import fileinput def drawMap(gpxfile,key,htmlpath): cachefile = "/tmp/gpx.txt" trackdistance = 100 os.system("gpsbabel -t -i gpx -f %s -x position,distance=%sm -o gpx -F %s" %(gpxfile,trackdistance,cachefile)) + # Test if file already contains gpxdata attribute + found = False + for line in fileinput.FileInput(cachefile,inplace=1): + if "xmlns:gpxdata" in line: + found = True + print line.rstrip('\n'); + # If file don't has gpxdata attribute: add namespace + if not found: + for line in fileinput.FileInput(cachefile,inplace=1): + if "xmlns:xsi" in line: + line=line.replace('xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"','xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0"') + print line.rstrip('\n'); gpx = Gpx("",cachefile) list_values = gpx.getTrackList() pointlist = [] @@ -72,7 +85,7 @@ content += " </script>\n" content += " </head>\n" content += " <body onload=\"load()\" onunload=\"GUnload()\">\n" - content += " <div id=\"map\" style=\"width: 520px; height: 480px\"></div>\n" + content += " <div id=\"map\" style=\"width: 460px; height: 460px\"></div>\n" content += " </body>\n" content += "</html>\n" file = fileUtils(htmlpath,content) Modified: pytrainer/trunk/extensions/wordpress/main.py =================================================================== --- pytrainer/trunk/extensions/wordpress/main.py 2009-04-04 07:15:00 UTC (rev 314) +++ pytrainer/trunk/extensions/wordpress/main.py 2009-04-04 07:28:12 UTC (rev 315) @@ -4,9 +4,10 @@ from optparse import OptionParser import os import googlemaps +import sys +sys.path.insert(0,os.path.join(sys.path[0],'../../pytrainer/lib')) +from date import Date -from pytrainer.lib.date import Date - import SOAPpy class Main: @@ -40,9 +41,9 @@ hfile = self.wp.newMediaObject(htmlpath) kfile = self.wp.newMediaObject(kmlpath) - description_route = '''<strong>Route: <strong> <br/> - <iframe width='540' height='500' src='%s'> Need frame support </iframe><br/> - <a href='%s'>Gpx file</a> <a href='%s'>Kml file (GoogleEarth)</a><br/><br/>''' %(hfile,gfile,kfile) + description_route = '''<strong>Map: <strong> <br/> + <iframe width='480' height='480' src='%s'> Need frame support </iframe><br/> + <a href='%s'>Gpx-format</a> <a href='%s'>Kml-format (GoogleEarth)</a><br/><br/>''' %(hfile,gfile,kfile) return description_route def loadRecordInfo(self): @@ -59,9 +60,14 @@ self.title = record["title"] self.upositive = record["upositive"] self.unegative = record["unegative"] + self.unegative = record["unegative"] + self.maxspeed = record["maxspeed"] + self.maxpace = record["maxpace"] + self.pace = record["pace"] + self.maxbeats = record["maxbeats"] def createBody(self): - return '''<b> Descripcion: <b/><br/> + return '''<b> Description: </b><br/> %s<br/>''' %self.comments def createTable(self): @@ -69,47 +75,59 @@ <br/> <table border=0> <tr> - <td><strong>Deporte:</strong></td> + <td><strong>Activity:</strong></td> <td>%s</td> - <td><strong>Fecha:</strong></td> + <td><strong>Date:</strong></td> <td>%s</td> </tr> <tr> - <td><strong>Distancia:</strong></td> + <td><strong>Distance:</strong></td> <td>%s</td> - <td><strong>Tiempo:</strong></td> + <td><strong>Time (hh, mm, ss):</strong></td> <td>%s</td> </tr> <tr> - <td><strong>Calorias:</strong></td> + <td><strong>Max speed:</strong></td> <td>%s</td> - <td><strong>Media:</strong></td> + <td><strong>Avg speed (km/h):</strong></td> <td>%s</td> </tr> <tr> - <td><strong>Desnivel Positivo:</strong></td> + <td><strong>Max pace (min/km):</strong></td> <td>%s</td> - <td><strong>Desnivel Negativo:</strong></td> + <td><strong>Avg pace (min/km):</strong></td> <td>%s</td> </tr> + <tr> + <td><strong>Max pulse:</strong></td> + <td>%s</td> + <td><strong>Avg pulse:</strong></td> + <td>%s</td> + </tr> + <tr> + <td><strong>Acc elevation +:</strong></td> + <td>%s</td> + <td><strong>Acc elevation -:</strong></td> + <td>%s</td> + </tr> </table> - ''' %(self.sport,self.date,self.distance,self.time,self.calories,self.average,self.upositive,self.unegative) + ''' %(self.sport,self.date,self.distance,self.time,self.maxspeed,self.average,self.maxpace,self.pace,self.maxbeats,self.beats,self.upositive,self.unegative) return description_table def createFigures(self): - hr_fig_path = "/tmp/hr.png" - stage_fig_path = "/tmp/stage.png" - blog_figures = '' - # If there are no graphs, return empty string. + hr_fig_path = "/tmp/hr.png" + stage_fig_path = "/tmp/stage.png" + blog_figures = '' + # If there are no graphs, return empty string. if os.path.isfile(hr_fig_path) and os.path.isfile(stage_fig_path): - #the graph files are created because the graph tabs are automatically visited (which invokes graph generation) + #the graph files are created because the graph tabs are automatically visited (which invokes graph generation) hrfile = self.wp.newMediaObject(hr_fig_path) - stagefile = self.wp.newMediaObject(stage_fig_path) - blog_figures = '''<br/> <img src='%s' /> <img src='%s' /> <br/>''' %(hrfile, stagefile) - return blog_figures + stagefile = self.wp.newMediaObject(stage_fig_path) + blog_figures = '''<br/> <img src='%s' /> <img src='%s' /> <br/>''' %(hrfile, stagefile) + return blog_figures def createFoot(self): - return ''' <center>Powered by <a href='http://pytrainer.e-oss.net'>Pytrainer</a></center>''' + return ''' <center>Powered by <a href='http://sourceforge.net/projects/pytrainer/'>Pytrainer</a></center>''' def createTitle(self): if self.title==None: @@ -141,7 +159,7 @@ post.title = blog_title post.description = blog_body+blog_table+blog_route+blog_figures+blog_foot post.categories = blog_category - idNewPost = self.wp.newPost(post, False) + idNewPost = self.wp.newPost(post, True) return "The post has been submited" else: Modified: pytrainer/trunk/pytrainer/lib/soapUtils.py =================================================================== --- pytrainer/trunk/pytrainer/lib/soapUtils.py 2009-04-04 07:15:00 UTC (rev 314) +++ pytrainer/trunk/pytrainer/lib/soapUtils.py 2009-04-04 07:28:12 UTC (rev 315) @@ -47,7 +47,7 @@ ddbb = DDBB(configuration) ddbb.connect() recordinfo = ddbb.select("records,sports", - "sports.name,date,distance,time,beats,comments,average,calories,id_record,title,upositive,unegative", + "sports.name,date,distance,time,beats,comments,average,calories,id_record,title,upositive,unegative,maxspeed,maxpace,pace,maxbeats", "id_record=\"%s\" and records.sport=sports.id_sports" %id_record) record = recordinfo[0] info = {} @@ -62,6 +62,10 @@ info["title"] = record[9] info["upositive"] = record[10] info["unegative"] = record[11] + info["maxspeed"] = record[12] + info["maxpace"] = record[13] + info["pace"] = record[14] + info["maxbeats"] = record[15] return info def newRecord(self,title=None,distance=None,time=None,upositive=None, unegative=None, bpm=None,calories=None, date=None, comment=None): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jli...@us...> - 2009-04-04 07:15:01
|
Revision: 314 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=314&view=rev Author: jliljenfeldt Date: 2009-04-04 07:15:00 +0000 (Sat, 04 Apr 2009) Log Message: ----------- One more explicit string casting of potential datetime.date object. Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowmain.py Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-04-04 07:13:41 UTC (rev 313) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-04-04 07:15:00 UTC (rev 314) @@ -190,7 +190,7 @@ self.record_maxpace.set_text("%0.2f" %maxpace) self.record_sport.set_text(sport) - self.record_date.set_text(date) + self.record_date.set_text(str(date)) hour,min,sec=self.parent.date.second2time(int(record_list[3])) self.record_hour.set_text("%d" %hour) self.record_minute.set_text("%d" %min) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jli...@us...> - 2009-04-04 07:13:43
|
Revision: 313 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=313&view=rev Author: jliljenfeldt Date: 2009-04-04 07:13:41 +0000 (Sat, 04 Apr 2009) Log Message: ----------- Explicit string casting of potential datetime.date object. Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowrecord.py Modified: pytrainer/trunk/pytrainer/gui/windowrecord.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowrecord.py 2009-04-03 16:59:52 UTC (rev 312) +++ pytrainer/trunk/pytrainer/gui/windowrecord.py 2009-04-04 07:13:41 UTC (rev 313) @@ -141,7 +141,7 @@ #(50, u'2006-10-13', 1, 25.0, u'5625', 0.0, 16.0, 0, u'', gpsfile, title,upositive,unegative,maxspeed|maxpace|pace|maxbeats self.id_record = values[0] self.setTime(values[4]) - self.rcd_date.set_text(values[1]) + self.rcd_date.set_text(str(values[1])) self.setValue("rcd_distance",values[3]) self.setValue("rcd_average",values[6]) self.setValue("rcd_calories",values[7]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jli...@us...> - 2009-04-03 16:59:57
|
Revision: 312 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=312&view=rev Author: jliljenfeldt Date: 2009-04-03 16:59:52 +0000 (Fri, 03 Apr 2009) Log Message: ----------- Explicit string casting of potential datetime.date object. Not using datetime.date methods anymore, like isoformat(), that would brake sqlite support. Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/record.py Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-04-03 06:18:02 UTC (rev 311) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-04-03 16:59:52 UTC (rev 312) @@ -190,7 +190,7 @@ self.record_maxpace.set_text("%0.2f" %maxpace) self.record_sport.set_text(sport) - self.record_date.set_text(date.isoformat()) + self.record_date.set_text(date) hour,min,sec=self.parent.date.second2time(int(record_list[3])) self.record_hour.set_text("%d" %hour) self.record_minute.set_text("%d" %min) @@ -306,7 +306,7 @@ self.day_pace.set_text(pace) self.day_maxpace.set_text(maxpace) self.day_calories.set_text("%0.0f" %calories) - self.day_topic.set_text(record[1].isoformat()) + self.day_topic.set_text(str(record[1])) else: self.dayview.set_sensitive(0) Modified: pytrainer/trunk/pytrainer/record.py =================================================================== --- pytrainer/trunk/pytrainer/record.py 2009-04-03 06:18:02 UTC (rev 311) +++ pytrainer/trunk/pytrainer/record.py 2009-04-03 16:59:52 UTC (rev 312) @@ -324,8 +324,8 @@ logging.debug('Found '+str(len(records))+' entries') day_list = [] for i in records: - record = i[0].isoformat().split("-") - logging.debug('date:'+i[0].isoformat()) + record = str(i[0]).split("-") + logging.debug('date:'+str(i[0])) day_list.append(record[2]) logging.debug('<<') return day_list This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jli...@us...> - 2009-04-03 06:18:07
|
Revision: 311 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=311&view=rev Author: jliljenfeldt Date: 2009-04-03 06:18:02 +0000 (Fri, 03 Apr 2009) Log Message: ----------- Could not import while using MySQL. freeexec did not work and datetime.date objects seems to need explicit conversion to strings. Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/lib/mysqlUtils.py pytrainer/trunk/pytrainer/record.py Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-04-02 21:44:35 UTC (rev 310) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-04-03 06:18:02 UTC (rev 311) @@ -190,7 +190,7 @@ self.record_maxpace.set_text("%0.2f" %maxpace) self.record_sport.set_text(sport) - self.record_date.set_text(date) + self.record_date.set_text(date.isoformat()) hour,min,sec=self.parent.date.second2time(int(record_list[3])) self.record_hour.set_text("%d" %hour) self.record_minute.set_text("%d" %min) @@ -306,7 +306,7 @@ self.day_pace.set_text(pace) self.day_maxpace.set_text(maxpace) self.day_calories.set_text("%0.0f" %calories) - self.day_topic.set_text(record[1]) + self.day_topic.set_text(record[1].isoformat()) else: self.dayview.set_sensitive(0) Modified: pytrainer/trunk/pytrainer/lib/mysqlUtils.py =================================================================== --- pytrainer/trunk/pytrainer/lib/mysqlUtils.py 2009-04-02 21:44:35 UTC (rev 310) +++ pytrainer/trunk/pytrainer/lib/mysqlUtils.py 2009-04-03 06:18:02 UTC (rev 311) @@ -18,7 +18,9 @@ #along with this program; if not, write to the Free Software #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -import _mysql +#import _mysql +import MySQLdb +from logs import Log # Fixed some issues with MySql tables creation (email from Jonas Liljenfeldt) class Sql: @@ -28,13 +30,14 @@ self.ddbb_host = host self.ddbb = ddbb self.db = None + self.log = Log() def connect(self): #si devolvemos 1 ha ido todo con exito #con 0 es que no estaba la bbdd creada #con -1 imposible conectar a la maquina. try: - self.db=_mysql.connect( + self.db=MySQLdb.connect( host=self.ddbb_host, user=self.ddbb_user, passwd=self.ddbb_pass, @@ -130,7 +133,15 @@ self.db.query("""insert into %s (%s) values (%s)""" %(table,cells,string)) def freeExec(self,sql): - self.db.query(sql) + #self.db.query(sql) + self.log.run(sql) + cur = self.db.cursor() + cur.execute(sql) + retorno = [] + for row in cur.fetchall(): + retorno.append(row) + self.db.commit() + return retorno def delete(self,table,condition): sql = "delete from %s where %s" %(table,condition) Modified: pytrainer/trunk/pytrainer/record.py =================================================================== --- pytrainer/trunk/pytrainer/record.py 2009-04-02 21:44:35 UTC (rev 310) +++ pytrainer/trunk/pytrainer/record.py 2009-04-03 06:18:02 UTC (rev 311) @@ -324,8 +324,8 @@ logging.debug('Found '+str(len(records))+' entries') day_list = [] for i in records: - record = i[0].split("-") - logging.debug('date:'+i[0]) + record = i[0].isoformat().split("-") + logging.debug('date:'+i[0].isoformat()) day_list.append(record[2]) logging.debug('<<') return day_list This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vu...@us...> - 2009-04-02 21:44:43
|
Revision: 310 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=310&view=rev Author: vud1 Date: 2009-04-02 21:44:35 +0000 (Thu, 02 Apr 2009) Log Message: ----------- Optimizing a lot Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/gpx.py Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-04-02 20:59:09 UTC (rev 309) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-04-02 21:44:35 UTC (rev 310) @@ -57,7 +57,6 @@ self.maxvel = 0 self.maxhr = 0 self.date = "" - self.tracks = [] if filename != None: if not os.path.isfile(self.filename): return None @@ -78,24 +77,8 @@ return self.date def getTrackRoutes(self): - return self.tracks - - def getUnevenness(self): - return self.upositive,self.unegative - - def getTrackList(self): - return self.Values - - def getHeartRateAverage(self): - return self.hr_average - - def _getValues(self): # migrate to cElementTree - logging.debug(">>") - dom = self.dom - content = dom.toxml() - - ''' - trks = dom.getElementsByTagName("trk") + trks = self.dom.getElementsByTagName("trk") + tracks = [] retorno = [] for trk in trks: if len(trk.getElementsByTagName("name")) > 0: @@ -109,34 +92,22 @@ else: time_ = _("No Data") logging.debug("name: "+name+" | time: "+time_) - self.tracks.append((name,time_)) - - if name == self.trkname: - dom = trk - content = """<?xml version="1.0" encoding="UTF-8"?> + tracks.append((name,time_)) + return tracks + + def getUnevenness(self): + return self.upositive,self.unegative + + def getTrackList(self): + return self.Values -<gpx -creator="pytrainer http://pytrainer.e-oss.net" -version="1.1" -xmlns="http://www.topografix.com/GPX/1/1" -xmlns:geocache="http://www.groundspeak.com/cache/1/0" -xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" -xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.cluetrust.com/XML/GPXDATA/1/0 http://www.cluetrust.com/Schemas/gpxdata10.xsd"> - - -""" - content += dom.toxml() - content += "</gpx>" - - #Guardamos el xml en un fichero (por si hay que guardar solo un track) - newfilename = self.conf.tmpdir+"/newgpx.gpx" - if os.path.isfile(newfilename): - os.remove(newfilename) - fp = open(newfilename,"a+") - fp.write(content) - fp.close() -''' + def getHeartRateAverage(self): + return self.hr_average + + def _getValues(self): # migrate to cElementTree + logging.debug(">>") + dom = self.dom + trkpoints = dom.getElementsByTagName("trkpt") retorno = [] his_vel = [] @@ -186,12 +157,13 @@ time_ = tmp_time - last_time if time_>0: #Caqlculate diference betwen last and new point - tempnum=(math.sin(last_lat)*math.sin(tmp_lat))+(math.cos(last_lat)*math.cos(tmp_lat)*math.cos(tmp_lon-last_lon)) + #tempnum=(math.sin(last_lat)*math.sin(tmp_lat))+(math.cos(last_lat)*math.cos(tmp_lat)*math.cos(tmp_lon-last_lon)) #try: #Pasamos la distancia de radianes a metros.. creo #David no me mates que esto lo escribi hace anhos try: - dist=math.acos(tempnum)*111.302*57.29577951 + #dist=math.acos(tempnum)*111.302*57.29577951 + dist=math.acos((math.sin(last_lat)*math.sin(tmp_lat))+(math.cos(last_lat)*math.cos(tmp_lat)*math.cos(tmp_lon-last_lon)))*111.302*57.29577951 except: dist=0 total_dist += dist This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vu...@us...> - 2009-04-02 20:59:26
|
Revision: 309 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=309&view=rev Author: vud1 Date: 2009-04-02 20:59:09 +0000 (Thu, 02 Apr 2009) Log Message: ----------- "optimizing gpx parse file" Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/gpx.py Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-03-30 21:40:11 UTC (rev 308) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-04-02 20:59:09 UTC (rev 309) @@ -64,7 +64,11 @@ logging.debug("parsing content from "+self.filename) self.dom = xml.dom.minidom.parse(self.filename) logging.debug("getting values...") + time1 = time.time() self.Values = self._getValues() + time2 = time.time() + time_ = time2-time1 + print "loading gpx file. Time: %f seconds " %time_ logging.debug("<<") def getMaxValues(self): @@ -90,6 +94,7 @@ dom = self.dom content = dom.toxml() + ''' trks = dom.getElementsByTagName("trk") retorno = [] for trk in trks: @@ -131,7 +136,7 @@ fp = open(newfilename,"a+") fp.write(content) fp.close() - +''' trkpoints = dom.getElementsByTagName("trkpt") retorno = [] his_vel = [] @@ -180,9 +185,11 @@ if last_lat != "False": time_ = tmp_time - last_time if time_>0: + #Caqlculate diference betwen last and new point tempnum=(math.sin(last_lat)*math.sin(tmp_lat))+(math.cos(last_lat)*math.cos(tmp_lat)*math.cos(tmp_lon-last_lon)) #try: - #Obtenemos el punto respecto al punto anterior + #Pasamos la distancia de radianes a metros.. creo + #David no me mates que esto lo escribi hace anhos try: dist=math.acos(tempnum)*111.302*57.29577951 except: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vu...@us...> - 2009-03-30 21:40:17
|
Revision: 308 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=308&view=rev Author: vud1 Date: 2009-03-30 21:40:11 +0000 (Mon, 30 Mar 2009) Log Message: ----------- Optimize record view tab system Modified Paths: -------------- pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-03-29 18:56:10 UTC (rev 307) +++ pytrainer/trunk/pytrainer/main.py 2009-03-30 21:40:11 UTC (rev 308) @@ -180,8 +180,6 @@ if view=="record": logging.debug('record view') if self.windowmain.recordview.get_current_page()==0: - self.refreshRecordGraphView("graphs") - self.refreshRecordGraphView("heartrate") self.refreshRecordGraphView("info") elif self.windowmain.recordview.get_current_page()==1: self.refreshRecordGraphView("graphs") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-29 18:56:15
|
Revision: 307 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=307&view=rev Author: dgranda Date: 2009-03-29 18:56:10 +0000 (Sun, 29 Mar 2009) Log Message: ----------- Creating a branch for garmintools integration Added Paths: ----------- pytrainer/branches/garmintools/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-29 16:17:16
|
Revision: 306 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=306&view=rev Author: dgranda Date: 2009-03-29 16:17:13 +0000 (Sun, 29 Mar 2009) Log Message: ----------- Tagging the 1.6.0.7 release Added Paths: ----------- pytrainer/tags/1.6.0.7/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-29 16:12:41
|
Revision: 305 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=305&view=rev Author: dgranda Date: 2009-03-29 16:12:37 +0000 (Sun, 29 Mar 2009) Log Message: ----------- Updating changes for 1.6.0.7 Modified Paths: -------------- pytrainer/trunk/CHANGES Modified: pytrainer/trunk/CHANGES =================================================================== --- pytrainer/trunk/CHANGES 2009-03-28 11:40:51 UTC (rev 304) +++ pytrainer/trunk/CHANGES 2009-03-29 16:12:37 UTC (rev 305) @@ -1,5 +1,8 @@ - PyTrainer tasks for 1.6.0.7: +Removing pytrainer gui minimal window size (svn rev 304) +Ordered shutdown of logging stuff (svn rev 303) +HR and elevation graphs included when exporting to wordpress (svn rev 302) Removal of maps directory due to license issue: https://sourceforge.net/mailarchive/message.php?msg_name=1237752714.4330.15.camel%40thinker.domain.lan (svn rev 300) Removal of opensuse_mozpytrainer.sh launch script as it is included in (renamed) pytrainer.sh. Deleted README.txt file to avoid confusion (svn rev 298) Updated INSTALL file with current package versions (svn rev 297) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vu...@us...> - 2009-03-28 11:41:00
|
Revision: 304 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=304&view=rev Author: vud1 Date: 2009-03-28 11:40:51 +0000 (Sat, 28 Mar 2009) Log Message: ----------- "removing pytrainer gui minimal window size" Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-03-28 10:14:14 UTC (rev 303) +++ pytrainer/trunk/glade/pytrainer.glade 2009-03-28 11:40:51 UTC (rev 304) @@ -4,8 +4,6 @@ <glade-interface> <widget class="GtkWindow" id="window1"> - <property name="width_request">840</property> - <property name="height_request">630</property> <property name="visible">True</property> <property name="title" translatable="yes">window1</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-28 10:14:25
|
Revision: 303 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=303&view=rev Author: dgranda Date: 2009-03-28 10:14:14 +0000 (Sat, 28 Mar 2009) Log Message: ----------- Ordered shutdown of logging stuff Modified Paths: -------------- pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-03-26 06:34:14 UTC (rev 302) +++ pytrainer/trunk/pytrainer/main.py 2009-03-28 10:14:14 UTC (rev 303) @@ -121,10 +121,12 @@ logging.debug('<<') def quit(self): - logging.debug('--') + logging.debug('--') + logging.info("Exit!") self.webservice.stop() self.windowmain.gtk_main_quit() - sys.exit("Exit!") + logging.shutdown() + sys.exit() # Any nonzero value is considered “abnormal termination” by shells and the like def loadPlugins(self): logging.debug('>>') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jli...@us...> - 2009-03-26 06:34:17
|
Revision: 302 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=302&view=rev Author: jliljenfeldt Date: 2009-03-26 06:34:14 +0000 (Thu, 26 Mar 2009) Log Message: ----------- HR and elevation graphs included when exporting to wordpress Modified Paths: -------------- pytrainer/trunk/extensions/wordpress/main.py pytrainer/trunk/pytrainer/gui/drawArea.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/extensions/wordpress/main.py =================================================================== --- pytrainer/trunk/extensions/wordpress/main.py 2009-03-25 18:37:34 UTC (rev 301) +++ pytrainer/trunk/extensions/wordpress/main.py 2009-03-26 06:34:14 UTC (rev 302) @@ -96,6 +96,18 @@ ''' %(self.sport,self.date,self.distance,self.time,self.calories,self.average,self.upositive,self.unegative) return description_table + def createFigures(self): + hr_fig_path = "/tmp/hr.png" + stage_fig_path = "/tmp/stage.png" + blog_figures = '' + # If there are no graphs, return empty string. + if os.path.isfile(hr_fig_path) and os.path.isfile(stage_fig_path): + #the graph files are created because the graph tabs are automatically visited (which invokes graph generation) + hrfile = self.wp.newMediaObject(hr_fig_path) + stagefile = self.wp.newMediaObject(stage_fig_path) + blog_figures = '''<br/> <img src='%s' /> <img src='%s' /> <br/>''' %(hrfile, stagefile) + return blog_figures + def createFoot(self): return ''' <center>Powered by <a href='http://pytrainer.e-oss.net'>Pytrainer</a></center>''' @@ -121,13 +133,13 @@ blog_route = self.createRoute() blog_body = self.createBody() blog_table = self.createTable() + blog_figures = self.createFigures() blog_foot = self.createFoot() - self.wp.selectBlog(0) post = wordpresslib.WordPressPost() post.title = blog_title - post.description = blog_body+blog_table+blog_route+blog_foot + post.description = blog_body+blog_table+blog_route+blog_figures+blog_foot post.categories = blog_category idNewPost = self.wp.newPost(post, False) return "The post has been submited" Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2009-03-25 18:37:34 UTC (rev 301) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2009-03-26 06:34:14 UTC (rev 302) @@ -90,6 +90,10 @@ self.canvas = FigureCanvasGTK(self.figure) # a gtk.DrawingArea self.canvas.show() self.vbox.pack_start(self.canvas, True, True) + if title[0] == 'Stage Profile': + self.figure.savefig('/tmp/stage.png', dpi=75) + if title[0] == 'Heart Rate': + self.figure.savefig('/tmp/hr.png', dpi=75) def drawPie(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): self.canvas.destroy() Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-03-25 18:37:34 UTC (rev 301) +++ pytrainer/trunk/pytrainer/main.py 2009-03-26 06:34:14 UTC (rev 302) @@ -178,6 +178,8 @@ if view=="record": logging.debug('record view') if self.windowmain.recordview.get_current_page()==0: + self.refreshRecordGraphView("graphs") + self.refreshRecordGraphView("heartrate") self.refreshRecordGraphView("info") elif self.windowmain.recordview.get_current_page()==1: self.refreshRecordGraphView("graphs") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-25 18:37:38
|
Revision: 301 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=301&view=rev Author: dgranda Date: 2009-03-25 18:37:34 +0000 (Wed, 25 Mar 2009) Log Message: ----------- Adding tasks for 1.6.0.7 Modified Paths: -------------- pytrainer/trunk/CHANGES Modified: pytrainer/trunk/CHANGES =================================================================== --- pytrainer/trunk/CHANGES 2009-03-25 18:36:37 UTC (rev 300) +++ pytrainer/trunk/CHANGES 2009-03-25 18:37:34 UTC (rev 301) @@ -1,7 +1,13 @@ - PyTrainer tasks for 1.6.0.7: +Removal of maps directory due to license issue: https://sourceforge.net/mailarchive/message.php?msg_name=1237752714.4330.15.camel%40thinker.domain.lan (svn rev 300) +Removal of opensuse_mozpytrainer.sh launch script as it is included in (renamed) pytrainer.sh. Deleted README.txt file to avoid confusion (svn rev 298) +Updated INSTALL file with current package versions (svn rev 297) +Fixed Google Maps integration (svn rev 296) +Updated garmin-hr config file with correct usb port value (svn rev 294) +Fixed bug where track record was supposed to be updated in database. Type cast was missing (svn rev 293) Bug #2100647 - Quick entry doesn't work if no gpx file - Fixed (svn rev. 287) -FR #2126411 - Package python-sqlite2 not needed anymore (http://www.python.org/doc/2.5.2/lib/module-sqlite3.html (svn rev. 286) +FR #2126411 - Package python-sqlite2 not needed anymore: http://www.python.org/doc/2.5.2/lib/module-sqlite3.html (svn rev. 286) - PyTrainer tasks for 1.6.0.6: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-25 18:36:40
|
Revision: 300 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=300&view=rev Author: dgranda Date: 2009-03-25 18:36:37 +0000 (Wed, 25 Mar 2009) Log Message: ----------- Removal of maps directory due to license issue Removed Paths: ------------- pytrainer/trunk/maps/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-25 18:17:16
|
Revision: 299 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=299&view=rev Author: dgranda Date: 2009-03-25 18:16:54 +0000 (Wed, 25 Mar 2009) Log Message: ----------- Logging added for troubleshooting Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/windowmain.py Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-03-25 18:14:17 UTC (rev 298) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-03-25 18:16:54 UTC (rev 299) @@ -19,6 +19,7 @@ import gobject import sys +import logging from SimpleGladeApp import * from popupmenu import PopupMenu @@ -132,6 +133,7 @@ i+=1 def actualize_recordview(self,record_list): + logging.debug(">>") conf = checkConf() filename = conf.getValue("conffile") configuration = XMLParser(filename) @@ -201,18 +203,24 @@ else: self.recordview.set_sensitive(0) + logging.debug(">>") def actualize_recordgraph(self,record_list): + logging.debug(">>") if len(record_list)>0: self.record_vbox.set_sensitive(1) else: self.record_vbox.set_sensitive(0) self.drawarearecord.drawgraph(record_list) + logging.debug("<<") def actualize_heartrategraph(self,record_list): + logging.debug(">>") self.drawareaheartrate.drawgraph(record_list) + logging.debug(">>") def actualize_hrview(self,record_list,zones,is_karvonen_method): + logging.debug(">>") if len(record_list)>0: record_list=record_list[0] self.record_zone1.set_text("%s-%s" %(zones[4][0],zones[4][1])) @@ -230,8 +238,10 @@ self.record_zonesmethod.set_text(_("Percentages method")) else: self.recordview.set_sensitive(0) + logging.debug("<<") def actualize_dayview(self,record_list): + logging.debug(">>") conf = checkConf() filename = conf.getValue("conffile") configuration = XMLParser(filename) @@ -300,18 +310,24 @@ else: self.dayview.set_sensitive(0) + logging.debug("<<") def actualize_daygraph(self,record_list): + logging.debug(">>") if len(record_list)>0: self.day_vbox.set_sensitive(1) else: self.day_vbox.set_sensitive(0) self.drawareaday.drawgraph(record_list) + logging.debug("<<") def actualize_map(self,id_record): + logging.debug(">>") self.googlemaps.drawMap(id_record) + logging.debug("<<") def actualize_monthview(self,record_list, nameMonth): + logging.debug(">>") self.month_date.set_text(nameMonth) km = calories = time = average = beats = 0 num_records = len(record_list) @@ -385,11 +401,15 @@ self.monthview.set_sensitive(1) else: self.monthview.set_sensitive(0) + logging.debug("<<") def actualize_monthgraph(self,record_list): + logging.debug(">>") self.drawareamonth.drawgraph(record_list) + logging.debug("<<") def actualize_yearview(self,record_list, year): + logging.debug(">>") self.year_date.set_text("%d" %int(year)) km = calories = time = average = beats = 0 num_records = len(record_list) @@ -442,11 +462,15 @@ else: self.yearview.set_sensitive(0) self.drawareayear.drawgraph([]) + logging.debug("<<") def actualize_yeargraph(self,record_list): + logging.debug(">>") self.drawareayear.drawgraph(record_list) + logging.debug("<<") def actualize_listview(self,record_list): + logging.debug(">>") #recod list tiene: #date,distance,average,title,sports.name,id_record,time,beats,caloriesi #Laas columnas son: @@ -482,8 +506,10 @@ ) #self.allRecordTreeView.set_headers_clickable(True) self.allRecordTreeView.set_model(store) + logging.debug("<<") def actualize_waypointview(self,record_list,default_waypoint,redrawmap = 1): + logging.debug(">>") #redrawmap: indica si tenemos que refrescar tb el mapa. 1 si 0 no #waypoint list tiene: #id_waypoint,lat,lon,ele,comment,time,name,sym @@ -527,6 +553,7 @@ if redrawmap == 1: self.waypointeditor.createHtml(default_waypoint) self.waypointeditor.drawMap() + logging.debug("<<") def on_waypointTreeView_button_press(self, treeview, event): x = int(event.x) @@ -647,9 +674,11 @@ self.parent.newRecord() def on_sportlist_changed(self,widget): + logging.debug("--") self.parent.refreshGraphView(self.selected_view) def on_page_change(self,widget,gpointer,page): + logging.debug("--") if page == 0: self.selected_view="record" elif page == 1: @@ -681,15 +710,19 @@ self.infoarea.show() def on_day_combovalue_changed(self,widget): + logging.debug("--") self.parent.refreshGraphView(self.selected_view) def on_month_combovalue_changed(self,widget): + logging.debug("--") self.parent.refreshGraphView(self.selected_view) def on_year_combovalue_changed(self,widget): + logging.debug("--") self.parent.refreshGraphView(self.selected_view) def on_calendar_selected(self,widget): + logging.debug("--") if self.block: self.block = False else: @@ -699,6 +732,7 @@ self.parent.refreshGraphView(self.selected_view) def on_calendar_changemonth(self,widget): + logging.debug("--") self.block = True self.notebook.set_current_page(2) self.selected_view="month" @@ -706,6 +740,7 @@ self.parent.refreshGraphView(self.selected_view) def on_calendar_next_year(self,widget): + logging.debug("--") self.block = True self.notebook.set_current_page(3) self.selected_view="year" @@ -736,6 +771,7 @@ self.parent.editGpsPlugins() #hasta aqui revisado def on_allRecordTreeView_button_press(self, treeview, event): + logging.debug(">>") print "on_allRecordTreeView_" x = int(event.x) y = int(event.y) @@ -756,9 +792,11 @@ elif event.button == 1: self.notebook.set_current_page(0) self.parent.refreshGraphView("record") + logging.debug("<<") return False def actualize_recordTreeView(self, record_list): + logging.debug(">>") iterOne = False store = gtk.ListStore( gobject.TYPE_INT, @@ -778,6 +816,7 @@ self.recordTreeView.set_model(store) if iterOne: self.recordTreeView.get_selection().select_iter(iterOne) + logging.debug("<<") #if len(record_list)>0: def parseFloat(self,string): @@ -787,9 +826,11 @@ return float(0) def actualize_calendar(self,record_list): + logging.debug(">>") self.calendar.clear_marks() for i in record_list: self.calendar.mark_day(int(i)) + logging.debug("<<") def on_about_activate(self,widget): aboutwindow = About(self.data_path, self.version) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-25 18:14:23
|
Revision: 298 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=298&view=rev Author: dgranda Date: 2009-03-25 18:14:17 +0000 (Wed, 25 Mar 2009) Log Message: ----------- New launch script (pytrainer.sh) to avoid confusion Added Paths: ----------- pytrainer/trunk/pytrainer.sh Removed Paths: ------------- pytrainer/trunk/README.txt pytrainer/trunk/mozpytrainer.sh pytrainer/trunk/opensuse_mozpytrainer.sh Deleted: pytrainer/trunk/README.txt =================================================================== --- pytrainer/trunk/README.txt 2009-03-25 18:11:54 UTC (rev 297) +++ pytrainer/trunk/README.txt 2009-03-25 18:14:17 UTC (rev 298) @@ -1,10 +0,0 @@ -If you want launch pytrainer with googlemaps embed you -need have installed mozilla-firefox. You need, too, have -propierly configured the shared library. - -You can launch pytrainer in this way: - -LD_LIBRARY_PATH=/usr/lib/firefox python pytrainer.py - -or add /usr/lib/firefox (or the direcory where -libgtkmozembed.so is installed in) to the /etc/ld.so.conf.d file Deleted: pytrainer/trunk/mozpytrainer.sh =================================================================== --- pytrainer/trunk/mozpytrainer.sh 2009-03-25 18:11:54 UTC (rev 297) +++ pytrainer/trunk/mozpytrainer.sh 2009-03-25 18:14:17 UTC (rev 298) @@ -1,3 +0,0 @@ -#/bin/sh - -LD_LIBRARY_PATH=/usr/lib/firefox MOZILLA_FIVE_HOME=/usr/lib/firefox python pytrainer.py $1 Deleted: pytrainer/trunk/opensuse_mozpytrainer.sh =================================================================== --- pytrainer/trunk/opensuse_mozpytrainer.sh 2009-03-25 18:11:54 UTC (rev 297) +++ pytrainer/trunk/opensuse_mozpytrainer.sh 2009-03-25 18:14:17 UTC (rev 298) @@ -1,19 +0,0 @@ -#/bin/sh - -if test -L /usr/lib/xulrunner-1.8.1 -then -echo using the symlink to the current directory -LD_LIBRARY_PATH=/usr/lib/xulrunner-1.8.1 MOZILLA_FIVE_HOME=/usr/lib/firefox python pytrainer.py $1 -elif test -d /usr/lib/xulrunner-1.8.1.4 -then -LD_LIBRARY_PATH=/usr/lib/xulrunner-1.8.1.4 MOZILLA_FIVE_HOME=/usr/lib/firefox python pytrainer.py $1 - -elif test -d /usr/lib/xulrunner-1.8.10 -then -LD_LIBRARY_PATH=/usr/lib/xulrunner-1.8.1.10 MOZILLA_FIVE_HOME=/usr/lib/firefox python pytrainer.py $1 -else -echo neither directory exists. Try looking in /usr/lib for "xulrunner-something" and amend this script -echo to look for that directory too. -echo You are also encouraged to improve this script so it automatically detects the correct directory... -fi - Added: pytrainer/trunk/pytrainer.sh =================================================================== --- pytrainer/trunk/pytrainer.sh (rev 0) +++ pytrainer/trunk/pytrainer.sh 2009-03-25 18:14:17 UTC (rev 298) @@ -0,0 +1,8 @@ +#/bin/sh +# First arg is log level, e.g. -d for DEBUG +export LD_LIBRARY_PATH=/usr/lib/firefox +# Building xulrunner path to avoid problems when upgrading +PATH_XULRUNNER=/usr/lib +XULRUNNER_VERSION=`ls "$PATH_XULRUNNER" | grep xulrunner` +export MOZILLA_FIVE_HOME=$PATH_XULRUNNER/$XULRUNNER_VERSION +python pytrainer.py $1 Property changes on: pytrainer/trunk/pytrainer.sh ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-25 18:11:59
|
Revision: 297 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=297&view=rev Author: dgranda Date: 2009-03-25 18:11:54 +0000 (Wed, 25 Mar 2009) Log Message: ----------- Updated INSTALL file with current package versions Modified Paths: -------------- pytrainer/trunk/INSTALL Modified: pytrainer/trunk/INSTALL =================================================================== --- pytrainer/trunk/INSTALL 2009-03-25 18:03:42 UTC (rev 296) +++ pytrainer/trunk/INSTALL 2009-03-25 18:11:54 UTC (rev 297) @@ -7,23 +7,23 @@ Here you are dependencies for PyTrainer. Of course you must have a working environment with proper shell configuration and typical GNU tools to uncompress (gunzip) and untar (tar) files. -1.1.- Mandatory packages (Fedora 9 package revisions as of 21.10.2008) +1.1.- Mandatory packages (Fedora 10 package revisions as of 24.03.2009 for 1.6.0.7) -python-2.5.1-26 -libxml2-python-2.7.1-2 +python-2.5.2-1 +libxml2-python-2.7.3-1 (removed python-sqlite2-2.3.3-3 from 1.6.0.7 on) -pygtk2-libglade-2.12.1-6 -pygtk2-2.12.1-6 -python-matplotlib-0.91.4-1 +pygtk2-libglade-2.13.0-3 +pygtk2-2.13.0-3 +python-matplotlib-0.98.1-1 SOAPpy-0.11.6-7 sqlite-3.5.6-2 (sqlite is preferred as db than mysql) -gnome-python2-gtkmozembed-2.19.1-18 +gnome-python2-gtkmozembed-2.19.1-27 gpsbabel-1.3.5-1 -xulrunner-1.9.0.2-1 1.2.- Optional packages (Google Maps integration) -firefox-3.0.1-1 +xulrunner-1.9.0.7-1 +firefox-3.0.7-1 2.- Installation process @@ -31,7 +31,7 @@ $ tar -xf pytrainer-X.Y.Z.tar.gz $ cd pytrainer-X.Y.Z -$ ./pytrainer.py -i +$ ./pytrainer.sh -i *** Log level set to INFO *** ... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-25 18:03:57
|
Revision: 296 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=296&view=rev Author: dgranda Date: 2009-03-25 18:03:42 +0000 (Wed, 25 Mar 2009) Log Message: ----------- Fixed Google Maps integration Modified Paths: -------------- pytrainer/trunk/pytrainer/extensions/googlemaps.py Modified: pytrainer/trunk/pytrainer/extensions/googlemaps.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-03-25 18:00:55 UTC (rev 295) +++ pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-03-25 18:03:42 UTC (rev 296) @@ -19,6 +19,7 @@ import gtkmozembed import os import re +import logging from pytrainer.lib.system import checkConf from pytrainer.lib.gpx import Gpx @@ -27,15 +28,19 @@ class Googlemaps: def __init__(self, data_path = None, vbox = None, waypoint = None): + logging.debug(">>") self.data_path = data_path self.conf = checkConf() + gtkmozembed.set_profile_path("/tmp", "foobar") # http://faq.pygtk.org/index.py?req=show&file=faq19.018.htp self.moz = gtkmozembed.MozEmbed() - vbox.pack_start(self.moz, True, True) + vbox.pack_start(self.moz, True, True) vbox.show_all() self.htmlfile = "" self.waypoint=waypoint + logging.debug("<<") def drawMap(self,id_record): + logging.debug(">>") code = "googlemapsviewer" extensiondir = self.conf.getValue("extensiondir")+"/"+code if not os.path.isdir(extensiondir): @@ -44,7 +49,6 @@ levels = [] pointlist = [] htmlfile = self.conf.getValue("tmpdir")+"/index.html" - gpxfile = self.conf.getValue("gpxdir")+"/%s.gpx" %id_record if os.path.isfile(gpxfile): gpx = Gpx(self.data_path,gpxfile) @@ -56,16 +60,16 @@ self.createHtml(points,levels,pointlist[0]) htmlfile = os.path.abspath(htmlfile) + logging.debug("HTML file created: "+htmlfile) if htmlfile != self.htmlfile: - self.moz.load_url("file://"+htmlfile) + self.moz.load_url("file://"+htmlfile) else: self.createErrorHtml() self.moz.load_url("file://"+htmlfile) - # self.htmlfile = htmlfile - #else: - # pass + logging.debug("<<") def createHtml(self,points,levels,init_point): + logging.debug(">>") waypoints = self.waypoint.getAllWaypoints() tmpdir = self.conf.getValue("tmpdir") content = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \n" @@ -163,8 +167,10 @@ filename = tmpdir+"/index.html" file = fileUtils(filename,content) file.run() + logging.debug("<<") def createErrorHtml(self): + logging.debug(">>") content = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \n" content += " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n" content += " <html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:v=\"urn:schemas-microsoft-com:vml\">\n" @@ -178,3 +184,4 @@ filename = tmpdir+"/index.html" file = fileUtils(filename,content) file.run() + logging.debug("<<") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-25 18:01:04
|
Revision: 295 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=295&view=rev Author: dgranda Date: 2009-03-25 18:00:55 +0000 (Wed, 25 Mar 2009) Log Message: ----------- Cosmetic changes regarding var names and logging Modified Paths: -------------- pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/plugins.py pytrainer/trunk/pytrainer/record.py Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-03-25 17:54:16 UTC (rev 294) +++ pytrainer/trunk/pytrainer/main.py 2009-03-25 18:00:55 UTC (rev 295) @@ -256,6 +256,7 @@ logging.debug('>>') selected,iter = self.windowmain.recordTreeView.get_selection().get_selected() id_record = selected.get_value(iter,0) + logging.debug('Trying to show map for record '+str(id_record)) self.windowmain.actualize_map(id_record) logging.debug('<<') @@ -383,6 +384,7 @@ if version_tmp<="1.5.0.1": self.ddbb.addweightandmet2ddbb() if version_tmp<="1.5.0.2": + logging.info('Adding maxspeed, maxpace, pace and maxbeats columns') self.ddbb.addpaceandmax2ddbb() if version_tmp < "1.6.0.1": logging.info('Adding date_time_utc column and retrieving data from local GPX files') Modified: pytrainer/trunk/pytrainer/plugins.py =================================================================== --- pytrainer/trunk/pytrainer/plugins.py 2009-03-25 17:54:16 UTC (rev 294) +++ pytrainer/trunk/pytrainer/plugins.py 2009-03-25 18:00:55 UTC (rev 295) @@ -17,6 +17,7 @@ #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import os +import logging from lib.xmlUtils import XMLParser from lib.system import checkConf @@ -36,24 +37,28 @@ return retorno def loadPlugin(self,plugin): + logging.debug('>>') info = XMLParser(plugin+"/conf.xml") button = info.getValue("pytrainer-plugin","pluginbutton") name = info.getValue("pytrainer-plugin","name") - print "Loading Plugin %s" %name + logging.info('Loading plugin '+name) + logging.debug('<<') return button,plugin def runPlugin(self,pathPlugin): + logging.debug('>>') info = XMLParser(pathPlugin+"/conf.xml") bin = info.getValue("pytrainer-plugin","executable") - binnary = pathPlugin+"/"+bin + binary = pathPlugin+"/"+bin params = "" for opt in self.getPluginConfParams(pathPlugin): if opt[0]!="status": params += " --%s %s" %(opt[0],opt[1]) - print "%s %s" %(binnary,params) - gpxfile = os.popen("%s %s" %(binnary,params)).read() + logging.debug('Executing '+binary+' '+params) + gpxfile = os.popen("%s %s" %(binary,params)).read() gpxfile = gpxfile.replace("\n","") gpxfile = gpxfile.replace("\r","") + logging.debug('<<') if gpxfile == "0": return False return gpxfile Modified: pytrainer/trunk/pytrainer/record.py =================================================================== --- pytrainer/trunk/pytrainer/record.py 2009-03-25 17:54:16 UTC (rev 294) +++ pytrainer/trunk/pytrainer/record.py 2009-03-25 18:00:55 UTC (rev 295) @@ -220,7 +220,7 @@ logging.debug('<<') def parseFloatRecord(self,string): - logging.debug('>>') + logging.debug('--') if string != "": try: return float(string.replace(",",",")) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-03-25 17:54:44
|
Revision: 294 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=294&view=rev Author: dgranda Date: 2009-03-25 17:54:16 +0000 (Wed, 25 Mar 2009) Log Message: ----------- Updated garmin-hr config file with correct usb port value Modified Paths: -------------- pytrainer/trunk/plugins/garmin-hr/conf.xml Modified: pytrainer/trunk/plugins/garmin-hr/conf.xml =================================================================== --- pytrainer/trunk/plugins/garmin-hr/conf.xml 2009-02-25 17:57:21 UTC (rev 293) +++ pytrainer/trunk/plugins/garmin-hr/conf.xml 2009-03-25 17:54:16 UTC (rev 294) @@ -6,5 +6,5 @@ pluginbutton="Import from Garmin (HR support)" executable="main.py" > -<conf-values variable="device" value="/dev/ttyUSB0"/> +<conf-values variable="device" value="usb:"/> </pytrainer-plugin> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |