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: <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: <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: <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-16 20:38:29
|
Revision: 321 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=321&view=rev Author: vud1 Date: 2009-04-16 20:38:15 +0000 (Thu, 16 Apr 2009) Log Message: ----------- Adding translaters script Modified Paths: -------------- pytrainer/trunk/messages.pot Added Paths: ----------- pytrainer/trunk/utils/ pytrainer/trunk/utils/translator.sh Modified: pytrainer/trunk/messages.pot =================================================================== --- pytrainer/trunk/messages.pot 2009-04-16 20:36:20 UTC (rev 320) +++ pytrainer/trunk/messages.pot 2009-04-16 20:38:15 UTC (rev 321) @@ -8,203 +8,201 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-03-03 19:57+0100\n" +"POT-Creation-Date: 2009-04-16 22:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: glade/pytrainer.glade:10 +#: glade/pytrainer.glade:8 msgid "window1" msgstr "" -#: glade/pytrainer.glade:50 +#: glade/pytrainer.glade:48 msgid "_File" msgstr "" -#: glade/pytrainer.glade:74 +#: glade/pytrainer.glade:72 msgid "_Export as Text Separated by Commas" msgstr "" -#: glade/pytrainer.glade:114 +#: glade/pytrainer.glade:112 msgid "_Edit" msgstr "" -#: glade/pytrainer.glade:136 +#: glade/pytrainer.glade:134 msgid "_View" msgstr "" -#: glade/pytrainer.glade:145 +#: glade/pytrainer.glade:143 msgid " _Classic View" msgstr "" -#: glade/pytrainer.glade:156 +#: glade/pytrainer.glade:154 msgid " _List View" msgstr "" -#: glade/pytrainer.glade:168 +#: glade/pytrainer.glade:166 msgid " _Waypoints Editor" msgstr "" -#: glade/pytrainer.glade:184 +#: glade/pytrainer.glade:182 msgid "Tools" msgstr "" -#: glade/pytrainer.glade:194 glade/pytrainer.glade:12298 +#: glade/pytrainer.glade:192 glade/pytrainer.glade:12254 msgid "Extensions" msgstr "" -#: glade/pytrainer.glade:204 +#: glade/pytrainer.glade:202 msgid "GPS Device Plugins" msgstr "" -#: glade/pytrainer.glade:218 +#: glade/pytrainer.glade:216 msgid "_Help" msgstr "" -#: glade/pytrainer.glade:338 pytrainer/gui/windowmain.py:49 -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:471 -#: pytrainer/gui/windowprofile.py:67 +#: glade/pytrainer.glade:336 msgid "Sport" msgstr "" -#: glade/pytrainer.glade:364 +#: glade/pytrainer.glade:362 msgid "All Sports" msgstr "" -#: glade/pytrainer.glade:473 glade/pytrainer.glade:838 -#: glade/pytrainer.glade:866 +#: glade/pytrainer.glade:471 glade/pytrainer.glade:836 +#: glade/pytrainer.glade:864 msgid " " msgstr "" -#: glade/pytrainer.glade:501 glade/pytrainer.glade:894 +#: glade/pytrainer.glade:499 glade/pytrainer.glade:892 msgid " " msgstr "" -#: glade/pytrainer.glade:529 +#: glade/pytrainer.glade:527 msgid "<b>Sport:</b>" msgstr "" -#: glade/pytrainer.glade:557 glade/pytrainer.glade:2996 -#: glade/pytrainer.glade:4124 glade/pytrainer.glade:5419 +#: glade/pytrainer.glade:555 glade/pytrainer.glade:2994 +#: glade/pytrainer.glade:4122 glade/pytrainer.glade:5417 msgid "<b>Time:</b>" msgstr "" -#: glade/pytrainer.glade:586 glade/pytrainer.glade:3193 -#: glade/pytrainer.glade:4294 glade/pytrainer.glade:5643 +#: glade/pytrainer.glade:584 glade/pytrainer.glade:3191 +#: glade/pytrainer.glade:4292 glade/pytrainer.glade:5641 msgid "<b>Speed:</b>" msgstr "" -#: glade/pytrainer.glade:614 glade/pytrainer.glade:3502 -#: glade/pytrainer.glade:4658 glade/pytrainer.glade:5813 +#: glade/pytrainer.glade:612 glade/pytrainer.glade:3500 +#: glade/pytrainer.glade:4656 glade/pytrainer.glade:5811 msgid "<b>Pace:</b>" msgstr "" -#: glade/pytrainer.glade:642 +#: glade/pytrainer.glade:640 msgid "<b>Ascent:</b>" msgstr "" -#: glade/pytrainer.glade:670 +#: glade/pytrainer.glade:668 msgid "<b>Comments:</b>" msgstr "" -#: glade/pytrainer.glade:698 glade/pytrainer.glade:1381 -#: glade/pytrainer.glade:3249 glade/pytrainer.glade:3306 -#: glade/pytrainer.glade:4350 glade/pytrainer.glade:4519 -#: glade/pytrainer.glade:5699 glade/pytrainer.glade:5727 +#: glade/pytrainer.glade:696 glade/pytrainer.glade:1379 +#: glade/pytrainer.glade:3247 glade/pytrainer.glade:3304 +#: glade/pytrainer.glade:4348 glade/pytrainer.glade:4517 +#: glade/pytrainer.glade:5697 glade/pytrainer.glade:5725 msgid "km/h" msgstr "" -#: glade/pytrainer.glade:726 glade/pytrainer.glade:1091 -#: glade/pytrainer.glade:3530 glade/pytrainer.glade:3586 -#: glade/pytrainer.glade:4714 glade/pytrainer.glade:4742 -#: glade/pytrainer.glade:5870 glade/pytrainer.glade:5898 +#: glade/pytrainer.glade:724 glade/pytrainer.glade:1089 +#: glade/pytrainer.glade:3528 glade/pytrainer.glade:3584 +#: glade/pytrainer.glade:4712 glade/pytrainer.glade:4740 +#: glade/pytrainer.glade:5868 glade/pytrainer.glade:5896 msgid "min/km" msgstr "" -#: glade/pytrainer.glade:754 glade/pytrainer.glade:1147 +#: glade/pytrainer.glade:752 glade/pytrainer.glade:1145 msgid "m" msgstr "" -#: glade/pytrainer.glade:782 +#: glade/pytrainer.glade:780 msgid " " msgstr "" -#: glade/pytrainer.glade:810 glade/pytrainer.glade:1119 -#: glade/pytrainer.glade:2042 glade/pytrainer.glade:2070 -#: glade/pytrainer.glade:2098 glade/pytrainer.glade:2266 -#: glade/pytrainer.glade:3698 glade/pytrainer.glade:4854 +#: glade/pytrainer.glade:808 glade/pytrainer.glade:1117 +#: glade/pytrainer.glade:2040 glade/pytrainer.glade:2068 +#: glade/pytrainer.glade:2096 glade/pytrainer.glade:2264 +#: glade/pytrainer.glade:3696 glade/pytrainer.glade:4852 msgid " " msgstr "" -#: glade/pytrainer.glade:922 +#: glade/pytrainer.glade:920 msgid "<b>Date:</b>" msgstr "" -#: glade/pytrainer.glade:950 glade/pytrainer.glade:2968 -#: glade/pytrainer.glade:4096 glade/pytrainer.glade:5391 +#: glade/pytrainer.glade:948 glade/pytrainer.glade:2966 +#: glade/pytrainer.glade:4094 glade/pytrainer.glade:5389 msgid "<b>Distance:</b>" msgstr "" -#: glade/pytrainer.glade:979 +#: glade/pytrainer.glade:977 msgid "<b>Max Speed</b>" msgstr "" -#: glade/pytrainer.glade:1007 glade/pytrainer.glade:3558 -#: glade/pytrainer.glade:4686 glade/pytrainer.glade:5842 +#: glade/pytrainer.glade:1005 glade/pytrainer.glade:3556 +#: glade/pytrainer.glade:4684 glade/pytrainer.glade:5840 msgid "<b>Max Pace:</b>" msgstr "" -#: glade/pytrainer.glade:1035 +#: glade/pytrainer.glade:1033 msgid "<b>Descent:</b>" msgstr "" -#: glade/pytrainer.glade:1063 +#: glade/pytrainer.glade:1061 msgid " " msgstr "" -#: glade/pytrainer.glade:1213 glade/pytrainer.glade:2912 -#: glade/pytrainer.glade:4040 glade/pytrainer.glade:5615 +#: glade/pytrainer.glade:1211 glade/pytrainer.glade:2910 +#: glade/pytrainer.glade:4038 glade/pytrainer.glade:5613 msgid "Km" msgstr "" -#: glade/pytrainer.glade:1246 glade/pytrainer.glade:1296 -#: glade/pytrainer.glade:1346 glade/pytrainer.glade:3030 -#: glade/pytrainer.glade:3080 glade/pytrainer.glade:3130 -#: glade/pytrainer.glade:4208 glade/pytrainer.glade:4258 -#: glade/pytrainer.glade:5503 glade/pytrainer.glade:5553 +#: glade/pytrainer.glade:1244 glade/pytrainer.glade:1294 +#: glade/pytrainer.glade:1344 glade/pytrainer.glade:3028 +#: glade/pytrainer.glade:3078 glade/pytrainer.glade:3128 +#: glade/pytrainer.glade:4206 glade/pytrainer.glade:4256 +#: glade/pytrainer.glade:5501 glade/pytrainer.glade:5551 msgid "00" msgstr "" -#: glade/pytrainer.glade:1271 glade/pytrainer.glade:1321 -#: glade/pytrainer.glade:3055 glade/pytrainer.glade:3105 -#: glade/pytrainer.glade:4183 glade/pytrainer.glade:4233 -#: glade/pytrainer.glade:5478 glade/pytrainer.glade:5528 -#: glade/pytrainer.glade:7648 glade/pytrainer.glade:7693 +#: glade/pytrainer.glade:1269 glade/pytrainer.glade:1319 +#: glade/pytrainer.glade:3053 glade/pytrainer.glade:3103 +#: glade/pytrainer.glade:4181 glade/pytrainer.glade:4231 +#: glade/pytrainer.glade:5476 glade/pytrainer.glade:5526 +#: glade/pytrainer.glade:7646 glade/pytrainer.glade:7691 msgid ":" msgstr "" -#: glade/pytrainer.glade:1415 glade/pytrainer.glade:2377 -#: glade/pytrainer.glade:2939 glade/pytrainer.glade:3221 -#: glade/pytrainer.glade:3362 glade/pytrainer.glade:3446 -#: glade/pytrainer.glade:3726 glade/pytrainer.glade:3754 -#: glade/pytrainer.glade:4067 glade/pytrainer.glade:4322 -#: glade/pytrainer.glade:4406 glade/pytrainer.glade:4602 -#: glade/pytrainer.glade:4882 glade/pytrainer.glade:5222 -#: glade/pytrainer.glade:5306 glade/pytrainer.glade:5362 -#: glade/pytrainer.glade:5671 glade/pytrainer.glade:5954 -#: glade/pytrainer.glade:5982 glade/pytrainer.glade:6010 -#: glade/pytrainer.glade:6038 +#: glade/pytrainer.glade:1413 glade/pytrainer.glade:2375 +#: glade/pytrainer.glade:2937 glade/pytrainer.glade:3219 +#: glade/pytrainer.glade:3360 glade/pytrainer.glade:3444 +#: glade/pytrainer.glade:3724 glade/pytrainer.glade:3752 +#: glade/pytrainer.glade:4065 glade/pytrainer.glade:4320 +#: glade/pytrainer.glade:4404 glade/pytrainer.glade:4600 +#: glade/pytrainer.glade:4880 glade/pytrainer.glade:5220 +#: glade/pytrainer.glade:5304 glade/pytrainer.glade:5360 +#: glade/pytrainer.glade:5669 glade/pytrainer.glade:5952 +#: glade/pytrainer.glade:5980 glade/pytrainer.glade:6008 +#: glade/pytrainer.glade:6036 msgid " " msgstr "" -#: glade/pytrainer.glade:1522 +#: glade/pytrainer.glade:1520 msgid " <b>Title:</b>" msgstr "" -#: glade/pytrainer.glade:1636 +#: glade/pytrainer.glade:1634 msgid "" "Profile\n" "Speed\n" @@ -212,12 +210,12 @@ "Heart Rate" msgstr "" -#: glade/pytrainer.glade:1655 glade/pytrainer.glade:5040 -#: glade/pytrainer.glade:6196 +#: glade/pytrainer.glade:1653 glade/pytrainer.glade:5038 +#: glade/pytrainer.glade:6194 msgid "Versus" msgstr "" -#: glade/pytrainer.glade:1680 +#: glade/pytrainer.glade:1678 msgid "" "None\n" "Profile\n" @@ -226,135 +224,135 @@ "Heart Rate\n" msgstr "" -#: glade/pytrainer.glade:1845 +#: glade/pytrainer.glade:1843 msgid "<b>Beats:</b>" msgstr "" -#: glade/pytrainer.glade:1873 glade/pytrainer.glade:3334 -#: glade/pytrainer.glade:4378 glade/pytrainer.glade:5194 +#: glade/pytrainer.glade:1871 glade/pytrainer.glade:3332 +#: glade/pytrainer.glade:4376 glade/pytrainer.glade:5192 msgid "<b>Calories: </b>" msgstr "" -#: glade/pytrainer.glade:1901 glade/pytrainer.glade:3614 -#: glade/pytrainer.glade:4798 glade/pytrainer.glade:5926 +#: glade/pytrainer.glade:1899 glade/pytrainer.glade:3612 +#: glade/pytrainer.glade:4796 glade/pytrainer.glade:5924 msgid "<b>Max Beats:</b>" msgstr "" -#: glade/pytrainer.glade:1929 +#: glade/pytrainer.glade:1927 msgid "<b>HR Zones Method:</b>" msgstr "" -#: glade/pytrainer.glade:1958 +#: glade/pytrainer.glade:1956 msgid "<b>HR Zone5:</b>" msgstr "" -#: glade/pytrainer.glade:1986 glade/pytrainer.glade:2350 +#: glade/pytrainer.glade:1984 glade/pytrainer.glade:2348 msgid " bpm" msgstr "" -#: glade/pytrainer.glade:2014 +#: glade/pytrainer.glade:2012 msgid " Cal" msgstr "" -#: glade/pytrainer.glade:2126 +#: glade/pytrainer.glade:2124 msgid "<b>HR Zone4:</b>" msgstr "" -#: glade/pytrainer.glade:2154 +#: glade/pytrainer.glade:2152 msgid "<b>HR Zone3:</b>" msgstr "" -#: glade/pytrainer.glade:2182 +#: glade/pytrainer.glade:2180 msgid "<b>HR Zone2:</b>" msgstr "" -#: glade/pytrainer.glade:2210 +#: glade/pytrainer.glade:2208 msgid "<b>HR Zone1:</b>" msgstr "" -#: glade/pytrainer.glade:2238 glade/pytrainer.glade:2294 -#: glade/pytrainer.glade:2322 glade/pytrainer.glade:3670 -#: glade/pytrainer.glade:4491 glade/pytrainer.glade:4826 +#: glade/pytrainer.glade:2236 glade/pytrainer.glade:2292 +#: glade/pytrainer.glade:2320 glade/pytrainer.glade:3668 +#: glade/pytrainer.glade:4489 glade/pytrainer.glade:4824 msgid " " msgstr "" -#: glade/pytrainer.glade:2405 glade/pytrainer.glade:2432 -#: glade/pytrainer.glade:2460 glade/pytrainer.glade:2488 -#: glade/pytrainer.glade:2516 glade/pytrainer.glade:3474 -#: glade/pytrainer.glade:3642 glade/pytrainer.glade:4630 -#: glade/pytrainer.glade:4770 glade/pytrainer.glade:5334 -#: glade/pytrainer.glade:5755 +#: glade/pytrainer.glade:2403 glade/pytrainer.glade:2430 +#: glade/pytrainer.glade:2458 glade/pytrainer.glade:2486 +#: glade/pytrainer.glade:2514 glade/pytrainer.glade:3472 +#: glade/pytrainer.glade:3640 glade/pytrainer.glade:4628 +#: glade/pytrainer.glade:4768 glade/pytrainer.glade:5332 +#: glade/pytrainer.glade:5753 msgid "bpm" msgstr "" -#: glade/pytrainer.glade:2544 +#: glade/pytrainer.glade:2542 msgid " " msgstr "" -#: glade/pytrainer.glade:2582 +#: glade/pytrainer.glade:2580 msgid " <b>Heart Rate:</b>" msgstr "" -#: glade/pytrainer.glade:2759 glade/pytrainer.glade:7010 -#: glade/pytrainer.glade:10877 +#: glade/pytrainer.glade:2757 glade/pytrainer.glade:7008 +#: glade/pytrainer.glade:10875 msgid "label-2147483648" msgstr "" -#: glade/pytrainer.glade:2797 +#: glade/pytrainer.glade:2795 msgid "label-2147483647" msgstr "" -#: glade/pytrainer.glade:2853 +#: glade/pytrainer.glade:2851 msgid "Record" msgstr "" -#: glade/pytrainer.glade:3278 glade/pytrainer.glade:4463 -#: glade/pytrainer.glade:5784 +#: glade/pytrainer.glade:3276 glade/pytrainer.glade:4461 +#: glade/pytrainer.glade:5782 msgid "<b>Max Speed:</b>" msgstr "" -#: glade/pytrainer.glade:3390 glade/pytrainer.glade:4434 -#: glade/pytrainer.glade:5250 +#: glade/pytrainer.glade:3388 glade/pytrainer.glade:4432 +#: glade/pytrainer.glade:5248 msgid "Cal" msgstr "" -#: glade/pytrainer.glade:3418 glade/pytrainer.glade:4574 -#: glade/pytrainer.glade:5278 +#: glade/pytrainer.glade:3416 glade/pytrainer.glade:4572 +#: glade/pytrainer.glade:5276 msgid "<b>Beats avg:</b>" msgstr "" -#: glade/pytrainer.glade:3792 +#: glade/pytrainer.glade:3790 msgid " <b>Date:</b>" msgstr "" -#: glade/pytrainer.glade:3867 +#: glade/pytrainer.glade:3865 msgid "Value" msgstr "" -#: glade/pytrainer.glade:3892 +#: glade/pytrainer.glade:3890 msgid "" "Stage Profile\n" "Stage Velocity\n" "Stage Profile/velocity" msgstr "" -#: glade/pytrainer.glade:3981 +#: glade/pytrainer.glade:3979 msgid "Day" msgstr "" -#: glade/pytrainer.glade:4158 glade/pytrainer.glade:5453 +#: glade/pytrainer.glade:4156 glade/pytrainer.glade:5451 msgid "000" msgstr "" -#: glade/pytrainer.glade:4547 glade/pytrainer.glade:7846 +#: glade/pytrainer.glade:4545 glade/pytrainer.glade:7844 msgid " " msgstr "" -#: glade/pytrainer.glade:4920 +#: glade/pytrainer.glade:4918 msgid " <b>Month:</b>" msgstr "" -#: glade/pytrainer.glade:5020 glade/pytrainer.glade:6176 +#: glade/pytrainer.glade:5018 glade/pytrainer.glade:6174 msgid "" "Kilometers\n" "Time\n" @@ -363,7 +361,7 @@ "Calories" msgstr "" -#: glade/pytrainer.glade:5065 glade/pytrainer.glade:6221 +#: glade/pytrainer.glade:5063 glade/pytrainer.glade:6219 msgid "" "None\n" "Kilometers\n" @@ -373,43 +371,43 @@ "Calories" msgstr "" -#: glade/pytrainer.glade:5135 +#: glade/pytrainer.glade:5133 msgid "Month" msgstr "" -#: glade/pytrainer.glade:6076 +#: glade/pytrainer.glade:6074 msgid " <b>Year:</b>" msgstr "" -#: glade/pytrainer.glade:6291 +#: glade/pytrainer.glade:6289 msgid "Year" msgstr "" -#: glade/pytrainer.glade:6334 +#: glade/pytrainer.glade:6332 msgid "label154" msgstr "" -#: glade/pytrainer.glade:6371 +#: glade/pytrainer.glade:6369 msgid "<b>Title:</b>" msgstr "" -#: glade/pytrainer.glade:6416 +#: glade/pytrainer.glade:6414 msgid "Search" msgstr "" -#: glade/pytrainer.glade:6463 +#: glade/pytrainer.glade:6461 msgid "Columns" msgstr "" -#: glade/pytrainer.glade:6538 +#: glade/pytrainer.glade:6536 msgid "label155" msgstr "" -#: glade/pytrainer.glade:6672 +#: glade/pytrainer.glade:6670 msgid "Type:" msgstr "" -#: glade/pytrainer.glade:6700 +#: glade/pytrainer.glade:6698 msgid "" "Font\n" "Restaurant\n" @@ -417,776 +415,409 @@ "Summit" msgstr "" -#: glade/pytrainer.glade:6721 +#: glade/pytrainer.glade:6719 msgid "Latitude: " msgstr "" -#: glade/pytrainer.glade:6749 +#: glade/pytrainer.glade:6747 msgid " Name:" msgstr "" -#: glade/pytrainer.glade:6777 +#: glade/pytrainer.glade:6775 msgid "Longitude:" msgstr "" -#: glade/pytrainer.glade:6805 glade/pytrainer.glade:12486 -#: glade/pytrainer.glade:12809 +#: glade/pytrainer.glade:6803 glade/pytrainer.glade:12442 +#: glade/pytrainer.glade:12765 msgid "Description:" msgstr "" -#: glade/pytrainer.glade:6925 +#: glade/pytrainer.glade:6923 msgid "<b> Waypoint: </b>" msgstr "" -#: glade/pytrainer.glade:7058 +#: glade/pytrainer.glade:7056 msgid "label162" msgstr "" -#: glade/pytrainer.glade:7198 +#: glade/pytrainer.glade:7196 msgid "label163" msgstr "" -#: glade/pytrainer.glade:7223 +#: glade/pytrainer.glade:7221 msgid "New Entry" msgstr "" -#: glade/pytrainer.glade:7296 +#: glade/pytrainer.glade:7294 msgid "Title:" msgstr "" -#: glade/pytrainer.glade:7345 +#: glade/pytrainer.glade:7343 msgid "GPX File:" msgstr "" -#: glade/pytrainer.glade:7415 +#: glade/pytrainer.glade:7413 msgid "Calculate Values" msgstr "" -#: glade/pytrainer.glade:7434 +#: glade/pytrainer.glade:7432 msgid "Sport:" msgstr "" -#: glade/pytrainer.glade:7485 +#: glade/pytrainer.glade:7483 msgid "<b>Main</b>" msgstr "" -#: glade/pytrainer.glade:7546 +#: glade/pytrainer.glade:7544 msgid "Distance (Km):" msgstr "" -#: glade/pytrainer.glade:7575 glade/pytrainer.glade:7772 -#: glade/pytrainer.glade:8053 glade/pytrainer.glade:8299 -#: glade/pytrainer.glade:8767 glade/pytrainer.glade:11515 +#: glade/pytrainer.glade:7573 glade/pytrainer.glade:7770 +#: glade/pytrainer.glade:8051 glade/pytrainer.glade:8297 +#: glade/pytrainer.glade:8765 glade/pytrainer.glade:11513 msgid "Calculate" msgstr "" -#: glade/pytrainer.glade:7594 +#: glade/pytrainer.glade:7592 msgid "Time:" msgstr "" -#: glade/pytrainer.glade:7792 +#: glade/pytrainer.glade:7790 msgid "Date:" msgstr "" -#: glade/pytrainer.glade:7912 glade/pytrainer.glade:11565 +#: glade/pytrainer.glade:7910 glade/pytrainer.glade:11563 msgid "<b>General</b>" msgstr "" -#: glade/pytrainer.glade:7973 +#: glade/pytrainer.glade:7971 msgid "Max (km/h):" msgstr "" -#: glade/pytrainer.glade:8024 +#: glade/pytrainer.glade:8022 msgid "Velocity (km/h)" msgstr "" -#: glade/pytrainer.glade:8099 +#: glade/pytrainer.glade:8097 msgid "<b>Velocity</b>" msgstr "" -#: glade/pytrainer.glade:8135 +#: glade/pytrainer.glade:8133 msgid "Quick Entry" msgstr "" -#: glade/pytrainer.glade:8195 +#: glade/pytrainer.glade:8193 msgid "Max (min/km):" msgstr "" -#: glade/pytrainer.glade:8247 +#: glade/pytrainer.glade:8245 msgid "Pace (min/km):" msgstr "" -#: glade/pytrainer.glade:8322 +#: glade/pytrainer.glade:8320 msgid "<b>Pace</b>" msgstr "" -#: glade/pytrainer.glade:8383 +#: glade/pytrainer.glade:8381 msgid "Ascent:" msgstr "" -#: glade/pytrainer.glade:8435 +#: glade/pytrainer.glade:8433 msgid "Descent:" msgstr "" -#: glade/pytrainer.glade:8490 +#: glade/pytrainer.glade:8488 msgid "<b>Accumulated Altitude Change</b>" msgstr "" -#: glade/pytrainer.glade:8551 +#: glade/pytrainer.glade:8549 msgid "Max (bpm):" msgstr "" -#: glade/pytrainer.glade:8580 +#: glade/pytrainer.glade:8578 msgid "Heart rate:" msgstr "" -#: glade/pytrainer.glade:8654 pytrainer/gui/windowmain.py:475 -#: pytrainer/monthgraph.py:77 +#: glade/pytrainer.glade:8652 msgid "Calories" msgstr "" -#: glade/pytrainer.glade:8705 +#: glade/pytrainer.glade:8703 msgid "" "<small><b>Note:</b> In order to calculate the calories you must set the " "sport MET (in Preferences->Sport) </small>" msgstr "" -#: glade/pytrainer.glade:8822 +#: glade/pytrainer.glade:8820 msgid "<b>Heart Rate</b>" msgstr "" -#: glade/pytrainer.glade:8858 +#: glade/pytrainer.glade:8856 msgid "Advanced" msgstr "" -#: glade/pytrainer.glade:8955 +#: glade/pytrainer.glade:8953 msgid "<b>Comments</b>" msgstr "" -#: glade/pytrainer.glade:8984 +#: glade/pytrainer.glade:8982 msgid "Comments" msgstr "" -#: glade/pytrainer.glade:9089 +#: glade/pytrainer.glade:9087 msgid "Preferences" msgstr "" -#: glade/pytrainer.glade:9163 +#: glade/pytrainer.glade:9161 msgid "Metric system" msgstr "" -#: glade/pytrainer.glade:9185 +#: glade/pytrainer.glade:9183 msgid "U.S. customary units" msgstr "" -#: glade/pytrainer.glade:9211 +#: glade/pytrainer.glade:9209 msgid "<b>System of Measurement</b>" msgstr "" -#: glade/pytrainer.glade:9271 +#: glade/pytrainer.glade:9269 msgid "Database type:" msgstr "" -#: glade/pytrainer.glade:9299 +#: glade/pytrainer.glade:9297 msgid "Database host:" msgstr "" -#: glade/pytrainer.glade:9348 +#: glade/pytrainer.glade:9346 msgid "Database name:" msgstr "" -#: glade/pytrainer.glade:9416 +#: glade/pytrainer.glade:9414 msgid "Database user:" msgstr "" -#: glade/pytrainer.glade:9444 +#: glade/pytrainer.glade:9442 msgid "Database pass:" msgstr "" -#: glade/pytrainer.glade:9518 +#: glade/pytrainer.glade:9516 msgid "<b>Database</b>" msgstr "" -#: glade/pytrainer.glade:9578 +#: glade/pytrainer.glade:9576 msgid "Use this port for internal connections: " msgstr "" -#: glade/pytrainer.glade:9629 +#: glade/pytrainer.glade:9627 msgid "" "<small><b>Note:</b> Change this only if you know what you are doing</small>" msgstr "" -#: glade/pytrainer.glade:9661 +#: glade/pytrainer.glade:9659 msgid "<b>Port Connnection</b>" msgstr "" -#: glade/pytrainer.glade:9697 +#: glade/pytrainer.glade:9695 msgid "General" msgstr "" -#: glade/pytrainer.glade:9750 +#: glade/pytrainer.glade:9748 msgid "User name:" msgstr "" -#: glade/pytrainer.glade:9778 +#: glade/pytrainer.glade:9776 msgid "Gender:" msgstr "" -#: glade/pytrainer.glade:9824 +#: glade/pytrainer.glade:9822 msgid "Height:" msgstr "" -#: glade/pytrainer.glade:9895 +#: glade/pytrainer.glade:9893 msgid "Date of birth:" msgstr "" -#: glade/pytrainer.glade:10007 +#: glade/pytrainer.glade:10005 msgid "Weight:" msgstr "" -#: glade/pytrainer.glade:10039 +#: glade/pytrainer.glade:10037 msgid "<b>Athlete Details</b>" msgstr "" -#: glade/pytrainer.glade:10068 +#: glade/pytrainer.glade:10066 msgid "Athlete" msgstr "" -#: glade/pytrainer.glade:10251 +#: glade/pytrainer.glade:10249 msgid "<b>Sport List</b>" msgstr "" -#: glade/pytrainer.glade:10280 +#: glade/pytrainer.glade:10278 msgid "llist" msgstr "" -#: glade/pytrainer.glade:10360 glade/pytrainer.glade:12430 -#: glade/pytrainer.glade:12921 +#: glade/pytrainer.glade:10358 glade/pytrainer.glade:12386 +#: glade/pytrainer.glade:12877 msgid "Name:" msgstr "" -#: glade/pytrainer.glade:10388 +#: glade/pytrainer.glade:10386 msgid "M.E.T.:" msgstr "" -#: glade/pytrainer.glade:10437 +#: glade/pytrainer.glade:10435 msgid "Extra Weight:" msgstr "" -#: glade/pytrainer.glade:10513 glade/pytrainer.glade:11119 +#: glade/pytrainer.glade:10511 glade/pytrainer.glade:11117 msgid "" "<small><b>Note:</b> You can get your M.E.T. sport Coefficient here: http://" "pytrainer.e-oss.net/met.pdf</small>" msgstr "" -#: glade/pytrainer.glade:10624 +#: glade/pytrainer.glade:10622 msgid "<b>Add New Sport</b>" msgstr "" -#: glade/pytrainer.glade:10653 +#: glade/pytrainer.glade:10651 msgid "new" msgstr "" -#: glade/pytrainer.glade:10713 +#: glade/pytrainer.glade:10711 msgid "" "Deleting a sport removes associated records.\n" "Continue?" msgstr "" -#: glade/pytrainer.glade:10853 +#: glade/pytrainer.glade:10851 msgid "<b>Delete Sport</b>" msgstr "" -#: glade/pytrainer.glade:10913 +#: glade/pytrainer.glade:10911 msgid "delete" msgstr "" -#: glade/pytrainer.glade:10972 +#: glade/pytrainer.glade:10970 msgid "Name" msgstr "" -#: glade/pytrainer.glade:11021 +#: glade/pytrainer.glade:11019 msgid "M.E.T." msgstr "" -#: glade/pytrainer.glade:11070 pytrainer/gui/windowprofile.py:67 +#: glade/pytrainer.glade:11068 msgid "Extra Weight" msgstr "" -#: glade/pytrainer.glade:11236 +#: glade/pytrainer.glade:11234 msgid "<b>Edit Sport</b>" msgstr "" -#: glade/pytrainer.glade:11260 +#: glade/pytrainer.glade:11258 msgid "<b>lalaal</b>" msgstr "" -#: glade/pytrainer.glade:11296 +#: glade/pytrainer.glade:11294 msgid "edit" msgstr "" -#: glade/pytrainer.glade:11325 +#: glade/pytrainer.glade:11323 msgid "Sports" msgstr "" -#: glade/pytrainer.glade:11384 +#: glade/pytrainer.glade:11382 msgid "Maximun heart rate:" msgstr "" -#: glade/pytrainer.glade:11412 +#: glade/pytrainer.glade:11410 msgid "Resting heart rate:" msgstr "" -#: glade/pytrainer.glade:11486 +#: glade/pytrainer.glade:11484 msgid "" "<small><b>Note:</b> Maximun heart rate is calculated by subtracting the " "number 220 minus your age. </small>" msgstr "" -#: glade/pytrainer.glade:11625 +#: glade/pytrainer.glade:11623 msgid "" "<small><b>NOTE:</b> in order to use the Karvonen method you must cover the " "Resting hr field.</small>" msgstr "" -#: glade/pytrainer.glade:11654 +#: glade/pytrainer.glade:11652 msgid "Percentages based method" msgstr "" -#: glade/pytrainer.glade:11676 pytrainer/gui/windowmain.py:194 +#: glade/pytrainer.glade:11674 msgid "Karvonen method" msgstr "" -#: glade/pytrainer.glade:11698 +#: glade/pytrainer.glade:11696 msgid "Select how to calculate your heart rate zones." msgstr "" -#: glade/pytrainer.glade:11730 +#: glade/pytrainer.glade:11728 msgid "<b>Heart Rate Zones</b>" msgstr "" -#: glade/pytrainer.glade:11766 pytrainer/daygraph.py:58 -#: pytrainer/heartrategraph.py:33 pytrainer/recordgraph.py:78 +#: glade/pytrainer.glade:11764 msgid "Heart Rate" msgstr "" -#: glade/pytrainer.glade:11871 +#: glade/pytrainer.glade:11869 msgid "Calendar" msgstr "" -#: glade/pytrainer.glade:11997 -msgid "pytrainer" -msgstr "" - -#: glade/pytrainer.glade:11998 -msgid "(c) Fiz Vazquez <vu...@si...>" -msgstr "" - -#: glade/pytrainer.glade:11999 -msgid "Track sporting activities and performance" -msgstr "" - -#: glade/pytrainer.glade:12000 -msgid "" -"(C) Fiz Vazquez\n" -"\n" -" This program is free software; you can redistribute \n" -" it and/or modify it under the terms of the GNU \n" -" General Public License as published by the Free \n" -" Software Foundation; either version 2 of the License, \n" -" or (at your option) any later version.\n" -"\n" -" This program is distributed in the hope that it will be \n" -" useful, but WITHOUT ANY WARRANTY; without even the\n" -" implied warranty of MERCHANTABILITY or FITNESS FOR \n" -" A PARTICULAR PURPOSE. See the GNU General Public \n" -" License <http://www.opensource.org/gpl-license.html>\n" -" for more details.\n" -"\n" -" You can found the license on Debian systems in the file\n" -" /usr/share/common-licenses/GPL\n" -msgstr "" - -#: glade/pytrainer.glade:12020 -msgid "pytrainer.e-oss.net" -msgstr "" - -#: glade/pytrainer.glade:12022 -msgid "" -"Basque: Jabier Santamaria <men...@gm...>\n" -"Catalan: Eloi Crespillo Itchart <el...@ik...>\n" -"Czech: Lobus Pokorny <sp...@se...>\n" -"French: Dj <dj...@dj...>\n" -"French: Pierre Gaigé <pg...@fr...>\n" -"Norwegian: Havard Davidsen <hav...@gm...>\n" -"Polish: Seweryn Kokot <sk...@po...>\n" -"german: Aleks <al...@sc...>\n" -"Spanish: Fiz vazquez <vu...@si...>" -msgstr "" - -#: glade/pytrainer.glade:12115 +#: glade/pytrainer.glade:12071 msgid "Edit Record" msgstr "" -#: glade/pytrainer.glade:12136 +#: glade/pytrainer.glade:12092 msgid "Show graph in classic view" msgstr "" -#: glade/pytrainer.glade:12172 +#: glade/pytrainer.glade:12128 msgid "warning" msgstr "" -#: glade/pytrainer.glade:12374 +#: glade/pytrainer.glade:12330 msgid "<b>Extension Details</b>" msgstr "" -#: glade/pytrainer.glade:12402 +#: glade/pytrainer.glade:12358 msgid "name-entry" msgstr "" -#: glade/pytrainer.glade:12458 glade/pytrainer.glade:12865 +#: glade/pytrainer.glade:12414 glade/pytrainer.glade:12821 msgid "Status:" msgstr "" -#: glade/pytrainer.glade:12514 glade/pytrainer.glade:12837 +#: glade/pytrainer.glade:12470 glade/pytrainer.glade:12793 msgid "status-entry" msgstr "" -#: glade/pytrainer.glade:12542 +#: glade/pytrainer.glade:12498 msgid "description-entry" msgstr "" -#: glade/pytrainer.glade:12677 +#: glade/pytrainer.glade:12633 msgid "Plugins" msgstr "" -#: glade/pytrainer.glade:12752 +#: glade/pytrainer.glade:12708 msgid "<b>Plugin Details</b>" msgstr "" -#: glade/pytrainer.glade:12781 +#: glade/pytrainer.glade:12737 msgid "description-entry " msgstr "" -#: glade/pytrainer.glade:12893 +#: glade/pytrainer.glade:12849 msgid "nameEntry" msgstr "" -#: glade/pytrainer.glade:13064 +#: glade/pytrainer.glade:13020 msgid "Select track record" msgstr "" - -#: pytrainer/main.py:94 pytrainer/main.py:94 -msgid "No Active Plugins" -msgstr "" - -#: pytrainer/main.py:103 pytrainer/main.py:103 -msgid "No Active Extensions" -msgstr "" - -#: pytrainer/main.py:245 pytrainer/main.py:245 -msgid "Delete this database entry?" -msgstr "" - -#: pytrainer/main.py:256 pytrainer/main.py:256 -msgid "Delete this waypoint?" -msgstr "" - -#: pytrainer/lib/heartrate.py:46 -msgid "Moderate activity" -msgstr "" - -#: pytrainer/lib/heartrate.py:47 -msgid "Weight Control" -msgstr "" - -#: pytrainer/lib/heartrate.py:48 -msgid "Aerobic" -msgstr "" - -#: pytrainer/lib/heartrate.py:49 -msgid "Anaerobic" -msgstr "" - -#: pytrainer/lib/heartrate.py:50 -msgid "VO2 MAX" -msgstr "" - -#: pytrainer/lib/gpx.py:75 -msgid "No Name" -msgstr "" - -#: pytrainer/lib/gpx.py:81 -msgid "No Data" -msgstr "" - -#: pytrainer/lib/date.py:73 -msgid "January" -msgstr "" - -#: pytrainer/lib/date.py:74 -msgid "Febrary" -msgstr "" - -#: pytrainer/lib/date.py:75 -msgid "March" -msgstr "" - -#: pytrainer/lib/date.py:76 -msgid "April" -msgstr "" - -#: pytrainer/lib/date.py:77 -msgid "May" -msgstr "" - -#: pytrainer/lib/date.py:78 -msgid "June" -msgstr "" - -#: pytrainer/lib/date.py:79 -msgid "July" -msgstr "" - -#: pytrainer/lib/date.py:80 -msgid "August" -msgstr "" - -#: pytrainer/lib/date.py:81 -msgid "September" -msgstr "" - -#: pytrainer/lib/date.py:82 -msgid "October" -msgstr "" - -#: pytrainer/lib/date.py:83 -msgid "November" -msgstr "" - -#: pytrainer/lib/date.py:84 -msgid "December" -msgstr "" - -#: pytrainer/yeargraph.py:69 pytrainer/yeargraph.py:71 -#: pytrainer/yeargraph.py:73 pytrainer/yeargraph.py:75 -#: pytrainer/yeargraph.py:77 -msgid "month" -msgstr "" - -#: pytrainer/yeargraph.py:69 -msgid "kilometers" -msgstr "" - -#: pytrainer/yeargraph.py:69 -msgid "monthly kilometers" -msgstr "" - -#: pytrainer/yeargraph.py:71 -msgid "time in hours" -msgstr "" - -#: pytrainer/yeargraph.py:71 -msgid "monthly time" -msgstr "" - -#: pytrainer/yeargraph.py:73 -msgid "beats per minute" -msgstr "" - -#: pytrainer/yeargraph.py:73 -msgid "monthly beats" -msgstr "" - -#: pytrainer/yeargraph.py:75 -msgid "average (hm/h)" -msgstr "" - -#: pytrainer/yeargraph.py:75 -msgid "monthly averages" -msgstr "" - -#: pytrainer/yeargraph.py:77 -msgid "calories" -msgstr "" - -#: pytrainer/yeargraph.py:77 -msgid "monthly calories" -msgstr "" - -#: pytrainer/gui/windowmain.py:49 pytrainer/gui/windowmain.py:52 -#: pytrainer/gui/windowmain.py:56 -msgid "id" -msgstr "" - -#: pytrainer/gui/windowmain.py:49 -msgid "Kilometer" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:468 -msgid "Title" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:469 -#: pytrainer/gui/dialogselecttrack.py:36 -msgid "Date" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:470 -msgid "Distance" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:472 -msgid "Time" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:473 -msgid "Beats" -msgstr "" - -#: pytrainer/gui/windowmain.py:52 pytrainer/gui/windowmain.py:474 -msgid "Average" -msgstr "" - -#: pytrainer/gui/windowmain.py:56 -msgid "Waypoint" -msgstr "" - -#: pytrainer/gui/windowmain.py:196 -msgid "Percentages method" -msgstr "" - -#: pytrainer/gui/windowplugins.py:70 pytrainer/gui/windowplugins.py:97 -#: pytrainer/gui/windowextensions.py:70 -msgid "Enable" -msgstr "" - -#: pytrainer/gui/windowplugins.py:72 pytrainer/gui/windowplugins.py:96 -#: pytrainer/gui/windowextensions.py:72 -msgid "Disable" -msgstr "" - -#: pytrainer/gui/windowplugins.py:81 pytrainer/gui/windowextensions.py:81 -#, python-format -msgid "%s settings" -msgstr "" - -#: pytrainer/gui/windowplugins.py:104 -msgid "Ok" -msgstr "" - -#: pytrainer/gui/windowextensions.py:104 pytrainer/gui/windowextensions.py:117 -msgid "OK" -msgstr "" - -#: pytrainer/gui/windowprofile.py:49 -msgid "Male" -msgstr "" - -#: pytrainer/gui/windowprofile.py:50 -msgid "Female" -msgstr "" - -#: pytrainer/gui/windowprofile.py:67 -msgid "MET" -msgstr "" - -#: pytrainer/gui/dialogselecttrack.py:36 -msgid "Track Name" -msgstr "" - -#: pytrainer/daygraph.py:54 pytrainer/daygraph.py:56 pytrainer/daygraph.py:58 -#: pytrainer/heartrategraph.py:33 pytrainer/recordgraph.py:72 -#: pytrainer/recordgraph.py:74 pytrainer/recordgraph.py:76 -#: pytrainer/recordgraph.py:78 -msgid "Distance (km)" -msgstr "" - -#: pytrainer/daygraph.py:54 pytrainer/recordgraph.py:72 -msgid "Height (m)" -msgstr "" - -#: pytrainer/daygraph.py:54 pytrainer/recordgraph.py:72 -msgid "Stage Profile" -msgstr "" - -#: pytrainer/daygraph.py:56 -msgid "Velocity (Km/h)" -msgstr "" - -#: pytrainer/daygraph.py:56 -msgid "Velocity" -msgstr "" - -#: pytrainer/daygraph.py:58 pytrainer/heartrategraph.py:33 -#: pytrainer/recordgraph.py:78 -msgid "Beats (bpm)" -msgstr "" - -#: pytrainer/monthgraph.py:69 pytrainer/monthgraph.py:71 -#: pytrainer/monthgraph.py:73 pytrainer/monthgraph.py:75 -#: pytrainer/monthgraph.py:77 -msgid "day" -msgstr "" - -#: pytrainer/monthgraph.py:69 -msgid "Kilometers" -msgstr "" - -#: pytrainer/monthgraph.py:69 -msgid "Daily kilometers" -msgstr "" - -#: pytrainer/monthgraph.py:71 -msgid "Time in Hours" -msgstr "" - -#: pytrainer/monthgraph.py:71 -msgid "Daily Time" -msgstr "" - -#: pytrainer/monthgraph.py:73 -msgid "Beats per Minute" -msgstr "" - -#: pytrainer/monthgraph.py:73 -msgid "Daily Beats" -msgstr "" - -#: pytrainer/monthgraph.py:75 -msgid "Average (km/h)" -msgstr "" - -#: pytrainer/monthgraph.py:75 -msgid "Daily Averages" -msgstr "" - -#: pytrainer/monthgraph.py:77 -msgid "Daily Calories" -msgstr "" - -#: pytrainer/recordgraph.py:74 -msgid "Speed (Km/h)" -msgstr "" - -#: pytrainer/recordgraph.py:74 -msgid "Speed" -msgstr "" - -#: pytrainer/recordgraph.py:76 -msgid "Pace (min/km)" -msgstr "" - -#: pytrainer/recordgraph.py:76 -msgid "Pace" -msgstr "" - -#: pytrainer/record.py:207 -msgid "pyTrainer cant import data from your gpx file" -msgstr "" - -#: pytrainer/waypoint.py:67 -msgid "" -"The gpx file seems to be a several days records. Perhaps you will need to " -"edit your gpx file" -msgstr "" Added: pytrainer/trunk/utils/translator.sh =================================================================== --- pytrainer/trunk/utils/translator.sh (rev 0) +++ pytrainer/trunk/utils/translator.sh 2009-04-16 20:38:15 UTC (rev 321) @@ -0,0 +1,24 @@ +#!/bin/sh + + +SOFTWARE=$(zenity --list --text="Select your translation software" --radiolist --column "Pick" --column "Software" TRUE "gtranslator" FALSE "kbabel") +if [ $? != 0 ]; then exit ; fi + +LANGUAGE=$(zenity --list --text="Select your language" --radiolist --column "Pick" --column "Language" TRUE "es" FALSE "eu" FALSE "ca" FALSE "fr" FALSE "da" FALSE "de" FALSE "pl" FALSE "no" FALSE "cs" FALSE "ru" FALSE "pl") +if [ $? != 0 ]; then exit ; fi + +cd ../ + +xgettext glade/pytrainer.glade -o ./messages.pot +if [ $? != 0 ]; then echo "WARNNING: xgettext not found. Please, install gettext package"; exit; fi +find ./ -iname "*.py" -exec xgettext -k_ -j -o ./messages.pot ./pytrainer/main.py {} + +msginit -i ./messages.pot -l $LANGUAGE -o ./locale/$LANGUAGE/LC_MESSAGES/pytrainer_$LANGUAGE.pot + +cd ./locale/$LANGUAGE/LC_MESSAGES/ +make merge +$SOFTWARE pytrainer_$LANGUAGE.po +if [ $? != 0 ]; then echo "WARNNING: $SOFTWARE not found"; exit ; fi +make + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-04-19 10:37:35
|
Revision: 325 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=325&view=rev Author: dgranda Date: 2009-04-19 10:37:23 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Updating changelog and version to 1.6.0.8 Modified Paths: -------------- pytrainer/trunk/CHANGES pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/CHANGES =================================================================== --- pytrainer/trunk/CHANGES 2009-04-19 10:32:07 UTC (rev 324) +++ pytrainer/trunk/CHANGES 2009-04-19 10:37:23 UTC (rev 325) @@ -1,3 +1,12 @@ +- PyTrainer tasks for 1.6.0.8: + +Rotating log file support added (rev 322, http://sourceforge.net/tracker/?func=detail&aid=2717142&group_id=213157&atid=1024595) +Translations reviewed and added script to facilitate them (rev 319-321,323) +Several improvements to Wordpress extension (rev 315,317) +Changed potential problems when dealing with date objects using MySQL as DB (rev 311-314) +Removing redundant calls improving graphical performance (rev 310, linked to http://sourceforge.net/tracker/?func=detail&aid=2717135&group_id=213157&atid=1024592, not yet fully fixed) +Optimizing xml files parsing when retrieving data from them (rev 309) + - PyTrainer tasks for 1.6.0.7: Removing pytrainer gui minimal window size (svn rev 304) Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-04-19 10:32:07 UTC (rev 324) +++ pytrainer/trunk/pytrainer/main.py 2009-04-19 10:37:23 UTC (rev 325) @@ -86,7 +86,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.6.0.7" # 20.10.2008 + self.version ="1.6.0.8" # 19.04.2009 self.date = Date() # Checking profile This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-05-17 16:48:52
|
Revision: 329 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=329&view=rev Author: dgranda Date: 2009-05-17 16:48:27 +0000 (Sun, 17 May 2009) Log Message: ----------- Changing address of FSF - Bug ID 2791401 Modified Paths: -------------- pytrainer/trunk/COPYING pytrainer/trunk/pytrainer/gui/aboutdialog.py Modified: pytrainer/trunk/COPYING =================================================================== --- pytrainer/trunk/COPYING 2009-04-19 20:16:15 UTC (rev 328) +++ pytrainer/trunk/COPYING 2009-05-17 16:48:27 UTC (rev 329) @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -55,7 +55,7 @@ The precise terms and conditions for copying, distribution and modification follow. - + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -110,7 +110,7 @@ License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -278,7 +278,7 @@ POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest Modified: pytrainer/trunk/pytrainer/gui/aboutdialog.py =================================================================== --- pytrainer/trunk/pytrainer/gui/aboutdialog.py 2009-04-19 20:16:15 UTC (rev 328) +++ pytrainer/trunk/pytrainer/gui/aboutdialog.py 2009-05-17 16:48:27 UTC (rev 329) @@ -17,7 +17,7 @@ #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software -#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import gtk @@ -29,7 +29,7 @@ def run(self): authors = ["Fiz Vázquez <vu...@si...>\nDavid García Granda <dg...@gm...>"] translator_credits = "Basque: Jabier Santamaria <men...@gm...>\nCatalan: Eloi Crespillo Itchart <el...@ik...>\nCzech: Lobus Pokorny <sp...@se...>\nFrench: Dj <dj...@dj...>\nFrench: Pierre Gaigé <pg...@fr...>\nNorwegian: Havard Davidsen <hav...@gm...>\nPolish: Seweryn Kokot <sk...@po...>\nGerman: Aleks <al...@sc...>\nSpanish: Fiz Vázquez <vu...@si...>" - license = "PyTrainer - The free sport tracking center\nCopyright (C) 2005-08 Fiz Vázquez\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA" + license = "PyTrainer - The free sport tracking center\nCopyright (C) 2005-08 Fiz Vázquez\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA" about_dialog = gtk.AboutDialog() about_dialog.set_destroy_with_parent(True) about_dialog.set_name("pyTrainer") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vu...@us...> - 2009-06-25 22:29:27
|
Revision: 332 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=332&view=rev Author: vud1 Date: 2009-06-25 22:29:24 +0000 (Thu, 25 Jun 2009) Log Message: ----------- "Testing multi y-axis graphs" Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/drawArea.py pytrainer/trunk/pytrainer.sh Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2009-06-20 10:38:44 UTC (rev 331) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2009-06-25 22:29:24 UTC (rev 332) @@ -22,9 +22,12 @@ from matplotlib.axes import Subplot from matplotlib.backends.backend_gtk import FigureCanvasGTK, NavigationToolbar from matplotlib.numerix import * +import matplotlib.pyplot as plt from pylab import * import logging +import numpy as np + class DrawArea: def __init__(self, vbox = None): logging.debug('>>') @@ -81,26 +84,40 @@ logging.debug('>>') self.canvas.destroy() self.vbox.remove(self.canvas) - self.figure = Figure(figsize=(6,4), dpi=72) - #self.axis.clear() + self.figure = plt.figure() + self.axis.clear() i = 0 for value in xvalues: - #logging.debug('xvalues: '+str(xvalues)) - if len(xvalues) == 1: + if i==0: self.axis = self.figure.add_subplot(111) - else: - self.axis =self.figure.add_subplot(211 + i) - self.axis.set_xlabel(xlabel[i]) - self.axis.set_ylabel(ylabel[i]) - self.axis.set_title(title[i]) - self.axis.grid(True) - self.axis.plot(xvalues[i],yvalues[i], color=color[i]) + self.axis.plot(xvalues[i],yvalues[i], color=color[i]) + self.axis.set_xlabel(xlabel[i]) + #self.axis.set_ylabel(ylabel[i],color=color[i]) + if (len(xvalues)>1): + self.axis.set_title("%s vs %s" %(ylabel[0],ylabel[1])) + else: + self.axis.set_title("%s" %(ylabel[0])) + + self.axis.grid(True) + for tl in self.axis.get_yticklabels(): + tl.set_color('%s' %color[i]) + if i==1: + ax2 = self.axis.twinx() + ax2.plot(xvalues[i], yvalues[i], color=color[i]) + for tl in ax2.get_yticklabels(): + tl.set_color('%s' %color[i]) + # axis2 = self.axis.twinx() + # axis2.plot(xvalues[i],yvalues[i], color=color[i]) + #axis2.set_ylabel(ylabel[i],color=color[i]) + #else: + # self.axis =self.figure.add_subplot(211 + i) i+=1 - - if zones!=None: - for zone in zones: - p = self.axis.axhspan(zone[0], zone[1], facecolor=zone[2], alpha=0.5, label=zone[3]) - l = self.axis.legend(loc='lower right') + + + #if zones!=None: + # for zone in zones: + # p = self.axis.axhspan(zone[0], zone[1], facecolor=zone[2], alpha=0.5, label=zone[3]) + # l = self.axis.legend(loc='lower right') self.canvas = FigureCanvasGTK(self.figure) # a gtk.DrawingArea self.canvas.show() self.vbox.pack_start(self.canvas, True, True) Modified: pytrainer/trunk/pytrainer.sh =================================================================== --- pytrainer/trunk/pytrainer.sh 2009-06-20 10:38:44 UTC (rev 331) +++ pytrainer/trunk/pytrainer.sh 2009-06-25 22:29:24 UTC (rev 332) @@ -1,5 +1,6 @@ #/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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-07-21 17:20:25
|
Revision: 341 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=341&view=rev Author: dgranda Date: 2009-07-21 17:20:22 +0000 (Tue, 21 Jul 2009) Log Message: ----------- Maximum is misspelled Maximun, see http://bugs.debian.org/537723 Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/locale/ca/LC_MESSAGES/pytrainer_ca.pot pytrainer/trunk/locale/de/LC_MESSAGES/pytrainer_de.pot pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot pytrainer/trunk/locale/eu/LC_MESSAGES/pytrainer_eu.pot pytrainer/trunk/locale/fr/LC_MESSAGES/pytrainer_fr.po pytrainer/trunk/locale/fr/LC_MESSAGES/pytrainer_fr.pot pytrainer/trunk/locale/no/LC_MESSAGES/pytrainer_no.pot pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_pl.pot pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_ru.po pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_ru.pot pytrainer/trunk/messages.pot Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/glade/pytrainer.glade 2009-07-21 17:20:22 UTC (rev 341) @@ -11379,7 +11379,7 @@ <child> <widget class="GtkLabel" id="label-2147483641"> <property name="visible">True</property> - <property name="label" translatable="yes">Maximun heart rate:</property> + <property name="label" translatable="yes">Maximum heart rate:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -11481,7 +11481,7 @@ <child> <widget class="GtkLabel" id="label-2147483639"> <property name="visible">True</property> - <property name="label" translatable="yes"><small><b>Note:</b> Maximun heart rate is calculated by subtracting the number 220 minus your age. </small></property> + <property name="label" translatable="yes"><small><b>Note:</b> Maximum heart rate is calculated by subtracting the number 220 minus your age. </small></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> Modified: pytrainer/trunk/locale/ca/LC_MESSAGES/pytrainer_ca.pot =================================================================== --- pytrainer/trunk/locale/ca/LC_MESSAGES/pytrainer_ca.pot 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/locale/ca/LC_MESSAGES/pytrainer_ca.pot 2009-07-21 17:20:22 UTC (rev 341) @@ -729,7 +729,7 @@ msgstr "" #: glade/pytrainer.glade:11384 -msgid "Maximun heart rate:" +msgid "Maximum heart rate:" msgstr "" #: glade/pytrainer.glade:11412 @@ -738,7 +738,7 @@ #: glade/pytrainer.glade:11486 msgid "" -"<small><b>Note:</b> Maximun heart rate is calculated by subtracting the " +"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " "number 220 minus your age. </small>" msgstr "" Modified: pytrainer/trunk/locale/de/LC_MESSAGES/pytrainer_de.pot =================================================================== --- pytrainer/trunk/locale/de/LC_MESSAGES/pytrainer_de.pot 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/locale/de/LC_MESSAGES/pytrainer_de.pot 2009-07-21 17:20:22 UTC (rev 341) @@ -730,7 +730,7 @@ msgstr "" #: glade/pytrainer.glade:11384 -msgid "Maximun heart rate:" +msgid "Maximum heart rate:" msgstr "" #: glade/pytrainer.glade:11412 @@ -739,7 +739,7 @@ #: glade/pytrainer.glade:11486 msgid "" -"<small><b>Note:</b> Maximun heart rate is calculated by subtracting the " +"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " "number 220 minus your age. </small>" msgstr "" Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po =================================================================== --- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2009-07-21 17:20:22 UTC (rev 341) @@ -811,7 +811,7 @@ msgstr "Deportes" #: glade/pytrainer.glade:11382 -msgid "Maximun heart rate:" +msgid "Maximum heart rate:" msgstr "Pulsaciones máximas:" #: glade/pytrainer.glade:11410 @@ -820,7 +820,7 @@ #: glade/pytrainer.glade:11484 msgid "" -"<small><b>Note:</b> Maximun heart rate is calculated by subtracting the " +"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " "number 220 minus your age. </small>" msgstr "<small><b>Nota:</b> EL número máximo de pulsaciones se calcula con la " "siguiente fórmula: 220 menos su edad. </small>" Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot =================================================================== --- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot 2009-07-21 17:20:22 UTC (rev 341) @@ -727,7 +727,7 @@ msgstr "" #: glade/pytrainer.glade:11382 -msgid "Maximun heart rate:" +msgid "Maximum heart rate:" msgstr "" #: glade/pytrainer.glade:11410 @@ -736,7 +736,7 @@ #: glade/pytrainer.glade:11484 msgid "" -"<small><b>Note:</b> Maximun heart rate is calculated by subtracting the " +"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " "number 220 minus your age. </small>" msgstr "" Modified: pytrainer/trunk/locale/eu/LC_MESSAGES/pytrainer_eu.pot =================================================================== --- pytrainer/trunk/locale/eu/LC_MESSAGES/pytrainer_eu.pot 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/locale/eu/LC_MESSAGES/pytrainer_eu.pot 2009-07-21 17:20:22 UTC (rev 341) @@ -729,7 +729,7 @@ msgstr "" #: glade/pytrainer.glade:11384 -msgid "Maximun heart rate:" +msgid "Maximum heart rate:" msgstr "" #: glade/pytrainer.glade:11412 @@ -738,7 +738,7 @@ #: glade/pytrainer.glade:11486 msgid "" -"<small><b>Note:</b> Maximun heart rate is calculated by subtracting the " +"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " "number 220 minus your age. </small>" msgstr "" Modified: pytrainer/trunk/locale/fr/LC_MESSAGES/pytrainer_fr.po =================================================================== --- pytrainer/trunk/locale/fr/LC_MESSAGES/pytrainer_fr.po 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/locale/fr/LC_MESSAGES/pytrainer_fr.po 2009-07-21 17:20:22 UTC (rev 341) @@ -843,7 +843,7 @@ msgstr "Sports" #: glade/pytrainer.glade:11384 -msgid "Maximun heart rate:" +msgid "Maximum heart rate:" msgstr "Fréquence Cardiaque Maximale:" #: glade/pytrainer.glade:11412 @@ -851,7 +851,7 @@ msgstr "Fréquence Cardiaque au Repos:" #: glade/pytrainer.glade:11486 -msgid "<small><b>Note:</b> Maximun heart rate is calculated by subtracting the number 220 minus your age. </small>" +msgid "<small><b>Note:</b> Maximum heart rate is calculated by subtracting the number 220 minus your age. </small>" msgstr "<small><b>Note:</b> Le calcul de votre fréquence cardiaque maximale est effectué grâce à la formule 220 moins votre âge. </small>" #: glade/pytrainer.glade:11625 Modified: pytrainer/trunk/locale/fr/LC_MESSAGES/pytrainer_fr.pot =================================================================== --- pytrainer/trunk/locale/fr/LC_MESSAGES/pytrainer_fr.pot 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/locale/fr/LC_MESSAGES/pytrainer_fr.pot 2009-07-21 17:20:22 UTC (rev 341) @@ -730,7 +730,7 @@ msgstr "" #: glade/pytrainer.glade:11384 -msgid "Maximun heart rate:" +msgid "Maximum heart rate:" msgstr "" #: glade/pytrainer.glade:11412 @@ -739,7 +739,7 @@ #: glade/pytrainer.glade:11486 msgid "" -"<small><b>Note:</b> Maximun heart rate is calculated by subtracting the " +"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " "number 220 minus your age. </small>" msgstr "" Modified: pytrainer/trunk/locale/no/LC_MESSAGES/pytrainer_no.pot =================================================================== --- pytrainer/trunk/locale/no/LC_MESSAGES/pytrainer_no.pot 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/locale/no/LC_MESSAGES/pytrainer_no.pot 2009-07-21 17:20:22 UTC (rev 341) @@ -730,7 +730,7 @@ msgstr "" #: glade/pytrainer.glade:11384 -msgid "Maximun heart rate:" +msgid "Maximum heart rate:" msgstr "" #: glade/pytrainer.glade:11412 @@ -739,7 +739,7 @@ #: glade/pytrainer.glade:11486 msgid "" -"<small><b>Note:</b> Maximun heart rate is calculated by subtracting the " +"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " "number 220 minus your age. </small>" msgstr "" Modified: pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_pl.pot =================================================================== --- pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_pl.pot 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_pl.pot 2009-07-21 17:20:22 UTC (rev 341) @@ -731,7 +731,7 @@ msgstr "" #: glade/pytrainer.glade:11384 -msgid "Maximun heart rate:" +msgid "Maximum heart rate:" msgstr "" #: glade/pytrainer.glade:11412 @@ -740,7 +740,7 @@ #: glade/pytrainer.glade:11486 msgid "" -"<small><b>Note:</b> Maximun heart rate is calculated by subtracting the " +"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " "number 220 minus your age. </small>" msgstr "" Modified: pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_ru.po =================================================================== --- pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_ru.po 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_ru.po 2009-07-21 17:20:22 UTC (rev 341) @@ -179,7 +179,7 @@ #: glade/pytrainer.glade:1621 #, fuzzy -msgid "<b>Maximun:</b>" +msgid "<b>Maximum:</b>" msgstr "<b>Время:</b>" #: glade/pytrainer.glade:1705 Modified: pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_ru.pot =================================================================== --- pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_ru.pot 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/locale/ru/LC_MESSAGES/pytrainer_ru.pot 2009-07-21 17:20:22 UTC (rev 341) @@ -731,7 +731,7 @@ msgstr "" #: glade/pytrainer.glade:11384 -msgid "Maximun heart rate:" +msgid "Maximum heart rate:" msgstr "" #: glade/pytrainer.glade:11412 @@ -740,7 +740,7 @@ #: glade/pytrainer.glade:11486 msgid "" -"<small><b>Note:</b> Maximun heart rate is calculated by subtracting the " +"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " "number 220 minus your age. </small>" msgstr "" Modified: pytrainer/trunk/messages.pot =================================================================== --- pytrainer/trunk/messages.pot 2009-07-20 16:26:19 UTC (rev 340) +++ pytrainer/trunk/messages.pot 2009-07-21 17:20:22 UTC (rev 341) @@ -727,7 +727,7 @@ msgstr "" #: glade/pytrainer.glade:11382 -msgid "Maximun heart rate:" +msgid "Maximum heart rate:" msgstr "" #: glade/pytrainer.glade:11410 @@ -736,7 +736,7 @@ #: glade/pytrainer.glade:11484 msgid "" -"<small><b>Note:</b> Maximun heart rate is calculated by subtracting the " +"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " "number 220 minus your age. </small>" msgstr "" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-09-22 16:21:46
|
Revision: 346 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=346&view=rev Author: dgranda Date: 2009-09-22 16:20:15 +0000 (Tue, 22 Sep 2009) Log Message: ----------- Setting version to 1.6.0.9 and publishing correspondent changelog Modified Paths: -------------- pytrainer/trunk/CHANGES pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/CHANGES =================================================================== --- pytrainer/trunk/CHANGES 2009-09-08 07:28:14 UTC (rev 345) +++ pytrainer/trunk/CHANGES 2009-09-22 16:20:15 UTC (rev 346) @@ -1,3 +1,14 @@ +- PyTrainer tasks for 1.6.0.9: + +Added dynamic loading and unloading of plugin menu items (svn rev 344) +Removal of decommissioned plugin (garmin301) and addition of new ones (garmingpx). Update of project data (version and url) (svn rev 343) +Adding calories support suggested by JB (svn rev 342) +Maximum is misspelled Maximun, see http://bugs.debian.org/537723 (svn 341) +Fixed some hardcoded stuff that prevents pytrainer to copy entries to ~/.pytrainer/gpx (thanks to JB) (svn 340) +Major improvements in graphs (thanks to Fiz) (svn revs 339, 336, 332, 331) +Updated german translation - bug ID: 2811507 (thanks to Noèl) (svn revs 338, 333) +Minor project and license information updated (svn revs 337, 335, 334, 329) + - PyTrainer tasks for 1.6.0.8: Rotating log file support added (rev 322, http://sourceforge.net/tracker/?func=detail&aid=2717142&group_id=213157&atid=1024595) Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-09-08 07:28:14 UTC (rev 345) +++ pytrainer/trunk/pytrainer/main.py 2009-09-22 16:20:15 UTC (rev 346) @@ -86,7 +86,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.6.0.8" # 19.04.2009 + self.version ="1.6.0.9" # 22.10.2009 self.date = Date() # Checking profile This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-11-09 11:08:08
|
Revision: 383 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=383&view=rev Author: jblance Date: 2009-11-09 11:07:55 +0000 (Mon, 09 Nov 2009) Log Message: ----------- Plugins-v2 branch merge to trunk Modified Paths: -------------- pytrainer/trunk/plugins/googleearth/conf.xml pytrainer/trunk/pytrainer/gui/windowrecord.py pytrainer/trunk/pytrainer/lib/system.py pytrainer/trunk/pytrainer/lib/xmlUtils.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/plugins.py pytrainer/trunk/pytrainer/profile.py pytrainer/trunk/pytrainer/record.py pytrainer/trunk/pytrainer.sh pytrainer/trunk/setup.py Added Paths: ----------- pytrainer/trunk/PLUGINS.README pytrainer/trunk/plugins/garmin-gpx/ pytrainer/trunk/plugins/garmin-gpx/conf.xml pytrainer/trunk/plugins/garmin-gpx/garmingpx.py pytrainer/trunk/plugins/garmin-hr/ pytrainer/trunk/plugins/garmin-hr/conf.xml pytrainer/trunk/plugins/garmin-hr/garminhr.py pytrainer/trunk/plugins/garmin-hr/pytrainer.style pytrainer/trunk/plugins/garmin-hr/translate.xsl pytrainer/trunk/plugins/garmin-hr-file/ pytrainer/trunk/plugins/garmin-hr-file/conf.xml pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py pytrainer/trunk/plugins/garmin-hr-file/pytrainer.style pytrainer/trunk/plugins/garmin-hr-file/translate.xsl pytrainer/trunk/plugins/garmin-tcxv2/ pytrainer/trunk/plugins/garmin-tcxv2/conf.xml pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl pytrainer/trunk/plugins/googleearth/main.py pytrainer/trunk/pytrainer/gui/dialogs.py pytrainer/trunk/pytrainer/lib/xmlValidation.py pytrainer/trunk/schemas/ pytrainer/trunk/schemas/Cluetrust_gpxdata10.xsd pytrainer/trunk/schemas/GarminTrainingCenterDatabase_v1-gpsbabel.xsd pytrainer/trunk/schemas/GarminTrainingCenterDatabase_v1.xsd pytrainer/trunk/schemas/GarminTrainingCenterDatabase_v2.xsd pytrainer/trunk/schemas/README pytrainer/trunk/schemas/Topografix_gpx11.xsd pytrainer/trunk/schemas/validate_gpsfile.py Removed Paths: ------------- pytrainer/trunk/plugins/garmin-gpx/conf.xml pytrainer/trunk/plugins/garmin-gpx/garmingpx.py pytrainer/trunk/plugins/garmin-hr/conf.xml pytrainer/trunk/plugins/garmin-hr/garminhr.py pytrainer/trunk/plugins/garmin-hr/pytrainer.style pytrainer/trunk/plugins/garmin-hr/translate.xsl pytrainer/trunk/plugins/garmin-hr-file/conf.xml pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py pytrainer/trunk/plugins/garmin-hr-file/pytrainer.style pytrainer/trunk/plugins/garmin-hr-file/translate.xsl pytrainer/trunk/plugins/garmin-tcxv2/conf.xml pytrainer/trunk/plugins/garmin-tcxv2/garmin-tcxv2.py pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl pytrainer/trunk/plugins/garmingpx/ pytrainer/trunk/plugins/ipod/ pytrainer/trunk/schemas/Cluetrust_gpxdata10.xsd pytrainer/trunk/schemas/GarminTrainingCenterDatabase_v1-gpsbabel.xsd pytrainer/trunk/schemas/GarminTrainingCenterDatabase_v1.xsd pytrainer/trunk/schemas/GarminTrainingCenterDatabase_v2.xsd pytrainer/trunk/schemas/README pytrainer/trunk/schemas/Topografix_gpx11.xsd pytrainer/trunk/schemas/validate_gpsfile.py Property Changed: ---------------- pytrainer/trunk/ Property changes on: pytrainer/trunk ___________________________________________________________________ Added: svn:mergeinfo + /pytrainer/branches/plugins-v2:345-382 Copied: pytrainer/trunk/PLUGINS.README (from rev 382, pytrainer/branches/plugins-v2/PLUGINS.README) =================================================================== --- pytrainer/trunk/PLUGINS.README (rev 0) +++ pytrainer/trunk/PLUGINS.README 2009-11-09 11:07:55 UTC (rev 383) @@ -0,0 +1,31 @@ +Information on creating Plugins +=========================================== + +Plugins are created by: +1) Making a directory in <pytrainer>/plugins/ +2) Creating a python class in a file in your directory + - class must have run(self) function + - run(self) returns tuple of GPX files to import +3) Creating a conf.xml configuration file in your directory with at least the following information: + <?xml version="1.0" ?> + <pytrainer-plugin + name="Garmin v2 TCX" + description="Import your records from a version 2 TCX file from a Garmin gps device (i.e. Forerunner 405)" + plugincode="garminTCXv2" + pluginbutton="Import from Garmin TCX (version 2)" + executable="garmintcxv2" + > + </pytrainer-plugin> + +Where + name: is the name of your plugin + description: is the description + plugincode: is the name of the class in your plugin file + pluginbutton: is the label that the menu option will have once your plugin is enabled + executable: is the file that the python class in in (without the .py extension) + + + + + + Deleted: pytrainer/trunk/plugins/garmin-gpx/conf.xml =================================================================== --- pytrainer/branches/plugins-v2/plugins/garmin-gpx/conf.xml 2009-11-09 10:34:52 UTC (rev 382) +++ pytrainer/trunk/plugins/garmin-gpx/conf.xml 2009-11-09 11:07:55 UTC (rev 383) @@ -1,10 +0,0 @@ -<?xml version="1.0" ?> -<pytrainer-plugin - name="Garmin GPX file" - description="Import your records directly from a garmin gpx file." - plugincode="garmingpx" - pluginbutton="Import from file: Garmin GPX" - executable="garmingpx" -> -<conf-values variable="Force_sport_to" value=""/> -</pytrainer-plugin> Copied: pytrainer/trunk/plugins/garmin-gpx/conf.xml (from rev 382, pytrainer/branches/plugins-v2/plugins/garmin-gpx/conf.xml) =================================================================== --- pytrainer/trunk/plugins/garmin-gpx/conf.xml (rev 0) +++ pytrainer/trunk/plugins/garmin-gpx/conf.xml 2009-11-09 11:07:55 UTC (rev 383) @@ -0,0 +1,10 @@ +<?xml version="1.0" ?> +<pytrainer-plugin + name="Garmin GPX file" + description="Import your records directly from a garmin gpx file." + plugincode="garmingpx" + pluginbutton="Import from file: Garmin GPX" + executable="garmingpx" +> +<conf-values variable="Force_sport_to" value=""/> +</pytrainer-plugin> Deleted: pytrainer/trunk/plugins/garmin-gpx/garmingpx.py =================================================================== --- pytrainer/branches/plugins-v2/plugins/garmin-gpx/garmingpx.py 2009-11-09 10:34:52 UTC (rev 382) +++ pytrainer/trunk/plugins/garmin-gpx/garmingpx.py 2009-11-09 11:07:55 UTC (rev 383) @@ -1,114 +0,0 @@ -#!/usr/bin/env python - -#Copyright (C) - -#Based on plugin by Kevin Dwyer ke...@ph... - -#This program is free software; you can redistribute it and/or -#modify it under the terms of the GNU General Public License -#as published by the Free Software Foundation; either version 2 -#of the License, or (at your option) any later version. - -#This program 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 General Public License for more details. - -#You should have received a copy of the GNU General Public License -#along with this program; if not, write to the Free Software -#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -import logging -import os -import shutil -from gui.dialogs import fileChooserDialog, guiFlush -import xml.etree.cElementTree -from lib.xmlUtils import XMLParser - -class garmingpx(): - """ Plugin to import from a GPX file or files - Expects only one activity in each file - Checks to see if any entries are in the database with the same start time - """ - def __init__(self, parent = None, validate=False): - self.parent = parent - self.tmpdir = self.parent.conf.getValue("tmpdir") - self.validate = validate - self.data_path = os.path.dirname(__file__) - self.sport = self.getConfValue("Force_sport_to") - - def getConfValue(self, confVar): - info = XMLParser(self.data_path+"/conf.xml") - code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.parent.conf.getValue("plugindir") - if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): - value = None - else: - info = XMLParser(plugindir+"/"+code+"/conf.xml") - value = info.getValue("pytrainer-plugin",confVar) - return value - - def run(self): - logging.debug(">>") - selectedFiles = fileChooserDialog(title="Choose a GPX file (or files) to import", multiple=True).getFiles() - guiFlush() - importfiles = [] - if not selectedFiles: - return importfiles - for filename in selectedFiles: - if self.valid_input_file(filename): - if not self.inDatabase(filename): - sport = self.getSport(filename) - gpxfile = "%s/garmin-gpx-%d.gpx" % (self.tmpdir, len(importfiles)) - shutil - shutil.copy(filename, gpxfile) - importfiles.append((gpxfile, sport)) - else: - logging.debug("%s already in database. Skipping import." % (filename) ) - else: - logging.info("File %s failed validation" % (filename)) - logging.debug("<<") - return importfiles - - def valid_input_file(self, filename): - """ Function to validate input file if requested""" - if not self.validate: #not asked to validate - logging.debug("Not validating %s" % (filename) ) - return True - else: - #To validate GPX as used for pytrainer must test against both Topograpfix and Cluetrust - topografixXSLfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/Topografix_gpx11.xsd" - cluetrustXSLfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/Cluetrust_gpxdata10.xsd" - from lib.xmlValidation import xmlValidator - validator = xmlValidator() - return validator.validateXSL(filename, topografixXSLfile) and validator.validateXSL(filename, cluetrustXSLfile) - - def inDatabase(self, filename): - """ Function to determine if a given file has already been imported into the database - only compares date and start time (sport may have been changed in DB after import) - only valid for GPX files with a single activity - """ - time = self.detailsFromGPX(filename) - if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): - return True - else: - return False - - def getSport(self, filename): - #return sport from overide if present or default to "import" - if self.sport: - return self.sport - sport = "import" - return sport - - def detailsFromGPX(self, filename): - """ Function to return the first time element from a GPX 1.1 file """ - tree = xml.etree.cElementTree.ElementTree(file=filename) - root = tree.getroot() - timeElement = root.find(".//{http://www.topografix.com/GPX/1/1}time") - if timeElement is None: - return None - else: - return timeElement.text - - Copied: pytrainer/trunk/plugins/garmin-gpx/garmingpx.py (from rev 382, pytrainer/branches/plugins-v2/plugins/garmin-gpx/garmingpx.py) =================================================================== --- pytrainer/trunk/plugins/garmin-gpx/garmingpx.py (rev 0) +++ pytrainer/trunk/plugins/garmin-gpx/garmingpx.py 2009-11-09 11:07:55 UTC (rev 383) @@ -0,0 +1,114 @@ +#!/usr/bin/env python + +#Copyright (C) + +#Based on plugin by Kevin Dwyer ke...@ph... + +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. + +#This program 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 General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import logging +import os +import shutil +from gui.dialogs import fileChooserDialog, guiFlush +import xml.etree.cElementTree +from lib.xmlUtils import XMLParser + +class garmingpx(): + """ Plugin to import from a GPX file or files + Expects only one activity in each file + Checks to see if any entries are in the database with the same start time + """ + def __init__(self, parent = None, validate=False): + self.parent = parent + self.tmpdir = self.parent.conf.getValue("tmpdir") + self.validate = validate + self.data_path = os.path.dirname(__file__) + self.sport = self.getConfValue("Force_sport_to") + + def getConfValue(self, confVar): + info = XMLParser(self.data_path+"/conf.xml") + code = info.getValue("pytrainer-plugin","plugincode") + plugindir = self.parent.conf.getValue("plugindir") + if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): + value = None + else: + info = XMLParser(plugindir+"/"+code+"/conf.xml") + value = info.getValue("pytrainer-plugin",confVar) + return value + + def run(self): + logging.debug(">>") + selectedFiles = fileChooserDialog(title="Choose a GPX file (or files) to import", multiple=True).getFiles() + guiFlush() + importfiles = [] + if not selectedFiles: + return importfiles + for filename in selectedFiles: + if self.valid_input_file(filename): + if not self.inDatabase(filename): + sport = self.getSport(filename) + gpxfile = "%s/garmin-gpx-%d.gpx" % (self.tmpdir, len(importfiles)) + shutil + shutil.copy(filename, gpxfile) + importfiles.append((gpxfile, sport)) + else: + logging.debug("%s already in database. Skipping import." % (filename) ) + else: + logging.info("File %s failed validation" % (filename)) + logging.debug("<<") + return importfiles + + def valid_input_file(self, filename): + """ Function to validate input file if requested""" + if not self.validate: #not asked to validate + logging.debug("Not validating %s" % (filename) ) + return True + else: + #To validate GPX as used for pytrainer must test against both Topograpfix and Cluetrust + topografixXSLfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/Topografix_gpx11.xsd" + cluetrustXSLfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/Cluetrust_gpxdata10.xsd" + from lib.xmlValidation import xmlValidator + validator = xmlValidator() + return validator.validateXSL(filename, topografixXSLfile) and validator.validateXSL(filename, cluetrustXSLfile) + + def inDatabase(self, filename): + """ Function to determine if a given file has already been imported into the database + only compares date and start time (sport may have been changed in DB after import) + only valid for GPX files with a single activity + """ + time = self.detailsFromGPX(filename) + if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): + return True + else: + return False + + def getSport(self, filename): + #return sport from overide if present or default to "import" + if self.sport: + return self.sport + sport = "import" + return sport + + def detailsFromGPX(self, filename): + """ Function to return the first time element from a GPX 1.1 file """ + tree = xml.etree.cElementTree.ElementTree(file=filename) + root = tree.getroot() + timeElement = root.find(".//{http://www.topografix.com/GPX/1/1}time") + if timeElement is None: + return None + else: + return timeElement.text + + Deleted: pytrainer/trunk/plugins/garmin-hr/conf.xml =================================================================== --- pytrainer/branches/plugins-v2/plugins/garmin-hr/conf.xml 2009-11-09 10:34:52 UTC (rev 382) +++ pytrainer/trunk/plugins/garmin-hr/conf.xml 2009-11-09 11:07:55 UTC (rev 383) @@ -1,10 +0,0 @@ -<?xml version="1.0" ?> -<pytrainer-plugin - name="Garmin via GPSBabel 1.3.5" - description="Import your records directly from your Garmin GPS device (e.g. Forerunner 205 or 305) using GPSBabel (version 1.3.5)" - plugincode="garminhr" - pluginbutton="Import from Garmin GPS device (via GPSBabel)" - executable="garminhr" -> -<conf-values variable="device" value="usb:"/> -</pytrainer-plugin> Copied: pytrainer/trunk/plugins/garmin-hr/conf.xml (from rev 382, pytrainer/branches/plugins-v2/plugins/garmin-hr/conf.xml) =================================================================== --- pytrainer/trunk/plugins/garmin-hr/conf.xml (rev 0) +++ pytrainer/trunk/plugins/garmin-hr/conf.xml 2009-11-09 11:07:55 UTC (rev 383) @@ -0,0 +1,10 @@ +<?xml version="1.0" ?> +<pytrainer-plugin + name="Garmin via GPSBabel 1.3.5" + description="Import your records directly from your Garmin GPS device (e.g. Forerunner 205 or 305) using GPSBabel (version 1.3.5)" + plugincode="garminhr" + pluginbutton="Import from Garmin GPS device (via GPSBabel)" + executable="garminhr" +> +<conf-values variable="device" value="usb:"/> +</pytrainer-plugin> Deleted: pytrainer/trunk/plugins/garmin-hr/garminhr.py =================================================================== --- pytrainer/branches/plugins-v2/plugins/garmin-hr/garminhr.py 2009-11-09 10:34:52 UTC (rev 382) +++ pytrainer/trunk/plugins/garmin-hr/garminhr.py 2009-11-09 11:07:55 UTC (rev 383) @@ -1,174 +0,0 @@ -#!/usr/bin/python -# -*- coding: iso-8859-1 -*- - -#Copyright (C) Fiz Vazquez vu...@si... - -#This program is free software; you can redistribute it and/or -#modify it under the terms of the GNU General Public License -#as published by the Free Software Foundation; either version 2 -#of the License, or (at your option) any later version. - -#This program 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 General Public License for more details. - -#You should have received a copy of the GNU General Public License -#along with this program; if not, write to the Free Software -#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -import os, sys -import logging -from lxml import etree -from lib.xmlUtils import XMLParser - -import commands - -class garminhr(): - """ Plugin to import from a Garmin device using gpsbabel - Checks each activity to see if any entries are in the database with the same start time - Creates GPX files for each activity not in the database - - Note: using lxml see http://codespeak.net/lxml - """ - def __init__(self, parent = None, validate=False): - self.parent = parent - self.tmpdir = self.parent.conf.getValue("tmpdir") - self.data_path = os.path.dirname(__file__) - self.validate = validate - self.input_dev = self.getConfValue("device") - self.sport = self.getConfValue("Force_sport_to") - - def getConfValue(self, confVar): - info = XMLParser(self.data_path+"/conf.xml") - code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.parent.conf.getValue("plugindir") - if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): - value = None - else: - info = XMLParser(plugindir+"/"+code+"/conf.xml") - value = info.getValue("pytrainer-plugin",confVar) - return value - - def run(self): - logging.debug(">>") - importfiles = [] - if not self.checkGPSBabelVersion("1.3.5"): - #TODO Remove Zenity below - os.popen("zenity --error --text='Must be using version 1.3.5 of GPSBabel for this plugin'"); - elif self.garminDeviceExists(): - try: - gpsbabelOutputFile = "%s/file.gtrnctr" % (self.tmpdir) - #TODO Remove Zenity below - outgps = commands.getstatusoutput("gpsbabel -t -i garmin -f %s -o gtrnctr -F %s | zenity --progress --pulsate --text='Loading Data' auto-close" % (self.input_dev, gpsbabelOutputFile) ) - if outgps[0]==0: - if outgps[1] == "Found no Garmin USB devices.": # check localizations - print "GPSBabel found no Garmin USB devices" - pass - else: #gpsbabel worked - now process file... - if self.valid_input_file(gpsbabelOutputFile): - for (sport, tracks) in self.getTracks(gpsbabelOutputFile): - logging.debug("Found %d tracks for %s sport in %s" % (len(tracks), sport, gpsbabelOutputFile)) - count = 0 - for track in tracks: #can be multiple tracks - if self.shouldImport(track): - count += 1 - gpxfile = "%s/garminhrfile%d.gpx" % (self.tmpdir, len(importfiles)) - self.createGPXfile(gpxfile, track) - if self.sport: #Option to overide sport is set - importfiles.append((gpxfile, self.sport)) - else: #Use sport from file - importfiles.append((gpxfile, sport)) - logging.debug("Importing %d of %d tracks for sport %s" % (count, len(tracks), sport) ) - else: - logging.info("File %s failed validation" % (gpsbabelOutputFile)) - except Exception: - #TODO Remove Zenity below - os.popen("zenity --error --text='Can not handle Garmin device\nCheck your configuration\nCurrent usb port is set to:\t %s'" %self.input_dev); - print sys.exc_info()[0] - else: #No garmin device found - #TODO Remove Zenity below - os.popen("zenity --error --text='Can not handle Garmin device\nCheck your configuration\nCurrent usb port is set to:\t %s'" %self.input_dev); - logging.debug("<<") - return importfiles - - def checkGPSBabelVersion(self, validVersion): - result = commands.getstatusoutput('gpsbabel -V') - if result[0] == 0: - version = result[1].split() - try: - if version[2] == validVersion: - return True - else: - print "GPSBabel at version %s instead of expected version %s" % (version[2], validVersion) - except: - print "Unexpected result from gpsbabel -V" - return False - return False - - def garminDeviceExists(self): - try: - outmod = commands.getstatusoutput('/sbin/lsmod | grep garmin_gps') - if outmod[0]==256: #there is no garmin_gps module loaded - self.input_dev = "usb:" - return True - else: - return False - except: - return False - - def valid_input_file(self, filename): - """ Function to validate input file if requested""" - if not self.validate: #not asked to validate - logging.debug("Not validating %s" % (filename) ) - return True - else: #Validate TCXv1, note are validating against gpsbabels 'broken' result... - xslfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/GarminTrainingCenterDatabase_v1-gpsbabel.xsd" - from lib.xmlValidation import xmlValidator - validator = xmlValidator() - return validator.validateXSL(filename, xslfile) - - def getTracks(self, filename): - """ Function to return all the tracks in a Garmin Training Center v1 file - """ - sportsList = ("Running", "Biking", "Other", "MultiSport") - result = [] - tree = etree.ElementTree(file=filename) - root = tree.getroot() - for sport in sportsList: - try: - sportLevel = root.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}%s" % sport) - tracks = sportLevel.findall(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}Track") - result.append((sport, tracks)) - except: - print "No entries for sport %s" % sport - return result - - def shouldImport(self, track): - """ Function determines whether a track should be imported or not - Currently using time only - """ - timeElement = track.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}Time") - if timeElement is None: - #print (etree.tostring(track, pretty_print=True)) - logging.debug("Error no time found in track") - return False - else: - time = timeElement.text - #comparing date and start time (sport may have been changed in DB after import) - if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): - logging.debug("Not importing track for time %s" % (time)) - return False - else: - return True - - def createGPXfile(self, gpxfile, track): - """ Function to transform a Garmin Training Center v1 Track to a valid GPX+ file - """ - xslt_doc = etree.parse(self.data_path+"/translate.xsl") - transform = etree.XSLT(xslt_doc) - result_tree = transform(track) - result_tree.write(gpxfile, xml_declaration=True) - - - Copied: pytrainer/trunk/plugins/garmin-hr/garminhr.py (from rev 382, pytrainer/branches/plugins-v2/plugins/garmin-hr/garminhr.py) =================================================================== --- pytrainer/trunk/plugins/garmin-hr/garminhr.py (rev 0) +++ pytrainer/trunk/plugins/garmin-hr/garminhr.py 2009-11-09 11:07:55 UTC (rev 383) @@ -0,0 +1,174 @@ +#!/usr/bin/python +# -*- coding: iso-8859-1 -*- + +#Copyright (C) Fiz Vazquez vu...@si... + +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. + +#This program 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 General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import os, sys +import logging +from lxml import etree +from lib.xmlUtils import XMLParser + +import commands + +class garminhr(): + """ Plugin to import from a Garmin device using gpsbabel + Checks each activity to see if any entries are in the database with the same start time + Creates GPX files for each activity not in the database + + Note: using lxml see http://codespeak.net/lxml + """ + def __init__(self, parent = None, validate=False): + self.parent = parent + self.tmpdir = self.parent.conf.getValue("tmpdir") + self.data_path = os.path.dirname(__file__) + self.validate = validate + self.input_dev = self.getConfValue("device") + self.sport = self.getConfValue("Force_sport_to") + + def getConfValue(self, confVar): + info = XMLParser(self.data_path+"/conf.xml") + code = info.getValue("pytrainer-plugin","plugincode") + plugindir = self.parent.conf.getValue("plugindir") + if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): + value = None + else: + info = XMLParser(plugindir+"/"+code+"/conf.xml") + value = info.getValue("pytrainer-plugin",confVar) + return value + + def run(self): + logging.debug(">>") + importfiles = [] + if not self.checkGPSBabelVersion("1.3.5"): + #TODO Remove Zenity below + os.popen("zenity --error --text='Must be using version 1.3.5 of GPSBabel for this plugin'"); + elif self.garminDeviceExists(): + try: + gpsbabelOutputFile = "%s/file.gtrnctr" % (self.tmpdir) + #TODO Remove Zenity below + outgps = commands.getstatusoutput("gpsbabel -t -i garmin -f %s -o gtrnctr -F %s | zenity --progress --pulsate --text='Loading Data' auto-close" % (self.input_dev, gpsbabelOutputFile) ) + if outgps[0]==0: + if outgps[1] == "Found no Garmin USB devices.": # check localizations + print "GPSBabel found no Garmin USB devices" + pass + else: #gpsbabel worked - now process file... + if self.valid_input_file(gpsbabelOutputFile): + for (sport, tracks) in self.getTracks(gpsbabelOutputFile): + logging.debug("Found %d tracks for %s sport in %s" % (len(tracks), sport, gpsbabelOutputFile)) + count = 0 + for track in tracks: #can be multiple tracks + if self.shouldImport(track): + count += 1 + gpxfile = "%s/garminhrfile%d.gpx" % (self.tmpdir, len(importfiles)) + self.createGPXfile(gpxfile, track) + if self.sport: #Option to overide sport is set + importfiles.append((gpxfile, self.sport)) + else: #Use sport from file + importfiles.append((gpxfile, sport)) + logging.debug("Importing %d of %d tracks for sport %s" % (count, len(tracks), sport) ) + else: + logging.info("File %s failed validation" % (gpsbabelOutputFile)) + except Exception: + #TODO Remove Zenity below + os.popen("zenity --error --text='Can not handle Garmin device\nCheck your configuration\nCurrent usb port is set to:\t %s'" %self.input_dev); + print sys.exc_info()[0] + else: #No garmin device found + #TODO Remove Zenity below + os.popen("zenity --error --text='Can not handle Garmin device\nCheck your configuration\nCurrent usb port is set to:\t %s'" %self.input_dev); + logging.debug("<<") + return importfiles + + def checkGPSBabelVersion(self, validVersion): + result = commands.getstatusoutput('gpsbabel -V') + if result[0] == 0: + version = result[1].split() + try: + if version[2] == validVersion: + return True + else: + print "GPSBabel at version %s instead of expected version %s" % (version[2], validVersion) + except: + print "Unexpected result from gpsbabel -V" + return False + return False + + def garminDeviceExists(self): + try: + outmod = commands.getstatusoutput('/sbin/lsmod | grep garmin_gps') + if outmod[0]==256: #there is no garmin_gps module loaded + self.input_dev = "usb:" + return True + else: + return False + except: + return False + + def valid_input_file(self, filename): + """ Function to validate input file if requested""" + if not self.validate: #not asked to validate + logging.debug("Not validating %s" % (filename) ) + return True + else: #Validate TCXv1, note are validating against gpsbabels 'broken' result... + xslfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/GarminTrainingCenterDatabase_v1-gpsbabel.xsd" + from lib.xmlValidation import xmlValidator + validator = xmlValidator() + return validator.validateXSL(filename, xslfile) + + def getTracks(self, filename): + """ Function to return all the tracks in a Garmin Training Center v1 file + """ + sportsList = ("Running", "Biking", "Other", "MultiSport") + result = [] + tree = etree.ElementTree(file=filename) + root = tree.getroot() + for sport in sportsList: + try: + sportLevel = root.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}%s" % sport) + tracks = sportLevel.findall(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}Track") + result.append((sport, tracks)) + except: + print "No entries for sport %s" % sport + return result + + def shouldImport(self, track): + """ Function determines whether a track should be imported or not + Currently using time only + """ + timeElement = track.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}Time") + if timeElement is None: + #print (etree.tostring(track, pretty_print=True)) + logging.debug("Error no time found in track") + return False + else: + time = timeElement.text + #comparing date and start time (sport may have been changed in DB after import) + if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): + logging.debug("Not importing track for time %s" % (time)) + return False + else: + return True + + def createGPXfile(self, gpxfile, track): + """ Function to transform a Garmin Training Center v1 Track to a valid GPX+ file + """ + xslt_doc = etree.parse(self.data_path+"/translate.xsl") + transform = etree.XSLT(xslt_doc) + result_tree = transform(track) + result_tree.write(gpxfile, xml_declaration=True) + + + Deleted: pytrainer/trunk/plugins/garmin-hr/pytrainer.style =================================================================== --- pytrainer/branches/plugins-v2/plugins/garmin-hr/pytrainer.style 2009-11-09 10:34:52 UTC (rev 382) +++ pytrainer/trunk/plugins/garmin-hr/pytrainer.style 2009-11-09 11:07:55 UTC (rev 383) @@ -1,39 +0,0 @@ -# gpsbabel XCSV style file -# -# Format: GPSDrive -# Author: Alex Mottram -# Date: 12/11/2002 -# -# -# - -DESCRIPTION GpsDrive Format -DATATIPE TRACK - -# FILE LAYOUT DEFINITIIONS: -# -FIELD_DELIMITER WHITESPACE -RECORD_DELIMITER CRNEWLINE -BADCHARS WHITESPACE -PROLOGUE OziExplorer Waypoint File Version 1.1 - -SHORTLEN 20 -SHORTWHITE 0 - -# -# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE: - -IFIELD SHORTNAME, "", "%s" -IFIELD LAT_DECIMAL, "", "%08.5f" -IFIELD LON_DECIMAL, "", "%08.5f" -IFIELD ALT_METERS, "", "%.0f" -IFIELD GMT_TIME,"","%m/%d/%Y %I:%M:%D %p" -IFIELD ICON_DESCR, "", "%s" -IFIELD TRACK_NAME, "", "%s" - -#OFIELD TRACK_NAME, "", "%s" -OFIELD LAT_DECIMAL, "", "%08.5f" -OFIELD LON_DECIMAL, "", "%08.5f" -OFIELD ALT_METERS, "", "%.0f" -OFIELD GMT_TIME,"","%s" -OFIELD HEART_RATE,"","%d" Copied: pytrainer/trunk/plugins/garmin-hr/pytrainer.style (from rev 382, pytrainer/branches/plugins-v2/plugins/garmin-hr/pytrainer.style) =================================================================== --- pytrainer/trunk/plugins/garmin-hr/pytrainer.style (rev 0) +++ pytrainer/trunk/plugins/garmin-hr/pytrainer.style 2009-11-09 11:07:55 UTC (rev 383) @@ -0,0 +1,39 @@ +# gpsbabel XCSV style file +# +# Format: GPSDrive +# Author: Alex Mottram +# Date: 12/11/2002 +# +# +# + +DESCRIPTION GpsDrive Format +DATATIPE TRACK + +# FILE LAYOUT DEFINITIIONS: +# +FIELD_DELIMITER WHITESPACE +RECORD_DELIMITER CRNEWLINE +BADCHARS WHITESPACE +PROLOGUE OziExplorer Waypoint File Version 1.1 + +SHORTLEN 20 +SHORTWHITE 0 + +# +# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE: + +IFIELD SHORTNAME, "", "%s" +IFIELD LAT_DECIMAL, "", "%08.5f" +IFIELD LON_DECIMAL, "", "%08.5f" +IFIELD ALT_METERS, "", "%.0f" +IFIELD GMT_TIME,"","%m/%d/%Y %I:%M:%D %p" +IFIELD ICON_DESCR, "", "%s" +IFIELD TRACK_NAME, "", "%s" + +#OFIELD TRACK_NAME, "", "%s" +OFIELD LAT_DECIMAL, "", "%08.5f" +OFIELD LON_DECIMAL, "", "%08.5f" +OFIELD ALT_METERS, "", "%.0f" +OFIELD GMT_TIME,"","%s" +OFIELD HEART_RATE,"","%d" Deleted: pytrainer/trunk/plugins/garmin-hr/translate.xsl =================================================================== --- pytrainer/branches/plugins-v2/plugins/garmin-hr/translate.xsl 2009-11-09 10:34:52 UTC (rev 382) +++ pytrainer/trunk/plugins/garmin-hr/translate.xsl 2009-11-09 11:07:55 UTC (rev 383) @@ -1,53 +0,0 @@ -<?xml version="1.0"?> - -<!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> -<xsl:stylesheet version="1.0" -xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1" -xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -> -<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> - -<!-- this is a bit of a messy way to get whitespace into the output - but it works --> -<xsl:variable name="newline"><xsl:text> -</xsl:text></xsl:variable> - -<xsl:template match="/"> - <gpx creator="pytrainer http://sourceforge.net/projects/pytrainer" version="1.1" - xmlns="http://www.topografix.com/GPX/1/1" - xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > - - <xsl:value-of select="$newline"/> - <xsl:variable name="sport">"Run"</xsl:variable> - <xsl:variable name="time"><xsl:value-of select="t:Track/t:Trackpoint/t:Time"/></xsl:variable> - <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> - <metadata><xsl:value-of select="$newline"/> - <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> - <link href="http://sourceforge.net/projects/pytrainer"/><xsl:value-of select="$newline"/> - <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> - </metadata><xsl:value-of select="$newline"/> - <trk><xsl:value-of select="$newline"/> - <xsl:for-each select="t:Track"> - <trkseg><xsl:value-of select="$newline"/> - <xsl:for-each select="t:Trackpoint"> - <!-- only output a trkpt if a position exists --> - <xsl:if test="t:Position"> - <xsl:variable name="lat"><xsl:value-of select="t:Position/t:LatitudeDegrees"/></xsl:variable> - <xsl:variable name="lon"><xsl:value-of select="t:Position/t:LongitudeDegrees"/></xsl:variable> - <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> - <ele><xsl:value-of select="t:AltitudeMeters"/></ele><xsl:value-of select="$newline"/> - <time><xsl:value-of select="t:Time"/></time><xsl:value-of select="$newline"/> - <xsl:if test="t:HeartRateBpm"> - <extensions><xsl:value-of select="$newline"/> - <gpxdata:hr><xsl:value-of select="t:HeartRateBpm"/></gpxdata:hr><xsl:value-of select="$newline"/> - </extensions><xsl:value-of select="$newline"/> - </xsl:if> - </trkpt><xsl:value-of select="$newline"/> - </xsl:if> - </xsl:for-each> - <xsl:value-of select="$newline"/> - </trkseg><xsl:value-of select="$newline"/> - </xsl:for-each> - </trk><xsl:value-of select="$newline"/> - </gpx><xsl:value-of select="$newline"/> -</xsl:template> -</xsl:stylesheet> Copied: pytrainer/trunk/plugins/garmin-hr/translate.xsl (from rev 382, pytrainer/branches/plugins-v2/plugins/garmin-hr/translate.xsl) =================================================================== --- pytrainer/trunk/plugins/garmin-hr/translate.xsl (rev 0) +++ pytrainer/trunk/plugins/garmin-hr/translate.xsl 2009-11-09 11:07:55 UTC (rev 383) @@ -0,0 +1,53 @@ +<?xml version="1.0"?> + +<!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> +<xsl:stylesheet version="1.0" +xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> +<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> + +<!-- this is a bit of a messy way to get whitespace into the output - but it works --> +<xsl:variable name="newline"><xsl:text> +</xsl:text></xsl:variable> + +<xsl:template match="/"> + <gpx creator="pytrainer http://sourceforge.net/projects/pytrainer" version="1.1" + xmlns="http://www.topografix.com/GPX/1/1" + xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > + + <xsl:value-of select="$newline"/> + <xsl:variable name="sport">"Run"</xsl:variable> + <xsl:variable name="time"><xsl:value-of select="t:Track/t:Trackpoint/t:Time"/></xsl:variable> + <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> + <metadata><xsl:value-of select="$newline"/> + <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> + <link href="http://sourceforge.net/projects/pytrainer"/><xsl:value-of select="$newline"/> + <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> + </metadata><xsl:value-of select="$newline"/> + <trk><xsl:value-of select="$newline"/> + <xsl:for-each select="t:Track"> + <trkseg><xsl:value-of select="$newline"/> + <xsl:for-each select="t:Trackpoint"> + <!-- only output a trkpt if a position exists --> + <xsl:if test="t:Position"> + <xsl:variable name="lat"><xsl:value-of select="t:Position/t:LatitudeDegrees"/></xsl:variable> + <xsl:variable name="lon"><xsl:value-of select="t:Position/t:LongitudeDegrees"/></xsl:variable> + <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> + <ele><xsl:value-of select="t:AltitudeMeters"/></ele><xsl:value-of select="$newline"/> + <time><xsl:value-of select="t:Time"/></time><xsl:value-of select="$newline"/> + <xsl:if test="t:HeartRateBpm"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:hr><xsl:value-of select="t:HeartRateBpm"/></gpxdata:hr><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + </trkpt><xsl:value-of select="$newline"/> + </xsl:if> + </xsl:for-each> + <xsl:value-of select="$newline"/> + </trkseg><xsl:value-of select="$newline"/> + </xsl:for-each> + </trk><xsl:value-of select="$newline"/> + </gpx><xsl:value-of select="$newline"/> +</xsl:template> +</xsl:stylesheet> Deleted: pytrainer/trunk/plugins/garmin-hr-file/conf.xml =================================================================== --- pytrainer/branches/plugins-v2/plugins/garmin-hr-file/conf.xml 2009-11-09 10:34:52 UTC (rev 382) +++ pytrainer/trunk/plugins/garmin-hr-file/conf.xml 2009-11-09 11:07:55 UTC (rev 383) @@ -1,10 +0,0 @@ -<?xml version="1.0" ?> -<pytrainer-plugin - name="Garmin Training Center file (v1)" - description="Import records from a garmin gps device with heart rate support (from training center version 1 file)" - plugincode="garminhrfile" - pluginbutton="Import from file: Garmin Training Center (version 1)" - executable="garminhrfile" -> -<conf-values variable="Force_sport_to" value=""/> -</pytrainer-plugin> Copied: pytrainer/trunk/plugins/garmin-hr-file/conf.xml (from rev 382, pytrainer/branches/plugins-v2/plugins/garmin-hr-file/conf.xml) =================================================================== --- pytrainer/trunk/plugins/garmin-hr-file/conf.xml (rev 0) +++ pytrainer/trunk/plugins/garmin-hr-file/conf.xml 2009-11-09 11:07:55 UTC (rev 383) @@ -0,0 +1,10 @@ +<?xml version="1.0" ?> +<pytrainer-plugin + name="Garmin Training Center file (v1)" + description="Import records from a garmin gps device with heart rate support (from training center version 1 file)" + plugincode="garminhrfile" + pluginbutton="Import from file: Garmin Training Center (version 1)" + executable="garminhrfile" +> +<conf-values variable="Force_sport_to" value=""/> +</pytrainer-plugin> Deleted: pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py =================================================================== --- pytrainer/branches/plugins-v2/plugins/garmin-hr-file/garminhrfile.py 2009-11-09 10:34:52 UTC (rev 382) +++ pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py 2009-11-09 11:07:55 UTC (rev 383) @@ -1,135 +0,0 @@ -#!/usr/bin/python -# -*- coding: iso-8859-1 -*- - -#Copyright (C) - -#Based on plugin by Fiz Vazquez vu...@si... - -#This program is free software; you can redistribute it and/or -#modify it under the terms of the GNU General Public License -#as published by the Free Software Foundation; either version 2 -#of the License, or (at your option) any later version. - -#This program 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 General Public License for more details. - -#You should have received a copy of the GNU General Public License -#along with this program; if not, write to the Free Software -#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -import os -import logging -from lxml import etree -from lib.xmlUtils import XMLParser - -from gui.dialogs import fileChooserDialog, guiFlush - - -class garminhrfile(): - """ Plugin to import from a Garmin Training Center (version 1) file (as outputed from gpsbabel) - Can have multiple activities in the file - Checks to each activity to see if any entries are in the database with the same start time - Creates GPX files for each activity not in the database - - Note: using lxml see http://codespeak.net/lxml - """ - def __init__(self, parent = None, validate=False): - self.parent = parent - self.tmpdir = self.parent.conf.getValue("tmpdir") - self.data_path = os.path.dirname(__file__) - self.validate = validate - self.sport = self.getConfValue("Force_sport_to") - - def getConfValue(self, confVar): - info = XMLParser(self.data_path+"/conf.xml") - code = info.getValue("pytrainer-plugin","plugincode") - plugindir = self.parent.conf.getValue("plugindir") - if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): - value = None - else: - info = XMLParser(plugindir+"/"+code+"/conf.xml") - value = info.getValue("pytrainer-plugin",confVar) - return value - - def run(self): - logging.debug(">>") - selectedFiles = fileChooserDialog(title="Choose a Garmin Training Center file to import").getFiles() - guiFlush() - importfiles = [] - if not selectedFiles: - return importfiles - for filename in selectedFiles: #could be multiple files selected - currently only single selection enabled - if self.valid_input_file(filename): - for (sport, tracks) in self.getTracks(filename): - logging.debug("Found %d tracks for %s sport in %s" % (len(tracks), sport, filename)) - count = 0 - for track in tracks: #can be multiple tracks - if self.shouldImport(track): - count += 1 - gpxfile = "%s/garminhrfile%d.gpx" % (self.tmpdir, len(importfiles)) - self.createGPXfile(gpxfile, track) - if self.sport: #Option to overide sport is set - importfiles.append((gpxfile, self.sport)) - else: #Use sport from file - importfiles.append((gpxfile, sport)) - logging.debug("Importing %d of %d tracks for sport %s" % (count, len(tracks), sport) ) - else: - logging.info("File %s failed validation" % (filename)) - logging.debug("<<") - return importfiles - - def valid_input_file(self, filename): - """ Function to validate input file if requested""" - if not self.validate: #not asked to validate - logging.debug("Not validating %s" % (filename) ) - return True - else: #Validate TCXv1, note are validating against gpsbabels 'broken' result... - xslfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/GarminTrainingCenterDatabase_v1-gpsbabel.xsd" - from lib.xmlValidation import xmlValidator - validator = xmlValidator() - return validator.validateXSL(filename, xslfile) - - def shouldImport(self, track): - """ Function determines whether a track should be imported or not - Currently using time only - """ - timeElement = track.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}Time") - if timeElement is None: - #print (etree.tostring(track, pretty_print=True)) - logging.debug("Error no time found in track") - return False - else: - time = timeElement.text - #comparing date and start time (sport may have been changed in DB after import) - if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): - logging.debug("Not importing track for time %s" % (time)) - return False - else: - return True - - def getTracks(self, filename): - """ Function to return all the tracks in a Garmin Training Center v1 file - """ - sportsList = ("Running", "Biking", "Other", "MultiSport") - result = [] - tree = etree.ElementTree(file=filename) - root = tree.getroot() - for sport in sportsList: - try: - sportLevel = root.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}%s" % sport) - tracks = sportLevel.findall(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}Track") - result.append((sport, tracks)) - except: - print "No entries for sport %s" % sport - return result - - def createGPXfile(self, gpxfile, track): - """ Function to transform a Garmin Training Center v1 Track to a valid GPX+ file - """ - xslt_doc = etree.parse(self.data_path+"/translate.xsl") - transform = etree.XSLT(xslt_doc) - result_tree = transform(track) - result_tree.write(gpxfile, xml_declaration=True) - Copied: pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py (from rev 382, pytrainer/branches/plugins-v2/plugins/garmin-hr-file/garminhrfile.py) =================================================================== --- pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py (rev 0) +++ pytrainer/trunk/plugins/garmin-hr-file/garminhrfile.py 2009-11-09 11:07:55 UTC (rev 383) @@ -0,0 +1,135 @@ +#!/usr/bin/python +# -*- coding: iso-8859-1 -*- + +#Copyright (C) + +#Based on plugin by Fiz Vazquez vu...@si... + +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. + +#This program 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 General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import os +import logging +from lxml import etree +from lib.xmlUtils import XMLParser + +from gui.dialogs import fileChooserDialog, guiFlush + + +class garminhrfile(): + """ Plugin to import from a Garmin Training Center (version 1) file (as outputed from gpsbabel) + Can have multiple activities in the file + Checks to each activity to see if any entries are in the database with the same start time + Creates GPX files for each activity not in the database + + Note: using lxml see http://codespeak.net/lxml + """ + def __init__(self, parent = None, validate=False): + self.parent = parent + self.tmpdir = self.parent.conf.getValue("tmpdir") + self.data_path = os.path.dirname(__file__) + self.validate = validate + self.sport = self.getConfValue("Force_sport_to") + + def getConfValue(self, confVar): + info = XMLParser(self.data_path+"/conf.xml") + code = info.getValue("pytrainer-plugin","plugincode") + plugindir = self.parent.conf.getValue("plugindir") + if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): + value = None + else: + info = XMLParser(plugindir+"/"+code+"/conf.xml") + value = info.getValue("pytrainer-plugin",confVar) + return value + + def run(self): + logging.debug(">>") + selectedFiles = fileChooserDialog(title="Choose a Garmin Training Center file to import").getFiles() + guiFlush() + importfiles = [] + if not selectedFiles: + return importfiles + for filename in selectedFiles: #could be multiple files selected - currently only single selection enabled + if self.valid_input_file(filename): + for (sport, tracks) in self.getTracks(filename): + logging.debug("Found %d tracks for %s sport in %s" % (len(tracks), sport, filename)) + count = 0 + for track in tracks: #can be multiple tracks + if self.shouldImport(track): + count += 1 + gpxfile = "%s/garminhrfile%d.gpx" % (self.tmpdir, len(importfiles)) + self.createGPXfile(gpxfile, track) + if self.sport: #Option to overide sport is set + importfiles.append((gpxfile, self.sport)) + else: #Use sport from file + importfiles.append((gpxfile, sport)) + logging.debug("Importing %d of %d tracks for sport %s" % (count, len(tracks), sport) ) + else: + logging.info("File %s failed validation" % (filename)) + logging.debug("<<") + return importfiles + + def valid_input_file(self, filename): + """ Function to validate input file if requested""" + if not self.validate: #not asked to validate + logging.debug("Not validating %s" % (filename) ) + return True + else: #Validate TCXv1, note are validating against gpsbabels 'broken' result... + xslfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/GarminTrainingCenterDatabase_v1-gpsbabel.xsd" + from lib.xmlValidation import xmlValidator + validator = xmlValidator() + return validator.validateXSL(filename, xslfile) + + def shouldImport(self, track): + """ Function determines whether a track should be imported or not + Currently using time only + """ + timeElement = track.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}Time") + if timeElement is None: + #print (etree.tostring(track, pretty_print=True)) + logging.debug("Error no time found in track") + return False + else: + time = timeElement.text + #comparing date and start time (sport may have been changed in DB after import) + if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): + logging.debug("Not importing track for time %s" % (time)) + return False + else: + return True + + def getTracks(self, filename): + """ Function to return all the tracks in a Garmin Training Center v1 file + """ + sportsList = ("Running", "Biking", "Other", "MultiSport") + result = [] + tree = etree.ElementTree(file=filename) + root = tree.getroot() + for sport in sportsList: + try: + sportLevel = root.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}%s" % sport) + tracks = sportLevel.findall(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1}Track") + result.append((sport, tracks)) + except: + print "No entries for sport %s" % sport + return result + + def createGPXfile(self, gpxfile, track): + """ Function to transform a Garmin Training Center v1 Track to a valid GPX+ file + """ + xslt_doc = etree.parse(self.data_path+"/translate.xsl") + transform = etree.XSLT(xslt_doc) + result_tree = transform(track) + result_tree.write(gpxfile, xml_declaration=True) + Deleted: pytrainer/trunk/plugins/garmin-hr-file/pytrainer.style =================================================================== --- pytrainer/branches/plugins-v2/plugins/garmin-hr-file/pytrainer.style 2009-11-09 10:34:52 UTC (rev 382) +++ pytrainer/trunk/plugins/garmin-hr-file/pytrainer.style 2009-11-09 11:07:55 UTC (rev 383) @@ -1,39 +0,0 @@ -# gpsbabel XCSV style file -# -# Format: GPSDrive -# Author: Alex Mottram -# Date: 12/11/2002 -# -# -# - -DESCRIPTION GpsDrive Format -DATATIPE TRACK - -# FILE LAYOUT DEFINITIIONS: -# -FIELD_DELIMITER WHITESPACE -RECORD_DELIMITER CRNEWLINE -BADCHARS WHITESPACE -PROLOGUE OziExplorer Waypoint File Version 1.1 - -SHORTLEN 20 -SHORTWHITE 0 - -# -# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE: - -IFIELD SHORTNAME, "", "%s" -IFIELD LAT_DECIMAL, "", "%08.5f" -IFIELD LON_DECIMAL, "", "%08.5f" -IFIELD ALT_METERS, "", "%.0f" -IFIELD GMT_TIME,"","%m/%d/%Y %I:%M:%D %p" -IFIELD ICON_DESCR, "", "%s" -IFIELD TRACK_NAME, "", "%s" - -#OFIELD TRACK_NAME, "", "%s" -OFIELD LAT_DECIMAL, "", "%08.5f" -OFIELD LON_DECIMAL, "", "%08.5f" -OFIELD ALT_METERS, "", "%.0f" -OFIELD GMT_TIME,"","%s" -OFIELD HEART_RATE,"","%d" Copied: pytrainer/trunk/plugins/garmin-hr-file/pytrainer.style (from rev 382, pytrainer/branches/plugins-v2/plugins/garmin-hr-file/pytrainer.style) =================================================================== --- pytrainer/trunk/plugins/garmin-hr-file/pytrainer.style (rev 0) +++ pytrainer/trunk/plugins/garmin-hr-file/pytrainer.style 2009-11-09 11:07:55 UTC (rev 383) @@ -0,0 +1,39 @@ +# gpsbabel XCSV style file +# +# Format: GPSDrive +# Author: Alex Mottram +# Date: 12/11/2002 +# +# +# + +DESCRIPTION GpsDrive Format +DATATIPE TRACK + +# FILE LAYOUT DEFINITIIONS: +# +FIELD_DELIMITER WHITESPACE +RECORD_DELIMITER CRNEWLINE +BADCHARS WHITESPACE +PROLOGUE OziExplorer Waypoint File Version 1.1 + +SHORTLEN 20 +SHORTWHITE 0 + +# +# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE: + +IFIELD SHORTNAME, "", "%s" +IFIELD LAT_DECIMAL, "", "%08.5f" +IFIELD LON_DECIMAL, "", "%08.5f" +IFIELD ALT_METERS, "", "%.0f" +IFIELD GMT_TIME,"","%m/%d/%Y %I:%M:%D %p" +IFIELD ICON_DESCR, "", "%s" +IFIELD TRACK_NAME, "", "%s" + +#OFIELD TRACK_NAME, "", "%s" +OFIELD LAT_DECIMAL, "", "%08.5f" +OFIELD LON_DECIMAL, "", "%08.5f" +OFIELD ALT_METERS, "", "%.0f" +OFIELD GMT_TIME,"","%s" +OFIELD HEART_RATE,"","%d" Deleted: pytrainer/trunk/plugins/garmin-hr-file/translate.xsl =================================================================== --- pytrainer/branches/plugins-v2/plugins/garmin-hr-file/translate.xsl 2009-11-09 10:34:52 UTC (rev 382) +++ pytrainer/trunk/plugins/garmin-hr-file/translate.xsl 2009-11-09 11:07:55 UTC (rev 383) @@ -1,53 +0,0 @@ -<?xml version="1.0"?> - -<!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> -<xsl:stylesheet version="1.0" -xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1" -xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -> -<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> - -<!-- this is a bit of a messy way to get whitespace into the output - but it works --> -<xsl:variable name="newline"><xsl:text> -</xsl:text></xsl:variable> - -<xsl:template match="/"> - <gpx creator="pytrainer http://sourceforge.net/projects/pytrainer" version="1.1" - xmlns="http://www.topografix.com/GPX/1/1" - xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > - - <xsl:value-of select="$newline"/> - <xsl:variable name="sport">"Run"</xsl:variable> - <xsl:variable name="time"><xsl:value-of select="t:Track/t:Trackpoint/t:Time"/></xsl:variable> - <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> - <metadata><xsl:value-of select="$newline"/> - <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> - <link href="http://sourceforge.net/projects/pytrainer"/><xsl:value-of select="$newline"/> - <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> - </metadata><xsl:value-of select="$newline"/> - <trk><xsl:value-of select="$newline"/> - <xsl:for-each select="t:Track"> - <trkseg><xsl:value-of select="$newline"/> - <xsl:for-each select="t:Trackpoint"> - <!-- only output a trkpt if a position exists --> - <xsl:if test="t:Position"> - <xsl:variable name="lat"><xsl:value-of select="t:Position/t:LatitudeDegrees"/></xsl:variable> - <xsl:variable name="lon"><xsl:value-of select="t:Position/t:LongitudeDegrees"/></xsl:variable> - <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> - <ele><xsl:value-of select="t:AltitudeMeters"/></ele><xsl:value-of select="$newline"/> - <time><xsl:value-of select="t:Time"/></time><xsl:value-of select="$newline"/> - <xsl:if test="t:HeartRateBpm"> - <extensions><xsl:value-of select="$newline"/> - <gpxdata:hr><xsl:value-of select="t:HeartRateBpm"/></gpxdata:hr><xsl:value-of select="$newline"/> - </extensions><xsl:value-of select="$newline"/> - </xsl:if> - </trkpt><xsl:value-of select="$newline"/> - </xsl:if> - </xsl:for-each> - <xsl:value-of select="$newline"/> - </trkseg><xsl:value-of select="$newline"/> - </xsl:for-each> - </trk><xsl:value-of select="$newline"/> - </gpx><xsl:value-of select="$newline"/> -</xsl:template> -</xsl:stylesheet> Copied: pytrainer/trunk/plugins/garmin-hr-file/translate.xsl (from rev 382, pytrainer/branches/plugins-v2/plugins/garmin-hr-file/translate.xsl) =================================================================== --- pytrainer/trunk/plugins/garmin-hr-file/translate.xsl (rev 0) +++ pytrainer/trunk/plugins/garmin-hr-file/translate.xsl 2009-11-09 11:07:55 UTC (rev 383) @@ -0,0 +1,53 @@ +<?xml version="1.0"?> + +<!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> +<xsl:stylesheet version="1.0" +xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> +<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> + +<!-- this is a bit of a messy way to get whitespace into the output - but it works --> +<xsl:variable name="newline"><xsl:text> +</xsl:text></xsl:variable> + +<xsl:template match="/"> + <gpx creator="pytrainer http://sourceforge.net/projects/pytrainer" version="1.1" + xmlns="http://www.topografix.com/GPX/1/1" + xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > + + <xsl:value-of select="$newline"/> + <xsl:variable name="sport">"Run"</xsl:variable> + <xsl:variable name="time"><xsl:value-of select="t:Track/t:Trackpoint/t:Time"/></xsl:variable> + <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> + <metadata><xsl:value-of select="$newline"/> + <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newli... [truncated message content] |
From: <jb...@us...> - 2009-11-18 10:33:00
|
Revision: 388 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=388&view=rev Author: jblance Date: 2009-11-18 10:32:51 +0000 (Wed, 18 Nov 2009) Log Message: ----------- Initial week view code Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/drawArea.py pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/lib/date.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/record.py Added Paths: ----------- pytrainer/trunk/pytrainer/weekgraph.py Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-11-16 10:01:05 UTC (rev 387) +++ pytrainer/trunk/glade/pytrainer.glade 2009-11-18 10:32:51 UTC (rev 388) @@ -3995,6 +3995,29 @@ <property name="type">tab</property> </packing> </child> + <child> + <widget class="GtkVBox" id="weekview"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="weekviewlabel"> + <property name="visible">True</property> + <property name="label" translatable="yes">Week</property> + </widget> + <packing> + <property name="position">2</property> + <property name="tab_fill">False</property> + <property name="type">tab</property> + </packing> + </child> <child> <widget class="GtkVBox" id="monthview"> Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-16 10:01:05 UTC (rev 387) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-18 10:32:51 UTC (rev 388) @@ -21,9 +21,8 @@ from matplotlib.figure import Figure from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvasGTK from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar -#from matplotlib.numerix import * import matplotlib.pyplot as plt -#from pylab import * +import pylab import logging class DrawArea: @@ -37,7 +36,7 @@ #self.drawDefault() logging.debug('<<') - def stadistics(self,type,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): + def stadistics(self,type,xvalues,yvalues,xlabel,ylabel,title,color=None,zones=None): logging.debug('>>') if len(xvalues[0]) < 1: #self.drawDefault() @@ -47,6 +46,8 @@ logging.debug("Type: "+type+" | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) if type == "bars": self.drawBars(xvalues,yvalues,xlabel,ylabel,title,color) + elif type == "stackedbars": + self.drawStackedBars(xvalues,yvalues,xlabel,ylabel,title) elif type == "plot": self.drawPlot(xvalues,yvalues,xlabel,ylabel,title,color,zones) elif type == "pie": @@ -54,14 +55,8 @@ logging.debug('<<') def drawBars(self,xvalues,yvalues,xlabel,ylabel,title,color): - logging.debug('>>') - - # ToDo: check why vertical container is shared - for child in self.vbox.get_children(): - if self.vbox.get_children()[0] != child: - logging.debug('Removing child: '+str(child)) - self.vbox.remove(child) - + logging.debug('>>') + self.removeVboxChildren() figure = Figure(figsize=(6,4), dpi=72) #canvas = FigureCanvasGTK(figure) # a gtk.DrawingArea @@ -113,19 +108,81 @@ logging.debug('<<') + def getColor(self, x): + colors=["b","g","r","c","m","y","k", "w"] + if x > len(colors): + x = x % len(colors) + return colors[x] + + def fmt(self, x): + if x <= 0.0001: + return ' ' + else: + return '%1.1f' % x + + def drawStackedBars(self,xbars,yvalues,xlabel,ylabel,title): + '''function to draw stacked bars + xbars needs to be a list of strings, e.g. ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] + yvalues needs to be a dict e.g. {'Kayak': {'Tue': 10.08, 'Fri': 17.579999999999998, 'Thu': 15.66, 'Sat': 30.619999999999997}, {'Run': {'Mon': 9.65, 'Sun': 15.59}} + ''' + #TODO tidy + #Add totals to table? + logging.debug('>>') + self.removeVboxChildren() + keys = yvalues.keys() + numRows = len(keys) + numCols = len(xbars) + if numRows == 0: + return + width = .8 + figure = plt.figure(figsize=(6,4), dpi=72) + axis = plt.subplot(111) + + ybottoms = [0] * numCols + yheights = [0] * numCols + inds = xrange(0, numCols) + xvals = [x+(1-width)/2 for x in xrange(0, numCols)] + cellText = [] + for key in keys: + for ind in inds: + ybottoms[ind] += yheights[ind] + yheights[ind] = 0 #Zero heights + color = self.getColor(keys.index(key)) + for xvalue in xbars: + index = xbars.index(xvalue) + if xvalue in yvalues[key]: + height = yvalues[key][xvalue] + else: + height = 0.000000000001 + yheights[index] = height + cellText.append([self.fmt(x) for x in yheights]) + axis.bar(xvals, yheights, bottom=ybottoms, width=width, color=color, align='edge', label=key) + axis.set_xticklabels('' * len(xbars)) + axis.set_ylabel(ylabel) + plt.title(title) + axis.legend(loc=0) + + ## try to do some table stuff + colLabels = xbars + rowLabels = keys + axis.table(cellText=cellText, cellLoc='center', rowLabels=rowLabels, colLabels=colLabels, loc='bottom') + plt.subplots_adjust(left=0.15,bottom=0.08+(0.03*numRows)) + axis.grid(True) + canvas = FigureCanvasGTK(figure) # a gtk.DrawingArea + canvas.show() + self.vbox.pack_start(canvas, True, True) + toolbar = NavigationToolbar(canvas, self.window) + self.vbox.pack_start(toolbar, False, False) + + for child in self.vbox.get_children(): + logging.debug('Child available: '+str(child)) + + logging.debug('<<') + def drawPlot(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): logging.debug('>>') - logging.debug('xlabel: '+str(xlabel)+' | ylabel: '+str(ylabel)+' | title: '+str(title)) - vboxChildren = self.vbox.get_children() - logging.debug('Vbox has %d children %s' % (len(vboxChildren), str(vboxChildren) )) - # ToDo: check why vertical container is shared - for child in vboxChildren: - #Remove all FigureCanvasGTK and NavigationToolbar2GTKAgg to stop double ups of graphs - if isinstance(child, matplotlib.backends.backend_gtkagg.FigureCanvasGTK) or isinstance(child, matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg): - logging.debug('Removing child: '+str(child)) - self.vbox.remove(child) - + self.removeVboxChildren() figure = Figure() figure.clf() i = 0 @@ -167,16 +224,7 @@ def drawPie(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): logging.debug('>>') - - vboxChildren = self.vbox.get_children() - logging.debug('Vbox has %d children %s' % (len(vboxChildren), str(vboxChildren) )) - # ToDo: check why vertical container is shared - for child in vboxChildren: - #Remove all FigureCanvasGTK and NavigationToolbar2GTKAgg to stop double ups of graphs - if isinstance(child, matplotlib.backends.backend_gtkagg.FigureCanvasGTK) or isinstance(child, matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg): - logging.debug('Removing child: '+str(child)) - self.vbox.remove(child) - + self.removeVboxChildren() figure = Figure(figsize=(6,4), dpi=72) axis = figure.add_subplot(111) @@ -257,3 +305,18 @@ indLast = ind logging.debug('<<') + def removeVboxChildren(self): + ''' function to delete vbox children so that multiple graphs do not appear + there must a better way to do this - pyplot? + ''' + logging.debug('>>') + #Tidy up draw areas + vboxChildren = self.vbox.get_children() + logging.debug('Vbox has %d children %s' % (len(vboxChildren), str(vboxChildren) )) + # ToDo: check why vertical container is shared + for child in vboxChildren: + #Remove all FigureCanvasGTK and NavigationToolbar2GTKAgg to stop double ups of graphs + if isinstance(child, matplotlib.backends.backend_gtkagg.FigureCanvasGTK) or isinstance(child, matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg): + logging.debug('Removing child: '+str(child)) + self.vbox.remove(child) + logging.debug('<<') Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-16 10:01:05 UTC (rev 387) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-18 10:32:51 UTC (rev 388) @@ -1,5 +1,3 @@ -# -*- coding: iso-8859-1 -*- - #Copyright (C) Fiz Vazquez vu...@si... # Modified by dgranda @@ -106,11 +104,12 @@ id = selected.get_value(iter,0) self.parent.runExtension(extension,id) - def createGraphs(self,RecordGraph,DayGraph,MonthGraph,YearGraph,HeartRateGraph): + def createGraphs(self,RecordGraph,DayGraph,WeekGraph, MonthGraph,YearGraph,HeartRateGraph): self.drawarearecord = RecordGraph(self.record_vbox, self.window1, self.record_combovalue, self.record_combovalue2) self.drawareaheartrate = HeartRateGraph(self.heartrate_vbox, self.window1, self.heartrate_vbox2) #self.drawareaday = DayGraph(self.day_vbox, self.day_combovalue) self.day_vbox.hide() + self.drawareaweek = WeekGraph(self.weekview, self.window1) self.drawareamonth = MonthGraph(self.month_vbox, self.window1, self.month_combovalue,self.month_combovalue2) self.drawareayear = YearGraph(self.year_vbox, self.window1, self.year_combovalue,self.year_combovalue2) @@ -334,6 +333,11 @@ self.googlemaps.drawMap(id_record) logging.debug("<<") + def actualize_weekview(self, record_list, date_ini, date_end): + logging.debug(">>") + self.drawareaweek.drawgraph(record_list) + logging.debug("<<") + def actualize_monthview(self,record_list, nameMonth): logging.debug(">>") self.month_date.set_text(nameMonth) @@ -692,8 +696,10 @@ elif page == 1: self.selected_view="day" elif page == 2: + self.selected_view="week" + elif page == 3: self.selected_view="month" - elif page == 3: + elif page == 4: self.selected_view="year" self.parent.refreshGraphView(self.selected_view) @@ -742,7 +748,7 @@ def on_calendar_changemonth(self,widget): logging.debug("--") self.block = True - self.notebook.set_current_page(2) + self.notebook.set_current_page(3) self.selected_view="month" self.parent.refreshListRecords() self.parent.refreshGraphView(self.selected_view) @@ -750,7 +756,7 @@ def on_calendar_next_year(self,widget): logging.debug("--") self.block = True - self.notebook.set_current_page(3) + self.notebook.set_current_page(4) self.selected_view="year" self.parent.refreshListRecords() self.parent.refreshGraphView(self.selected_view) Modified: pytrainer/trunk/pytrainer/lib/date.py =================================================================== --- pytrainer/trunk/pytrainer/lib/date.py 2009-11-16 10:01:05 UTC (rev 387) +++ pytrainer/trunk/pytrainer/lib/date.py 2009-11-18 10:32:51 UTC (rev 388) @@ -49,6 +49,13 @@ def time2string(self,date): return "%0.4d-%0.2d-%0.2d" %(int(date[0]),int(date[1]),int(date[2])) + + def getWeekInterval(self,date): + weekDate = datetime.datetime.strptime(date, "%Y-%m-%d") + dayOfWeek = int(weekDate.strftime("%w")) + date_ini = weekDate + datetime.timedelta(days=0-dayOfWeek) + date_end = weekDate + datetime.timedelta(days=6-dayOfWeek) + return date_ini.strftime("%Y-%m-%d"), date_end.strftime("%Y-%m-%d") def getMonthInterval(self,date): year,month,day = date.split("-") Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-11-16 10:01:05 UTC (rev 387) +++ pytrainer/trunk/pytrainer/main.py 2009-11-18 10:32:51 UTC (rev 388) @@ -39,6 +39,7 @@ from profile import Profile from recordgraph import RecordGraph from daygraph import DayGraph +from weekgraph import WeekGraph from monthgraph import MonthGraph from yeargraph import YearGraph from heartrategraph import HeartRateGraph @@ -131,7 +132,7 @@ self.plugins = Plugins(data_path, self) self.loadPlugins() self.loadExtensions() - self.windowmain.createGraphs(RecordGraph,DayGraph,MonthGraph,YearGraph,HeartRateGraph) + self.windowmain.createGraphs(RecordGraph,DayGraph,WeekGraph, MonthGraph,YearGraph,HeartRateGraph) self.windowmain.createMap(Googlemaps,self.waypoint) self.windowmain.createWaypointEditor(WaypointEditor,self.waypoint) self.windowmain.on_calendar_selected(None) @@ -218,6 +219,11 @@ record_list = self.record.getrecordList(date_selected) self.windowmain.actualize_dayview(record_list) selected,iter = self.windowmain.recordTreeView.get_selection().get_selected() + elif view=="week": + logging.debug('week view') + date_ini, date_end = self.date.getWeekInterval(date_selected) + record_list = self.record.getrecordPeriod(date_ini, date_end) + self.windowmain.actualize_weekview(record_list, date_ini, date_end) elif view=="month": logging.debug('month view') date_ini, date_end = self.date.getMonthInterval(date_selected) @@ -235,6 +241,8 @@ record_list = self.record.getrecordPeriodSport(date_ini, date_end,sport) self.windowmain.actualize_yearview(record_list, year) self.windowmain.actualize_yeargraph(record_list) + else: + print "Unknown view %s" % view logging.debug('<<') def refreshRecordGraphView(self, view): Modified: pytrainer/trunk/pytrainer/record.py =================================================================== --- pytrainer/trunk/pytrainer/record.py 2009-11-16 10:01:05 UTC (rev 387) +++ pytrainer/trunk/pytrainer/record.py 2009-11-18 10:32:51 UTC (rev 388) @@ -252,7 +252,13 @@ return self.ddbb.select("records,sports", "sports.name,date,distance,time,beats,comments,average,calories,id_record,maxspeed,maxbeats", "date=\"%s\" and records.sport=sports.id_sports" %date) + + def getrecordPeriod(self,date_ini, date_end): + tables = "records,sports" + condition = "date>=\"%s\" and date<=\"%s\" and records.sport=sports.id_sports" %(date_ini,date_end) + return self.ddbb.select(tables,"sports.name, date,distance,time,beats,comments,average,calories,maxspeed,maxbeats", condition) + def getrecordPeriodSport(self,date_ini, date_end,sport): if sport<1 : tables = "records" Added: pytrainer/trunk/pytrainer/weekgraph.py =================================================================== --- pytrainer/trunk/pytrainer/weekgraph.py (rev 0) +++ pytrainer/trunk/pytrainer/weekgraph.py 2009-11-18 10:32:51 UTC (rev 388) @@ -0,0 +1,55 @@ +# -*- coding: iso-8859-1 -*- + +#Copyright (C) Fiz Vazquez vu...@si... + +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. + +#This program 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 General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +from gui.drawArea import DrawArea +import logging +import datetime + +class WeekGraph: + def __init__(self, vbox = None, window = None): + self.drawarea = DrawArea(vbox, window) + + def drawgraph(self,values): + logging.debug(">>") + #print "Found %d records" % len(values) + logging.debug(str(values)) + days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] + valueDict = {} + for record in values: + day = datetime.datetime.strptime(record[1], "%Y-%m-%d").strftime("%a") # Gives Sun, Mon etc for this record + sport = record[0] + distance = record[2] + if sport in valueDict: #Already got this sport + if day in valueDict[sport]: #Already got this sport on this day + valueDict[sport][day] += distance + else: #New day for this sport + valueDict[sport][day] = distance + else: #New sport + valueDict[sport] = {day: distance} + + xlab = "Day" + ylab = "kilometers" + tit = "Week View" + self.drawarea.stadistics("stackedbars",days,valueDict,xlab,ylab,tit) + logging.debug("<<") + + + + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-11-19 06:04:09
|
Revision: 391 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=391&view=rev Author: jblance Date: 2009-11-19 06:04:01 +0000 (Thu, 19 Nov 2009) Log Message: ----------- Fix for bug 2811470 - clickable link for further details on MET (links to wikipedia) Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/windowmain.py Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-11-19 05:32:10 UTC (rev 390) +++ pytrainer/trunk/glade/pytrainer.glade 2009-11-19 06:04:01 UTC (rev 391) @@ -10527,25 +10527,16 @@ <property name="y_options"></property> </packing> </child> - - <child> - <widget class="GtkLabel" id="label157"> - <property name="visible">True</property> - <property name="label" translatable="yes"><small><b>Note:</b> You can get your M.E.T. sport Coefficient here: http://pytrainer.e-oss.net/met.pdf</small></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> + <child> + <widget class="GtkLinkButton" id="metlinkbutton"> + <property name="label" translatable="yes">More information on determining yor M.E.T sport coefficient on Wikipedia</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="has_tooltip">True</property> + <property name="relief">none</property> + <property name="uri">http://en.wikipedia.org/wiki/Metabolic_equivalent</property> + </widget> <packing> <property name="left_attach">0</property> <property name="right_attach">3</property> @@ -11135,31 +11126,23 @@ </child> <child> - <widget class="GtkLabel" id="label-2147483647"> - <property name="visible">True</property> - <property name="label" translatable="yes"><small><b>Note:</b> You can get your M.E.T. sport Coefficient here: http://pytrainer.e-oss.net/met.pdf</small></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> + <widget class="GtkLinkButton" id="linkbutton1"> + <property name="label" translatable="yes">More information on determining yor M.E.T sport coefficient on Wikipedia</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="has_tooltip">True</property> + <property name="relief">none</property> + <property name="uri">http://en.wikipedia.org/wiki/Metabolic_equivalent</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> </child> </widget> <packing> Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-19 05:32:10 UTC (rev 390) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-19 06:04:01 UTC (rev 391) @@ -31,6 +31,10 @@ class Main(SimpleGladeApp): def __init__(self, data_path = None, parent = None, version = None): + def url_hook(dialog, url): + pytrainer.lib.webUtils.open_url_in_browser(url) + # Available in PyGTK 2.6 and above + gtk.about_dialog_set_url_hook(url_hook) self.version = version self.parent = parent self.data_path = data_path This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-11-22 09:18:38
|
Revision: 395 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=395&view=rev Author: jblance Date: 2009-11-22 09:18:26 +0000 (Sun, 22 Nov 2009) Log Message: ----------- Added info and combobox to week view, fix for start of week Sun vs Mon Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/drawArea.py pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/lib/date.py pytrainer/trunk/pytrainer/weekgraph.py Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-11-20 06:48:45 UTC (rev 394) +++ pytrainer/trunk/glade/pytrainer.glade 2009-11-22 09:18:26 UTC (rev 395) @@ -4000,13 +4000,91 @@ <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> + <child> + <widget class="GtkTable" id="weekview_table"> + <property name="visible">True</property> + <property name="n_rows">2</property> + <property name="n_columns">2</property> + <child> <!-- weekview_weeklabel --> + <widget class="GtkLabel" id="weekview_weeklabel"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">17</property> + <property name="ypad">7</property> + <property name="use_markup">True</property> + <property name="label" translatable="yes"><b>Week:</b></property> + <property name="single_line_mode">True</property> + <property name="track_visited_links">False</property> + </widget> + <packing> + <property name="x_options">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> <!-- weekview_weeklabel --> + <child> + <widget class="GtkAlignment" id="weekview_alignment"> + <property name="visible">True</property> + <property name="xalign">0</property> + <child> <!-- weekview_weekinfo --> + <widget class="GtkLabel" id="weekview_weekinfo"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">7</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="use_markup">True</property> + <property name="label" translatable="yes"></property> + <property name="single_line_mode">True</property> + <property name="track_visited_links">False</property> + </widget> + <packing> + </packing> + </child> <!-- weekview_weekinfo --> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options">GTK_FILL</property> + </packing> + </child> <!-- weekview_alignment --> + + <child> <!-- weekview_combovalue --> + <widget class="GtkComboBoxEntry" id="week_combovalue"> + <property name="visible">True</property> + <property name="items" translatable="yes">Distance +Time +</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + <signal name="changed" handler="on_week_combovalue_changed" /> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">GTK_SHRINK</property> + <property name="y_options">GTK_SHRINK</property> + </packing> + </child> <!-- weekview_combovalue --> + </widget> + <packing> + <property name="padding">5</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> <!-- weekview_table --> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">False</property> + <property name="fill">True</property> </packing> - </child> + </child> <!-- weekview--> <child> <widget class="GtkLabel" id="weekviewlabel"> <property name="visible">True</property> Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-20 06:48:45 UTC (rev 394) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-22 09:18:26 UTC (rev 395) @@ -46,8 +46,6 @@ logging.debug("Type: "+type+" | title: "+str(title)+" | col: "+str(color)+" | xlabel: "+str(xlabel)+" | ylabel: "+str(ylabel)) if type == "bars": self.drawBars(xvalues,yvalues,xlabel,ylabel,title,color) - elif type == "stackedbars": - self.drawStackedBars(xvalues,yvalues,xlabel,ylabel,title) elif type == "plot": self.drawPlot(xvalues,yvalues,xlabel,ylabel,title,color,zones) elif type == "pie": @@ -128,6 +126,7 @@ #TODO tidy #Add totals to table? logging.debug('>>') + logging.debug("Title: %s", (title, )) self.removeVboxChildren() keys = yvalues.keys() numRows = len(keys) Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-20 06:48:45 UTC (rev 394) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-22 09:18:26 UTC (rev 395) @@ -18,6 +18,7 @@ import gobject import sys import logging +import datetime from SimpleGladeApp import * from popupmenu import PopupMenu @@ -113,7 +114,7 @@ self.drawareaheartrate = HeartRateGraph(self.heartrate_vbox, self.window1, self.heartrate_vbox2) #self.drawareaday = DayGraph(self.day_vbox, self.day_combovalue) self.day_vbox.hide() - self.drawareaweek = WeekGraph(self.weekview, self.window1) + self.drawareaweek = WeekGraph(self.weekview, self.window1, self.week_combovalue) self.drawareamonth = MonthGraph(self.month_vbox, self.window1, self.month_combovalue,self.month_combovalue2) self.drawareayear = YearGraph(self.year_vbox, self.window1, self.year_combovalue,self.year_combovalue2) @@ -339,6 +340,9 @@ def actualize_weekview(self, record_list, date_ini, date_end): logging.debug(">>") + date_s = datetime.datetime.strptime(date_ini, "%Y-%m-%d") + date_e = datetime.datetime.strptime(date_end, "%Y-%m-%d") + self.weekview_weekinfo.set_text("%s - %s" % (datetime.datetime.strftime(date_s, "%a %d %b"), datetime.datetime.strftime(date_e, "%a %d %b")) ) self.drawareaweek.drawgraph(record_list, date_ini, date_end) logging.debug("<<") @@ -731,6 +735,10 @@ logging.debug("--") self.parent.refreshGraphView(self.selected_view) + def on_week_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) Modified: pytrainer/trunk/pytrainer/lib/date.py =================================================================== --- pytrainer/trunk/pytrainer/lib/date.py 2009-11-20 06:48:45 UTC (rev 394) +++ pytrainer/trunk/pytrainer/lib/date.py 2009-11-22 09:18:26 UTC (rev 395) @@ -52,18 +52,23 @@ return "%0.4d-%0.2d-%0.2d" %(int(date[0]),int(date[1]),int(date[2])) def getWeekInterval(self,date, prf_us_system): + ''' Function to provide beginning and ending of the week that a certain day is in + Problems as python date functions do not respect locale (i.e. Sunday is always start of week????) + Note: %w gives weekday as a decimal number [0(Sunday),6(Saturday)]. + ''' if prf_us_system == "True": #Sunday is first day of week weekDate = datetime.datetime.strptime(date, "%Y-%m-%d") dayOfWeek = int(weekDate.strftime("%w")) - date_ini = weekDate + datetime.timedelta(days=0-dayOfWeek) - date_end = weekDate + datetime.timedelta(days=6-dayOfWeek) else: #Monday is first day of week weekDate = datetime.datetime.strptime(date, "%Y-%m-%d") dayOfWeek = int(weekDate.strftime("%w")) - date_ini = weekDate + datetime.timedelta(days=1-dayOfWeek) - date_end = weekDate + datetime.timedelta(days=7-dayOfWeek) + if dayOfWeek == 0: #Sunday, need to adjust + dayOfWeek = 7 + dayOfWeek -= 1 + date_ini = weekDate + datetime.timedelta(days=0-dayOfWeek) + date_end = weekDate + datetime.timedelta(days=6-dayOfWeek) return date_ini.strftime("%Y-%m-%d"), date_end.strftime("%Y-%m-%d") def getMonthInterval(self,date): Modified: pytrainer/trunk/pytrainer/weekgraph.py =================================================================== --- pytrainer/trunk/pytrainer/weekgraph.py 2009-11-20 06:48:45 UTC (rev 394) +++ pytrainer/trunk/pytrainer/weekgraph.py 2009-11-22 09:18:26 UTC (rev 395) @@ -21,12 +21,16 @@ import datetime class WeekGraph: - def __init__(self, vbox = None, window = None): + def __init__(self, vbox = None, window = None, combovalue = None): self.drawarea = DrawArea(vbox, window) + self.combovalue = combovalue def drawgraph(self,values, date_ini, date_end): logging.debug(">>") - #print "Found %d records" % len(values) + value_selected = self.combovalue.get_active() + if value_selected < 0: + self.combovalue.set_active(0) + value_selected = 0 logging.debug(str(values)) #build days list to ensure localised values are used. days = [] @@ -36,6 +40,8 @@ dateToUse = dateTemp + incrementDay days.append( dateToUse.strftime("%a") ) valueDict = {} + + #TODO Need to add time etc (currently distance only) for record in values: day = datetime.datetime.strptime(record[1], "%Y-%m-%d").strftime("%a") # Gives Sun, Mon etc for this record sport = record[0] @@ -48,10 +54,10 @@ else: #New sport valueDict[sport] = {day: distance} - xlab = "Day" - ylab = "kilometers" - tit = "Week View" - self.drawarea.stadistics("stackedbars",days,valueDict,xlab,ylab,tit) + xlabel = "Day" + ylabel = "kilometers" + title = "Week View" + self.drawarea.drawStackedBars(days,valueDict,xlabel,ylabel,title) logging.debug("<<") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-11-23 10:43:14
|
Revision: 398 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=398&view=rev Author: jblance Date: 2009-11-23 10:42:47 +0000 (Mon, 23 Nov 2009) Log Message: ----------- Added summary information to week view, made view sticky for changes of day Modified Paths: -------------- pytrainer/trunk/INSTALL pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/drawArea.py pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/lib/date.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/monthgraph.py pytrainer/trunk/pytrainer/record.py pytrainer/trunk/pytrainer/weekgraph.py Modified: pytrainer/trunk/INSTALL =================================================================== --- pytrainer/trunk/INSTALL 2009-11-23 09:46:07 UTC (rev 397) +++ pytrainer/trunk/INSTALL 2009-11-23 10:42:47 UTC (rev 398) @@ -20,6 +20,11 @@ gnome-python2-gtkmozembed-2.19.1-27 gpsbabel-1.3.5-1 +(additional packages from 1.7.0 onwards) +python-lxml +libxml2 +libxslt + 1.2.- Optional packages (Google Maps integration) xulrunner-1.9.0.7-1 Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-11-23 09:46:07 UTC (rev 397) +++ pytrainer/trunk/glade/pytrainer.glade 2009-11-23 10:42:47 UTC (rev 398) @@ -3995,96 +3995,1132 @@ <property name="type">tab</property> </packing> </child> - <child> - <widget class="GtkVBox" id="weekview"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - <child> - <widget class="GtkTable" id="weekview_table"> - <property name="visible">True</property> - <property name="n_rows">2</property> - <property name="n_columns">2</property> - <child> <!-- weekview_weeklabel --> - <widget class="GtkLabel" id="weekview_weeklabel"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">17</property> - <property name="ypad">7</property> - <property name="use_markup">True</property> - <property name="label" translatable="yes"><b>Week:</b></property> - <property name="single_line_mode">True</property> - <property name="track_visited_links">False</property> - </widget> - <packing> - <property name="x_options">GTK_SHRINK</property> - <property name="y_options">GTK_SHRINK</property> - </packing> - </child> <!-- weekview_weeklabel --> + +<child> <!-- Start week view tab --> + <widget class="GtkVBox" id="weekview"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame4"> + <property name="border_width">6</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + <child> - <widget class="GtkAlignment" id="weekview_alignment"> - <property name="visible">True</property> - <property name="xalign">0</property> - <child> <!-- weekview_weekinfo --> - <widget class="GtkLabel" id="weekview_weekinfo"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">7</property> + <widget class="GtkTable" id="table8"> + <property name="border_width">10</property> + <property name="visible">True</property> + <property name="n_rows">5</property> + <property name="n_columns">6</property> + <property name="homogeneous">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">3</property> + + <child> + <widget class="GtkLabel" id="w_distance_unit"> + <property name="visible">True</property> + <property name="label" translatable="yes">Km</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">5</property> + <property name="right_attach">6</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="weeka_distance"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label99"> + <property name="width_request">90</property> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Distance:</b></property> + <property name="use_underline">False</property> <property name="use_markup">True</property> - <property name="label" translatable="yes"></property> - <property name="single_line_mode">True</property> - <property name="track_visited_links">False</property> - </widget> - <packing> - </packing> - </child> <!-- weekview_weekinfo --> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> <!-- weekview_alignment --> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> - <child> <!-- weekview_combovalue --> - <widget class="GtkComboBoxEntry" id="week_combovalue"> - <property name="visible">True</property> - <property name="items" translatable="yes">Distance + <child> + <widget class="GtkLabel" id="label100"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Time:</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox15"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkLabel" id="weeka_hour"> + <property name="visible">True</property> + <property name="label" translatable="yes">000</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label108"> + <property name="visible">True</property> + <property name="label" translatable="yes">:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="weeka_minute"> + <property name="visible">True</property> + <property name="label" translatable="yes">00</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label109"> + <property name="visible">True</property> + <property name="label" translatable="yes">:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="weeka_second"> + <property name="visible">True</property> + <property name="label" translatable="yes">00</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label102"> + <property name="width_request">90</property> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Speed:</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="weeka_average"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="w_speed_unit"> + <property name="visible">True</property> + <property name="label" translatable="yes">km/h</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label103"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Calories: </b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="weeka_calories"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label107"> + <property name="visible">True</property> + <property name="label" translatable="yes">Cal</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483648"> + <property name="width_request">90</property> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Max Speed:</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="weeka_maxspeed"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="w_maxspeed_unit"> + <property name="visible">True</property> + <property name="label" translatable="yes">km/h</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">5</property> + <property name="right_attach">6</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label110"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label101"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Beats avg:</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="weeka_beats"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label105"> + <property name="visible">True</property> + <property name="label" translatable="yes">bpm</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483645"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Pace:</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483644"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Max Pace:</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="w_pace_unit"> + <property name="visible">True</property> + <property name="label" translatable="yes">min/km</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="w_maxpace_unit"> + <property name="visible">True</property> + <property name="label" translatable="yes">min/km</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">5</property> + <property name="right_attach">6</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483641"> + <property name="visible">True</property> + <property name="label" translatable="yes">bpm</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">5</property> + <property name="right_attach">6</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483640"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Max Beats:</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="weeka_pace"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="weeka_maxpace"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="weeka_maxbeats"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkHBox" id="hbox14"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkLabel" id="label95"> + <property name="visible">True</property> + <property name="label" translatable="yes"> <b>Week:</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="week_date"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">5</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="week_vbox"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkHBox" id="hbox19"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">8</property> + + <child> + <widget class="GtkLabel" id="label-2147483648"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="week_combovalue"> + <property name="visible">True</property> + <property name="items" translatable="yes">Kilometers Time -</property> - <property name="add_tearoffs">False</property> - <property name="has_frame">True</property> - <property name="focus_on_click">True</property> - <signal name="changed" handler="on_week_combovalue_changed" /> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_SHRINK</property> - <property name="y_options">GTK_SHRINK</property> - </packing> - </child> <!-- weekview_combovalue --> - </widget> +Beats +Average +Calories</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + <signal name="changed" handler="on_week_combovalue_changed" last_modification_time="Fri, 14 Apr 2006 07:29:22 GMT"/> + </widget> <packing> - <property name="padding">5</property> + <property name="padding">0</property> <property name="expand">False</property> <property name="fill">True</property> </packing> - </child> <!-- weekview_table --> - </widget> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483648"> + <property name="visible">True</property> + <property name="label" translatable="yes">Versus</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="week_combovalue2"> + <property name="visible">True</property> + <property name="items" translatable="yes">None</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + <signal name="changed" handler="on_week_combovalue_changed" last_modification_time="Fri, 14 Apr 2006 07:29:22 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label-2147483647"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <placeholder/> + </child> + </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">True</property> </packing> - </child> <!-- weekview--> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> <child> <widget class="GtkLabel" id="weekviewlabel"> <property name="visible">True</property> @@ -5226,7 +6262,7 @@ <property name="tab_expand">False</property> <property name="tab_fill">True</property> </packing> - </child> +</child> <!-- End week view tab --> <child> <widget class="GtkLabel" id="label45"> Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-23 09:46:07 UTC (rev 397) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-23 10:42:47 UTC (rev 398) @@ -34,6 +34,7 @@ self.window = window #self.canvas = FigureCanvasGTK(self.figure) # a gtk.DrawingArea #self.drawDefault() + self.NEARLY_ZERO = 0.0000000000000000000001 logging.debug('<<') def stadistics(self,type,xvalues,yvalues,xlabel,ylabel,title,color=None,zones=None): @@ -73,6 +74,8 @@ axis.set_ylabel(ylabel[i]) axis.set_title(title[i]) j=0 + #print "xvalues: %s" % (xvalues) + #print "yvalues: %s" % (yvalues) for x in xvalues[i]: xvalues[i][j]=x-xmod j+=1 @@ -152,7 +155,7 @@ if xvalue in yvalues[key]: height = yvalues[key][xvalue] else: - height = 0.0000000000000000001 + height = self.NEARLY_ZERO yheights[index] = height cellText.append([self.fmt(x) for x in yheights]) axis.bar(xvals, yheights, bottom=ybottoms, width=width, color=color, align='edge', label=key) Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-23 09:46:07 UTC (rev 397) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-23 10:42:47 UTC (rev 398) @@ -68,6 +68,7 @@ self._createXmlListView(self.fileconf) self.showAllRecordTreeViewColumns() self.allRecordTreeView.set_search_column(1) + self.notebook.set_current_page(1) def _createXmlListView(self,file): menufile = XMLParser(file) @@ -114,7 +115,7 @@ self.drawareaheartrate = HeartRateGraph(self.heartrate_vbox, self.window1, self.heartrate_vbox2) #self.drawareaday = DayGraph(self.day_vbox, self.day_combovalue) self.day_vbox.hide() - self.drawareaweek = WeekGraph(self.weekview, self.window1, self.week_combovalue) + self.drawareaweek = WeekGraph(self.weekview, self.window1, self.week_combovalue, self.week_combovalue2) self.drawareamonth = MonthGraph(self.month_vbox, self.window1, self.month_combovalue,self.month_combovalue2) self.drawareayear = YearGraph(self.year_vbox, self.window1, self.year_combovalue,self.year_combovalue2) @@ -342,7 +343,80 @@ logging.debug(">>") date_s = datetime.datetime.strptime(date_ini, "%Y-%m-%d") date_e = datetime.datetime.strptime(date_end, "%Y-%m-%d") - self.weekview_weekinfo.set_text("%s - %s" % (datetime.datetime.strftime(date_s, "%a %d %b"), datetime.datetime.strftime(date_e, "%a %d %b")) ) + self.week_date.set_text("%s - %s (%d)" % (datetime.datetime.strftime(date_s, "%a %d %b"), datetime.datetime.strftime(date_e, "%a %d %b"), int(datetime.datetime.strftime(date_e, "%W"))+1) ) + + km = calories = time = average = beats = 0 + num_records = len(record_list) + time_in_min = 0 + tbeats = 0 + maxspeed = 0 + pace = "0.00" + maxpace = "0.00" + maxbeats = 0 + + conf = checkConf() + filename = conf.getValue("conffile") + configuration = XMLParser(filename) + if configuration.getValue("pytraining","prf_us_system") == "True": + self.w_distance_unit.set_text(_("miles")) + self.w_speed_unit.set_text(_("miles/h")) + self.w_maxspeed_unit.set_text(_("miles/h")) + self.w_pace_unit.set_text(_("min/mile")) + self.w_maxpace_unit.set_text(_("min/mile")) + else: + self.w_distance_unit.set_text(_("km")) + self.w_speed_unit.set_text(_("km/h")) + self.w_maxspeed_unit.set_text(_("km/h")) + self.w_pace_unit.set_text(_("min/km")) + self.w_maxpace_unit.set_text(_("min/km")) + + if num_records>0: + for record in record_list: + km += self.parseFloat(record[1]) + time += self.parseFloat(record[2]) + average += self.parseFloat(record[5]) + calories += self.parseFloat(record[6]) + beats = self.parseFloat(record[3]) + if float(beats) > 0: + time_in_min += time/60 + tbeats += beats*(time/60) + if record[7] > maxspeed: + maxspeed = self.parseFloat(record[7]) + if record[8] > maxbeats: + maxbeats = self.parseFloat(record[8]) + + if configuration.getValue("pytraining","prf_us_system") == "True": + km = km2miles(km) + maxspeed = km2miles(maxspeed) + + if time_in_min > 0: + tbeats = tbeats/time... [truncated message content] |
From: <jb...@us...> - 2009-11-26 09:48:15
|
Revision: 408 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=408&view=rev Author: jblance Date: 2009-11-26 09:48:08 +0000 (Thu, 26 Nov 2009) Log Message: ----------- Updated week view to allow second axis use Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/drawArea.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/weekgraph.py Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-11-26 07:51:34 UTC (rev 407) +++ pytrainer/trunk/glade/pytrainer.glade 2009-11-26 09:48:08 UTC (rev 408) @@ -5060,7 +5060,12 @@ <child> <widget class="GtkComboBoxEntry" id="week_combovalue2"> <property name="visible">True</property> - <property name="items" translatable="yes">None</property> + <property name="items" translatable="yes">None +Kilometers +Time +Beats +Average +Calories</property> <property name="add_tearoffs">False</property> <property name="has_frame">True</property> <property name="focus_on_click">True</property> Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-26 07:51:34 UTC (rev 407) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-26 09:48:08 UTC (rev 408) @@ -148,19 +148,29 @@ else: return '%1.1f' % x - def drawStackedBars(self,xbars,yvalues,ylabel,title, valuesAreTime=False): + def drawStackedBars(self,xvalues,yvalues,ylabel,title, valuesAreTime=False): '''function to draw stacked bars - xbars needs to be a list of strings, e.g. ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] - yvalues needs to be a dict e.g. {'Kayak': {'Tue': 10.08, 'Fri': 17.579999999999998, 'Thu': 15.66, 'Sat': 30.619999999999997}, {'Run': {'Mon': 9.65, 'Sun': 15.59}} + xvalues needs to be a list of strings, e.g. [0]["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] + yvalues needs to be a dict e.g. [0]{'Kayak': {'Tue': 10.08, 'Fri': 17.579999999999998, 'Thu': 15.66, 'Sat': 30.619999999999997}, {'Run': {'Mon': 9.65, 'Sun': 15.59}} ''' #TODO tidy - #Add totals to table? logging.debug('>>') logging.debug("Title: %s", (title, )) self.removeVboxChildren() - keys = yvalues.keys() + + #Check how many axes to draw + if len(xvalues) == 1: #One axis + barWidth = 0.8 + barOffset = 0.1 + elif len(xvalues) == 2: #Twin axes + barWidth = 0.4 + barOffset = 0.1 + else: #Error + return + + keys = yvalues[0].keys() numRows = len(keys) - numCols = len(xbars) + numCols = len(xvalues[0]) if numRows == 0: return width = .8 @@ -170,35 +180,76 @@ ybottoms = [0] * numCols yheights = [0] * numCols inds = xrange(0, numCols) - xvals = [x+(1-width)/2 for x in xrange(0, numCols)] + xvals = [x+barOffset for x in range(0, numCols)] cellText = [] self.showGraph=False + + #Display first axis for key in keys: for ind in inds: ybottoms[ind] += yheights[ind] yheights[ind] = 0 #Zero heights color = self.getColor(keys.index(key)) - for xvalue in xbars: - index = xbars.index(xvalue) - if xvalue in yvalues[key]: - height = yvalues[key][xvalue] + for xvalue in xvalues[0]: + index = xvalues[0].index(xvalue) + if xvalue in yvalues[0][key]: + height = yvalues[0][key][xvalue] if float(height) > 0.0: self.showGraph=True else: height = self.NEARLY_ZERO yheights[index] = height - cellText.append([self.fmtTableText(x, valuesAreTime) for x in yheights]) + cellText.append([self.fmtTableText(x, valuesAreTime[0]) for x in yheights]) if self.showGraph: - axis.bar(xvals, yheights, bottom=ybottoms, width=width, color=color, align='edge', label=key) + axis.bar(xvals, yheights, bottom=ybottoms, width=barWidth, color=color, align='edge', label=key) else: #Only zero results pass - axis.set_xticklabels('' * len(xbars)) - axis.set_ylabel(ylabel) - plt.title(title) - axis.legend(loc=0) + axis.set_xticklabels('' * len(xvalues[0])) + axis.set_ylabel(ylabel[0]) + if len(xvalues) == 1: + plt.title(title[0]) + axis.legend(loc=0) + #Display twin axis + if len(xvalues) == 2: + self.showGraph=False + ax2 = axis.twinx() + keys = yvalues[1].keys() + ybottoms = [0] * numCols + yheights = [self.NEARLY_ZERO] * numCols + for key in keys: + for ind in inds: + ybottoms[ind] += yheights[ind] + yheights[ind] = 0.0 #Zero heights + color = self.getColor(keys.index(key)) + for xvalue in xvalues[0]: + index = xvalues[0].index(xvalue) + if xvalue in yvalues[1][key]: + height = yvalues[1][key][xvalue] + if float(height) > 0.0: + self.showGraph=True + else: + height = self.NEARLY_ZERO + yheights[index] = height + textToAdd = self.fmtTableText(height, valuesAreTime[1]) + if textToAdd is not ' ': + row = keys.index(key) + col = index + cellText[row][col] += " | %s" % (self.fmtTableText(height, valuesAreTime[1])) + #print "Would add %s to %s %s" % (self.fmtTableText(height, valuesAreTime[1]), index, keys.index(key)) + if self.showGraph: + xvals = [x+barOffset+barWidth for x in range(0, numCols)] + #print "ax2", xvals, yheights, ybottoms + ax2.bar(xvals, yheights, bottom=ybottoms, width=barWidth, color=color, align='edge', label=key) + else: #Only zero results + pass + ax2.set_xticklabels('' * len(xvalues[1])) + ax2.set_ylabel(ylabel[1]) + ax2.legend(loc=0) + plt.title("%s vs %s" %(ylabel[0],ylabel[1])) + ## try to do some table stuff - colLabels = xbars + colLabels = xvalues[0] rowLabels = keys axis.table(cellText=cellText, cellLoc='center', rowLabels=rowLabels, colLabels=colLabels, loc='bottom') plt.subplots_adjust(left=0.15,bottom=0.08+(0.03*numRows)) Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-11-26 07:51:34 UTC (rev 407) +++ pytrainer/trunk/pytrainer/main.py 2009-11-26 09:48:08 UTC (rev 408) @@ -93,7 +93,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.6.0.9_svn#407" + self.version ="1.6.0.9_svn#408" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? Modified: pytrainer/trunk/pytrainer/weekgraph.py =================================================================== --- pytrainer/trunk/pytrainer/weekgraph.py 2009-11-26 07:51:34 UTC (rev 407) +++ pytrainer/trunk/pytrainer/weekgraph.py 2009-11-26 09:48:08 UTC (rev 408) @@ -29,6 +29,13 @@ def drawgraph(self,values, date_ini, date_end): logging.debug(">>") + yval = [] + xlab = [] + ylab = [] + tit = [] + valsAreTime = [] + + #Reset the comboboxes if nothing selected value_selected = self.combovalue.get_active() if value_selected < 0: self.combovalue.set_active(0) @@ -37,17 +44,36 @@ if value_selected2 < 0: self.combovalue2.set_active(0) value_selected2 = 0 - logging.debug(str(values)) + + #build localised days list + days = self.getDays(date_ini) + ylabel,title = self.get_value_params(value_selected) - #build days list to ensure localised values are used. - #TODO look at using calendar.day_abbr for this - days = [] - for day in range(0, 7): - dateTemp = datetime.datetime.strptime(date_ini, "%Y-%m-%d") - incrementDay = datetime.timedelta(days=day) - dateToUse = dateTemp + incrementDay - days.append( unicode(dateToUse.strftime("%a")) ) + ylab.append(ylabel) + tit.append(title) + + #TODO + yvalues, valuesAreTime = self.get_values(values,value_selected) + yval.append(yvalues) + xlab.append(days) + valsAreTime.append(valuesAreTime) + + #Second combobox used + if value_selected2 > 0: + value_selected2 = value_selected2-1 + ylabel,title = self.get_value_params(value_selected2) + ylab.append(ylabel) + tit.append(title) + yvalues, valuesAreTime = self.get_values(values,value_selected2) + yval.append(yvalues) + xlab.append(days) + valsAreTime.append(valuesAreTime) + #Draw chart + self.drawarea.drawStackedBars(xlab,yval,ylab,tit,valsAreTime) + logging.debug("<<") + + def get_values(self, values, value_selected): valueDict = {} #Stores the totals valueCount = {} #Counts the totals to allow for averaging if needed @@ -78,8 +104,7 @@ else: valuesAreTime=False - self.drawarea.drawStackedBars(days,valueDict,ylabel,title, valuesAreTime) - logging.debug("<<") + return valueDict, valuesAreTime def get_value_params(self,value): if value == 0: @@ -115,5 +140,12 @@ except: return float(0) - - + def getDays(self, date_ini): + #TODO look at using calendar.day_abbr for this + days = [] + for day in range(0, 7): + dateTemp = datetime.datetime.strptime(date_ini, "%Y-%m-%d") + incrementDay = datetime.timedelta(days=day) + dateToUse = dateTemp + incrementDay + days.append( unicode(dateToUse.strftime("%a")) ) + return days This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-11-29 01:30:40
|
Revision: 410 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=410&view=rev Author: jblance Date: 2009-11-29 01:30:31 +0000 (Sun, 29 Nov 2009) Log Message: ----------- Fixes for average heart rate, changes to graph labels and titles Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/pytrainer/gui/drawArea.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/monthgraph.py pytrainer/trunk/pytrainer/weekgraph.py pytrainer/trunk/pytrainer/yeargraph.py Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-11-29 00:19:32 UTC (rev 409) +++ pytrainer/trunk/glade/pytrainer.glade 2009-11-29 01:30:31 UTC (rev 410) @@ -5015,10 +5015,10 @@ <child> <widget class="GtkComboBoxEntry" id="week_combovalue"> <property name="visible">True</property> - <property name="items" translatable="yes">Kilometers + <property name="items" translatable="yes">Distance Time -Beats -Average +Average Heart Rate +Average Speed Calories</property> <property name="add_tearoffs">False</property> <property name="has_frame">True</property> @@ -5061,10 +5061,10 @@ <widget class="GtkComboBoxEntry" id="week_combovalue2"> <property name="visible">True</property> <property name="items" translatable="yes">None -Kilometers +Distance Time -Beats -Average +Average Heart Rate +Average Speed Calories</property> <property name="add_tearoffs">False</property> <property name="has_frame">True</property> @@ -6157,10 +6157,10 @@ <child> <widget class="GtkComboBoxEntry" id="month_combovalue"> <property name="visible">True</property> - <property name="items" translatable="yes">Kilometers + <property name="items" translatable="yes">Distance Time -Beats -Average +Average Heart Rate +Average Speed Calories</property> <property name="add_tearoffs">False</property> <property name="has_frame">True</property> @@ -6203,10 +6203,10 @@ <widget class="GtkComboBoxEntry" id="month_combovalue2"> <property name="visible">True</property> <property name="items" translatable="yes">None -Kilometers +Distance Time -Beats -Average +Average Heart Rate +Average Speed Calories</property> <property name="add_tearoffs">False</property> <property name="has_frame">True</property> @@ -7313,10 +7313,10 @@ <child> <widget class="GtkComboBoxEntry" id="year_combovalue"> <property name="visible">True</property> - <property name="items" translatable="yes">Kilometers + <property name="items" translatable="yes">Distance Time -Beats -Average +Average Heart Rate +Average Speed Calories</property> <property name="add_tearoffs">False</property> <property name="has_frame">True</property> @@ -7359,10 +7359,10 @@ <widget class="GtkComboBoxEntry" id="year_combovalue2"> <property name="visible">True</property> <property name="items" translatable="yes">None -Kilometers +Distance Time -Beats -Average +Average Heart Rate +Average Speed Calories</property> <property name="add_tearoffs">False</property> <property name="has_frame">True</property> Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-29 00:19:32 UTC (rev 409) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-29 01:30:31 UTC (rev 410) @@ -88,7 +88,7 @@ pass axis.grid(True) - axis.set_title("%s" %(ylabel[0])) + axis.set_title("%s" %(title[0])) for tl in axis.get_yticklabels(): tl.set_color('%s' %color[0]) @@ -109,7 +109,7 @@ pass for tl in ax2.get_yticklabels(): tl.set_color('%s' %color[1]) - axis.set_title("%s vs %s" %(ylabel[0],ylabel[1])) + axis.set_title("%s vs %s" %(title[0],title[1])) tickLocations = [x+0.5 for x in xrange(0, numCols)] axis.set_xticks(tickLocations) @@ -150,8 +150,8 @@ def drawStackedBars(self,xvalues,yvalues,ylabel,title, valuesAreTime=False): '''function to draw stacked bars - xvalues needs to be a list of strings, e.g. [0]["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] - yvalues needs to be a dict e.g. [0]{'Kayak': {'Tue': 10.08, 'Fri': 17.579999999999998, 'Thu': 15.66, 'Sat': 30.619999999999997}, {'Run': {'Mon': 9.65, 'Sun': 15.59}} + xvalues needs to be a list of lists of strings, e.g. [0]["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] + yvalues needs to be a list of dicts e.g. [0]{'Kayak': {'Tue': 10.08, 'Fri': 17.579999999999998, 'Thu': 15.66, 'Sat': 30.619999999999997}, {'Run': {'Mon': 9.65, 'Sun': 15.59}} ''' #TODO tidy logging.debug('>>') @@ -242,11 +242,12 @@ #print "ax2", xvals, yheights, ybottoms ax2.bar(xvals, yheights, bottom=ybottoms, width=barWidth, color=color, align='edge', label=key) else: #Only zero results + ax2.bar(xvals, [0]*numCols, bottom=[0]*numCols, width=barWidth, color=color, align='edge', label=key) pass ax2.set_xticklabels('' * len(xvalues[1])) ax2.set_ylabel(ylabel[1]) ax2.legend(loc=0) - plt.title("%s vs %s" %(ylabel[0],ylabel[1])) + plt.title("%s vs %s" %(title[0],title[1])) ## try to do some table stuff colLabels = xvalues[0] Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-11-29 00:19:32 UTC (rev 409) +++ pytrainer/trunk/pytrainer/main.py 2009-11-29 01:30:31 UTC (rev 410) @@ -93,7 +93,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.6.0.9_svn#409" + self.version ="1.6.0.9_svn#410" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? Modified: pytrainer/trunk/pytrainer/monthgraph.py =================================================================== --- pytrainer/trunk/pytrainer/monthgraph.py 2009-11-29 00:19:32 UTC (rev 409) +++ pytrainer/trunk/pytrainer/monthgraph.py 2009-11-29 01:30:31 UTC (rev 410) @@ -60,19 +60,19 @@ yval.append(yvalues) xlab.append(xlabel) ylab.append(ylabel) - tit.append("") + tit.append(title) col.append(color) self.drawarea.stadistics("bars",xval,yval,xlab,ylab,tit,col) def get_value_params(self,value): if value == 0: - return _("day"),_("Kilometers"),_("Daily kilometers"),"y" + return _("day"),_("Distance (km)"),_("Daily Distance"),"y" elif value == 1: - return _("day"),_("Time in Hours"), _("Daily Time"),"b" + return _("day"),_("Time (hours)"), _("Daily Time"),"b" elif value == 2: - return _("day"),_("Beats per Minute"), _("Daily Beats"),"r" + return _("day"),_("Average Heart Rate (bpm)"), _("Daily Average Heart Rate"),"r" elif value == 3: - return _("day"),_("Average (km/h)"), _("Daily Averages"),"g" + return _("day"),_("Average Speed (km/h)"), _("Daily Average Speed"),"g" elif value == 4: return _("day"),_("Calories"), _("Daily Calories"),"b" @@ -103,12 +103,13 @@ year,month,day = date.split("-") #si es una opcion de suma de absolutos / if it is an option of sum of absolute - if ((value_selected == 0) or (value_selected==1) or (value_selected==4)): - list_values[int(day)] += graph_value - #si se trata de calcular medias / if one is to calculate averages: - else: - list_values[int(day)] += graph_value - list_average[int(day)] += 1 + if ((value_selected == 0) or (value_selected==1) or (value_selected==4)): + list_values[int(day)] += graph_value + #si se trata de calcular medias / if one is to calculate averages: + else: + if graph_value is not None and graph_value != 0: + list_values[int(day)] += graph_value + list_average[int(day)] += 1 xunits = [] yunits = [] Modified: pytrainer/trunk/pytrainer/weekgraph.py =================================================================== --- pytrainer/trunk/pytrainer/weekgraph.py 2009-11-29 00:19:32 UTC (rev 409) +++ pytrainer/trunk/pytrainer/weekgraph.py 2009-11-29 01:30:31 UTC (rev 410) @@ -108,15 +108,15 @@ def get_value_params(self,value): if value == 0: - return _("Kilometers"),_("Weekly kilometers") + return _("Distance (km)"),_("Daily Distance") elif value == 1: - return _("Time in Hours"), _("Weekly Time") + return _("Time (hours)"), _("Daily Time") elif value == 2: - return _("Beats per Minute"), _("weekly Beats") + return _("Average Heart Rate (bpm)"), _("Daily Average Heart Rate") elif value == 3: - return _("Average Speed (km/h)"), _("Weekly Speed Averages") + return _("Average Speed (km/h)"), _("Daily Average Speed") elif value == 4: - return _("Calories"), _("Weekly Calories") + return _("Calories"), _("Daily Calories") def getValue(self,record,value_selected): #hacemos una relacion entre el value_selected y los values / we make a relation between value_selected and the values Modified: pytrainer/trunk/pytrainer/yeargraph.py =================================================================== --- pytrainer/trunk/pytrainer/yeargraph.py 2009-11-29 00:19:32 UTC (rev 409) +++ pytrainer/trunk/pytrainer/yeargraph.py 2009-11-29 01:30:31 UTC (rev 410) @@ -61,21 +61,21 @@ yval.append(yvalues) xlab.append(xlabel) ylab.append(ylabel) - tit.append("") + tit.append(title) col.append(color) self.drawarea.stadistics("bars",xval,yval,xlab,ylab,tit,col) def get_value_params(self,value): if value == 0: - return 12,_("month"),_("kilometers"),_("monthly kilometers"),"y" + return 12,_("month"),_("Distance (km)"),_("Monthly Distance"),"y" elif value == 1: - return 12,_("month"),_("time in hours"), _("monthly time"),"b" + return 12,_("month"),_("Time (hours)"), _("Monthly Time"),"b" elif value == 2: - return 12,_("month"),_("beats per minute"), _("monthly beats"),"r" + return 12,_("month"),_("Average Heart Rate (bpm)"), _("Monthly Average Heart Rate"),"r" elif value == 3: - return 12,_("month"),_("average (hm/h)"), _("monthly averages"),"g" + return 12,_("month"),_("Average Speed (km/h)"), _("Monthly Average Speed"),"g" elif value == 4: - return 12,_("month"),_("calories"), _("monthly calories"),"b" + return 12,_("month"),_("Calories"), _("Monthly Calories"),"b" def get_values(self,values,value_selected,monthsnumber): #hacemos una relacion entre el value_selected y los values @@ -87,61 +87,46 @@ 4: 6 #value 4 es calorias(6) } list_values = {} - km_total = {} - tm_total = {} list_average = {} - i = 1 - while i < 13: - list_values[i] = 0 - list_average[i] = 0 + tm_total = {} + for i in range(1,monthsnumber+1): + list_values[i]=0 + list_average[i]=0 tm_total[i] = 0 - i += 1 value_sel = conv[value_selected] - log = [] for value in values: date = value[0] year,month,day = date.split("-") month = int(month) - #si la opcion es tiempo lo pasamos a horas + #si la opcion es tiempo lo pasamos a horas / if the option is time we passed it to hours if (value_sel == 2): graph_value = self.getFloatValue(value[value_sel])/3600 - #Si la opcion es la media tenemos que recalcular km y tiempo total - elif (value_sel == 5): - graph_value = self.getFloatValue(value[1]) else: graph_value = self.getFloatValue(value[value_sel]) - #si es una opcion de suma de absolutos: - if ((value_selected == 0) or (value_selected==1) or (value_selected==4)): + #si es una opcion de suma de absolutos / if it is an option of sum of absolute + if ((value_selected == 0) or (value_selected==1) or (value_selected==4)): list_values[int(month)] += graph_value - - #Si es pa la media de velocidad - elif (value_selected == 3): - list_values[int(month)] += graph_value - tm_total[int(month)] += self.getFloatValue(value[2]) - - #si se trata de calcular medias: + #si se trata de calcular medias / if one is to calculate averages: else: - list_values[int(month)] += graph_value - list_average[int(month)] += 1 - + if graph_value is not None and graph_value != 0: + list_values[int(month)] += graph_value + list_average[int(month)] += 1 + xunits = [] yunits = [] for i in range (0,monthsnumber): xunits.append(unicode(calendar.month_abbr[i+1])) - #xunits.append(i) yunits.append(float(0)) - for i in list_values: - if list_average[i] > 0: - val = list_values[i]/list_average[i] - if tm_total[i] > 0: - val = list_values[i]/(tm_total[i]/3600) + for value in list_values: + if ((value_selected == 0) or (value_selected==1) or (value_selected==4)): + yunits[value-1] = list_values[value] else: - val = list_values[i] - yunits[i-1] = val - return xunits,yunits + if list_average[value]>0: + yunits[value-1] = list_values[value]/list_average[value] + return xunits,yunits def getFloatValue(self, value): try: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-11-29 09:52:51
|
Revision: 411 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=411&view=rev Author: jblance Date: 2009-11-29 09:52:42 +0000 (Sun, 29 Nov 2009) Log Message: ----------- Start of rework for Google Map rendering - experimental so far, test with --gmaps3 at startup Modified Paths: -------------- pytrainer/trunk/pytrainer/extensions/googlemaps.py pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/main.py Added Paths: ----------- pytrainer/trunk/glade/finish.png pytrainer/trunk/glade/start.png Added: pytrainer/trunk/glade/finish.png =================================================================== (Binary files differ) Property changes on: pytrainer/trunk/glade/finish.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: pytrainer/trunk/glade/start.png =================================================================== (Binary files differ) Property changes on: pytrainer/trunk/glade/start.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: pytrainer/trunk/pytrainer/extensions/googlemaps.py =================================================================== --- pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-11-29 01:30:31 UTC (rev 410) +++ pytrainer/trunk/pytrainer/extensions/googlemaps.py 2009-11-29 09:52:42 UTC (rev 411) @@ -27,7 +27,7 @@ from pytrainer.lib.fileUtils import fileUtils class Googlemaps: - def __init__(self, data_path = None, vbox = None, waypoint = None): + def __init__(self, data_path = None, vbox = None, waypoint = None, useGM3 = False): logging.debug(">>") self.data_path = data_path self.conf = checkConf() @@ -35,11 +35,18 @@ self.moz = gtkmozembed.MozEmbed() vbox.pack_start(self.moz, True, True) vbox.show_all() - self.htmlfile = "" + self.htmlfile = "%s/index.html" % (self.conf.getValue("tmpdir")) self.waypoint=waypoint + self.useGM3 = useGM3 logging.debug("<<") def drawMap(self,id_record): + '''Draw google map + create html file using Google API version?? + render using embedded Mozilla + + info at http://www.pygtk.org/pygtkmozembed/class-gtkmozembed.html + ''' logging.debug(">>") code = "googlemapsviewer" extensiondir = self.conf.getValue("extensiondir")+"/"+code @@ -48,30 +55,151 @@ points = [] levels = [] pointlist = [] - htmlfile = self.conf.getValue("tmpdir")+"/index.html" - gpxfile = self.conf.getValue("gpxdir")+"/%s.gpx" %id_record + polyline = [] + + gpxfile = "%s/%s.gpx" % (self.conf.getValue("gpxdir"), id_record) if os.path.isfile(gpxfile): gpx = Gpx(self.data_path,gpxfile) list_values = gpx.getTrackList() - for i in list_values: - pointlist.append((i[4],i[5])) - points,levels = Points.encodePoints(pointlist) - points = points.replace("\\","\\\\") - - 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) + if len(list_values) > 0: + minlat, minlon = float(list_values[0][4]),float(list_values[0][5]) + maxlat=minlat + maxlon=minlon + for i in list_values: + lat, lon = float(i[4]), float(i[5]) + minlat = min(minlat, lat) + maxlat = max(maxlat, lat) + minlon = min(minlon, lon) + maxlon = max(maxlon, lon) + pointlist.append((lat,lon)) + polyline.append("new google.maps.LatLng(%s, %s)" % (lat, lon)) + logging.debug("minlat: %s, maxlat: %s" % (minlat, maxlat)) + logging.debug("minlon: %s, maxlon: %s" % (minlon, maxlon)) + points,levels = Points.encodePoints(pointlist) + points = points.replace("\\","\\\\") + if self.useGM3: + logging.debug("Using Google Maps version 3 API") + startinfo = "Start<br>TODO: Put ??? info here" + finishinfo = "End<br>TODO: Put summary info here?" + self.createHtml_api3(polyline, minlat, minlon, maxlat, maxlon, startinfo, finishinfo) + else: + logging.debug("Using Google Maps version 2 API") + self.createHtml(points,levels,pointlist[0]) + else: + self.createErrorHtml() else: self.createErrorHtml() - self.moz.load_url("file://"+htmlfile) + self.moz.load_url("file://%s" % (self.htmlfile)) logging.debug("<<") + def createHtml_api3(self,polyline, minlat, minlon, maxlat, maxlon, startinfo, finishinfo): + ''' + Generate a Google maps html file using the v3 api + documentation at http://code.google.com/apis/maps/documentation/v3 + ''' + logging.debug(">>") + waypoints = self.waypoint.getAllWaypoints() + #TODO waypoints not supported in this function yet + #TODO sort polyline encoding (not supported in v3?) + #TODO check http://code.google.com/apis/maps/documentation/v3/overlays.html#Polylines for MVArray?? + content = ''' + <html> + <head> + <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> + <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> + <script type="text/javascript"> + function initialize() {\n''' + content += " var startlatlng = %s ;\n" % (polyline[0]) + content += " var centerlatlng = new google.maps.LatLng(%f, %f);\n" % ((minlat+maxlat)/2., (minlon+maxlon)/2.) + content += " var endlatlng = %s;\n" % (polyline[-1]) + content += " var swlatlng = new google.maps.LatLng(%f, %f);\n" % (minlat,minlon) + content += " var nelatlng = new google.maps.LatLng(%f, %f);\n" % (maxlat,maxlon) + content += " var startcontent = \"%s\";\n" % (startinfo) + content += " var finishcontent = \"%s\";\n" % (finishinfo) + content += " var startimageloc = \"%s/glade/start.png\";\n" % (os.path.abspath(self.data_path)) + content += " var finishimageloc = \"%s/glade/finish.png\";\n" % (os.path.abspath(self.data_path)) + content +=''' + var myOptions = { + zoom: 8, + center: centerlatlng, + scaleControl: true, + mapTypeId: google.maps.MapTypeId.ROADMAP + }; + + var startimage = new google.maps.MarkerImage(startimageloc,\n + // This marker is 32 pixels wide by 32 pixels tall. + new google.maps.Size(32, 32), + // The origin for this image is 0,0. + new google.maps.Point(0,0), + // The anchor for this image is the base of the flagpole + new google.maps.Point(16, 32));\n\n + var finishimage = new google.maps.MarkerImage(finishimageloc,\n + // This marker is 32 pixels wide by 32 pixels tall. + new google.maps.Size(32, 32), + // The origin for this image is 0,0. + new google.maps.Point(0,0), + // The anchor for this image is the base of the flagpole + new google.maps.Point(16, 32));\n + + var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); + var startmarker = new google.maps.Marker({ + position: startlatlng, + map: map, + icon: startimage, + title:"Start"}); + + var finishmarker = new google.maps.Marker({ + position: endlatlng, + icon: finishimage, + map: map, + title:"End"}); \n + + //Add an infowindows + var startinfo = new google.maps.InfoWindow({ + content: startcontent + }); + + var finishinfo = new google.maps.InfoWindow({ + content: finishcontent + }); + + google.maps.event.addListener(startmarker, 'click', function() { + startinfo.open(map,startmarker); + }); + + google.maps.event.addListener(finishmarker, 'click', function() { + finishinfo.open(map,finishmarker); + }); + + var boundsBox = new google.maps.LatLngBounds(swlatlng, nelatlng );\n + map.fitBounds(boundsBox);\n + var polylineCoordinates = [\n''' + for point in polyline: + content += " %s,\n" % (point) + content += ''' ];\n + // Add a polyline.\n + var polyline = new google.maps.Polyline({\n + path: polylineCoordinates,\n + strokeColor: \"#3333cc\",\n + strokeOpacity: 0.6,\n + strokeWeight: 5,\n + });\n + polyline.setMap(map);\n + } + + </script> + </head> + <body onload="initialize()"> + <div id="map_canvas" style="width:100%; height:100%"></div> + </body> + </html>''' + file = fileUtils(self.htmlfile,content) + file.run() + 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" 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" @@ -164,24 +292,20 @@ content += " <div id=\"map\" style=\"width: 520px; height: 480px\"></div>\n" content += " </body>\n" content += "</html>\n" - filename = tmpdir+"/index.html" - file = fileUtils(filename,content) + file = fileUtils(self.htmlfile,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" - content += """ <head>\n + content = '''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> +<head> <body> No Gpx Data </body> </html> - """ - tmpdir = self.conf.getValue("tmpdir") - filename = tmpdir+"/index.html" - file = fileUtils(filename,content) + ''' + file = fileUtils(self.htmlfile,content) file.run() logging.debug("<<") Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-29 01:30:31 UTC (rev 410) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-11-29 09:52:42 UTC (rev 411) @@ -120,8 +120,8 @@ self.drawareamonth = MonthGraph(self.month_vbox, self.window1, self.month_combovalue,self.month_combovalue2) self.drawareayear = YearGraph(self.year_vbox, self.window1, self.year_combovalue,self.year_combovalue2) - def createMap(self,Googlemaps,waypoint): - self.googlemaps = Googlemaps(self.data_path, self.map_vbox,waypoint) + def createMap(self,Googlemaps,waypoint, useGM3): + self.googlemaps = Googlemaps(self.data_path, self.map_vbox,waypoint, useGM3) def updateSportList(self,listSport): logging.debug(">>") @@ -835,10 +835,11 @@ if self.block: self.block = False else: - #self.notebook.set_current_page(1) - #self.selected_view="day" self.parent.refreshListRecords() self.parent.refreshGraphView(self.selected_view) + if self.selected_view == "record": + self.recordview.set_current_page(0) + self.parent.refreshRecordGraphView("info") def on_calendar_changemonth(self,widget): logging.debug("--") Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-11-29 01:30:31 UTC (rev 410) +++ pytrainer/trunk/pytrainer/main.py 2009-11-29 09:52:42 UTC (rev 411) @@ -59,6 +59,9 @@ from lib.system import checkConf from lib.heartrate import * + +##TODO The below should all be able to be in the __init__ section, i.e. does not need to be global + # ERROR is the default log level PATH = os.environ['HOME']+"/.pytrainer" if not os.path.exists(PATH): @@ -71,16 +74,18 @@ For more help on valid options try: %prog -h """ parser = OptionParser(usage=usage) -parser.set_defaults(log_level=logging.ERROR, validate=False) +parser.set_defaults(log_level=logging.ERROR, validate=False, gm3=False) parser.add_option("-d", "--debug", action="store_const", const=logging.DEBUG, dest="log_level", help="enable logging at debug level") parser.add_option("-i", "--info", action="store_const", const=logging.INFO, dest="log_level", help="enable logging at info level") parser.add_option("-w", "--warn", action="store_const", const=logging.WARNING, dest="log_level", help="enable logging at warning level") parser.add_option("--valid", action="store_true", dest="validate", help="enable validation of files imported by plugins (details at info or debug logging level) - note plugin must support validation") parser.add_option("--check", action="store_true", dest="check", help="triggers database (only sqlite based) and configuration file sanity checks, adding fields if necessary. Backup of database is done before any change. Details at info or debug logging level") +parser.add_option("--gmaps3", action="store_true", dest="gm3", help="EXPERIMENTAL: use Google Maps API version3 (currently slower than version 2, but includes some new functionality)") (options, args) = parser.parse_args() log_level = options.log_level validate = options.validate check = options.check +gm3 = options.gm3 # Adding rotating support to default logger with customized format rotHandler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=100000, backupCount=5) @@ -93,7 +98,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.6.0.9_svn#410" + self.version ="1.6.0.9_svn#411" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? @@ -104,6 +109,7 @@ self.log_level = log_level self.validate = validate self.check = check + self.gm3 = gm3 self.windowmain = None logging.debug('checking configuration...') @@ -140,7 +146,7 @@ self.loadPlugins() self.loadExtensions() self.windowmain.createGraphs(RecordGraph,DayGraph,WeekGraph, MonthGraph,YearGraph,HeartRateGraph) - self.windowmain.createMap(Googlemaps,self.waypoint) + self.windowmain.createMap(Googlemaps,self.waypoint, self.gm3) self.windowmain.createWaypointEditor(WaypointEditor,self.waypoint) self.windowmain.on_calendar_selected(None) self.refreshMainSportList() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-12-04 19:38:09
|
Revision: 420 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=420&view=rev Author: dgranda Date: 2009-12-04 19:38:00 +0000 (Fri, 04 Dec 2009) Log Message: ----------- Updated spanish translation Modified Paths: -------------- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer.mo pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot pytrainer/trunk/messages.pot Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer.mo =================================================================== (Binary files differ) Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po =================================================================== --- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2009-12-04 19:37:15 UTC (rev 419) +++ pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2009-12-04 19:38:00 UTC (rev 420) @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: vud 1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-04-16 22:27+0200\n" -"PO-Revision-Date: 2009-04-16 22:34+0200\n" -"Last-Translator: Fiz Vazquez <vu...@si...>\n" +"POT-Creation-Date: 2009-12-04 20:21+0100\n" +"PO-Revision-Date: 2009-12-04 20:32+0100\n" +"Last-Translator: David García Granda <dg...@gm...>\n" "Language-Team: Spanish <es...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: glade/pytrainer.glade:8 msgid "window1" @@ -39,7 +39,7 @@ #: glade/pytrainer.glade:143 msgid " _Classic View" -msgstr "Vista Clasica" +msgstr "Vista clásica" #: glade/pytrainer.glade:154 msgid " _List View" @@ -54,7 +54,8 @@ msgid "Tools" msgstr "Herramientas" -#: glade/pytrainer.glade:192 glade/pytrainer.glade:12254 +#: glade/pytrainer.glade:192 +#: glade/pytrainer.glade:13379 msgid "Extensions" msgstr "Extensiones" @@ -68,6 +69,10 @@ msgstr "Ayuda" #: glade/pytrainer.glade:336 +#: pytrainer/gui/windowprofile.py:69 +#: pytrainer/gui/windowmain.py:57 +#: pytrainer/gui/windowmain.py:60 +#: pytrainer/gui/windowmain.py:677 msgid "Sport" msgstr "Deporte" @@ -75,12 +80,14 @@ msgid "All Sports" msgstr "Todos los deportes" -#: glade/pytrainer.glade:471 glade/pytrainer.glade:836 +#: glade/pytrainer.glade:471 +#: glade/pytrainer.glade:836 #: glade/pytrainer.glade:864 msgid " " msgstr "" -#: glade/pytrainer.glade:499 glade/pytrainer.glade:892 +#: glade/pytrainer.glade:499 +#: glade/pytrainer.glade:892 msgid " " msgstr "" @@ -89,19 +96,28 @@ msgid "<b>Sport:</b>" msgstr "<b>Lista de deportes:</b>" -#: glade/pytrainer.glade:555 glade/pytrainer.glade:2994 -#: glade/pytrainer.glade:4122 glade/pytrainer.glade:5417 +#: glade/pytrainer.glade:555 +#: glade/pytrainer.glade:2994 +#: glade/pytrainer.glade:4122 +#: glade/pytrainer.glade:5264 +#: glade/pytrainer.glade:6559 msgid "<b>Time:</b>" msgstr "<b>Tiempo:</b>" -#: glade/pytrainer.glade:584 glade/pytrainer.glade:3191 -#: glade/pytrainer.glade:4292 glade/pytrainer.glade:5641 +#: glade/pytrainer.glade:584 +#: glade/pytrainer.glade:3191 +#: glade/pytrainer.glade:4292 +#: glade/pytrainer.glade:5434 +#: glade/pytrainer.glade:6783 #, fuzzy msgid "<b>Speed:</b>" msgstr "<b>Titulo:</b>" -#: glade/pytrainer.glade:612 glade/pytrainer.glade:3500 -#: glade/pytrainer.glade:4656 glade/pytrainer.glade:5811 +#: glade/pytrainer.glade:612 +#: glade/pytrainer.glade:3500 +#: glade/pytrainer.glade:4656 +#: glade/pytrainer.glade:5798 +#: glade/pytrainer.glade:6953 #, fuzzy msgid "<b>Pace:</b>" msgstr "<b>Nombre:</b>" @@ -115,21 +131,52 @@ msgid "<b>Comments:</b>" msgstr "<b>Comentarios:</b>" -#: glade/pytrainer.glade:696 glade/pytrainer.glade:1379 -#: glade/pytrainer.glade:3247 glade/pytrainer.glade:3304 -#: glade/pytrainer.glade:4348 glade/pytrainer.glade:4517 -#: glade/pytrainer.glade:5697 glade/pytrainer.glade:5725 +#: glade/pytrainer.glade:696 +#: glade/pytrainer.glade:1379 +#: glade/pytrainer.glade:3247 +#: glade/pytrainer.glade:3304 +#: glade/pytrainer.glade:4348 +#: glade/pytrainer.glade:4517 +#: glade/pytrainer.glade:5490 +#: glade/pytrainer.glade:5659 +#: glade/pytrainer.glade:6839 +#: glade/pytrainer.glade:6867 +#: pytrainer/gui/windowmain.py:167 +#: pytrainer/gui/windowmain.py:168 +#: pytrainer/gui/windowmain.py:274 +#: pytrainer/gui/windowmain.py:275 +#: pytrainer/gui/windowmain.py:373 +#: pytrainer/gui/windowmain.py:374 +#: pytrainer/gui/windowmain.py:451 +#: pytrainer/gui/windowmain.py:452 msgid "km/h" msgstr "Km/h" -#: glade/pytrainer.glade:724 glade/pytrainer.glade:1089 -#: glade/pytrainer.glade:3528 glade/pytrainer.glade:3584 -#: glade/pytrainer.glade:4712 glade/pytrainer.glade:4740 -#: glade/pytrainer.glade:5868 glade/pytrainer.glade:5896 +#: glade/pytrainer.glade:724 +#: glade/pytrainer.glade:1089 +#: glade/pytrainer.glade:3528 +#: glade/pytrainer.glade:3584 +#: glade/pytrainer.glade:4712 +#: glade/pytrainer.glade:4740 +#: glade/pytrainer.glade:5854 +#: glade/pytrainer.glade:5882 +#: glade/pytrainer.glade:7010 +#: glade/pytrainer.glade:7038 +#: pytrainer/gui/windowmain.py:169 +#: pytrainer/gui/windowmain.py:170 +#: pytrainer/gui/windowmain.py:276 +#: pytrainer/gui/windowmain.py:277 +#: pytrainer/gui/windowmain.py:375 +#: pytrainer/gui/windowmain.py:376 +#: pytrainer/gui/windowmain.py:453 +#: pytrainer/gui/windowmain.py:454 msgid "min/km" msgstr "min/km" -#: glade/pytrainer.glade:752 glade/pytrainer.glade:1145 +#: glade/pytrainer.glade:752 +#: glade/pytrainer.glade:1145 +#: pytrainer/gui/windowmain.py:171 +#: pytrainer/gui/windowmain.py:172 #, fuzzy msgid "m" msgstr "km" @@ -138,10 +185,15 @@ msgid " " msgstr "" -#: glade/pytrainer.glade:808 glade/pytrainer.glade:1117 -#: glade/pytrainer.glade:2040 glade/pytrainer.glade:2068 -#: glade/pytrainer.glade:2096 glade/pytrainer.glade:2264 -#: glade/pytrainer.glade:3696 glade/pytrainer.glade:4852 +#: glade/pytrainer.glade:808 +#: glade/pytrainer.glade:1117 +#: glade/pytrainer.glade:2040 +#: glade/pytrainer.glade:2068 +#: glade/pytrainer.glade:2096 +#: glade/pytrainer.glade:2264 +#: glade/pytrainer.glade:3696 +#: glade/pytrainer.glade:4852 +#: glade/pytrainer.glade:5994 msgid " " msgstr " " @@ -150,8 +202,11 @@ msgid "<b>Date:</b>" msgstr "<b>Fecha:</b>" -#: glade/pytrainer.glade:948 glade/pytrainer.glade:2966 -#: glade/pytrainer.glade:4094 glade/pytrainer.glade:5389 +#: glade/pytrainer.glade:948 +#: glade/pytrainer.glade:2966 +#: glade/pytrainer.glade:4094 +#: glade/pytrainer.glade:5236 +#: glade/pytrainer.glade:6531 msgid "<b>Distance:</b>" msgstr "<b>Distancia:</b>" @@ -160,8 +215,11 @@ msgid "<b>Max Speed</b>" msgstr "<b>Nombre:</b>" -#: glade/pytrainer.glade:1005 glade/pytrainer.glade:3556 -#: glade/pytrainer.glade:4684 glade/pytrainer.glade:5840 +#: glade/pytrainer.glade:1005 +#: glade/pytrainer.glade:3556 +#: glade/pytrainer.glade:4684 +#: glade/pytrainer.glade:5826 +#: glade/pytrainer.glade:6982 #, fuzzy msgid "<b>Max Pace:</b>" msgstr "<b>Nombre:</b>" @@ -175,38 +233,70 @@ msgid " " msgstr "" -#: glade/pytrainer.glade:1211 glade/pytrainer.glade:2910 -#: glade/pytrainer.glade:4038 glade/pytrainer.glade:5613 +#: glade/pytrainer.glade:1211 +#: glade/pytrainer.glade:2910 +#: glade/pytrainer.glade:4038 +#: glade/pytrainer.glade:5180 +#: glade/pytrainer.glade:6755 msgid "Km" msgstr "km" -#: glade/pytrainer.glade:1244 glade/pytrainer.glade:1294 -#: glade/pytrainer.glade:1344 glade/pytrainer.glade:3028 -#: glade/pytrainer.glade:3078 glade/pytrainer.glade:3128 -#: glade/pytrainer.glade:4206 glade/pytrainer.glade:4256 -#: glade/pytrainer.glade:5501 glade/pytrainer.glade:5551 +#: glade/pytrainer.glade:1244 +#: glade/pytrainer.glade:1294 +#: glade/pytrainer.glade:1344 +#: glade/pytrainer.glade:3028 +#: glade/pytrainer.glade:3078 +#: glade/pytrainer.glade:3128 +#: glade/pytrainer.glade:4206 +#: glade/pytrainer.glade:4256 +#: glade/pytrainer.glade:5348 +#: glade/pytrainer.glade:5398 +#: glade/pytrainer.glade:6643 +#: glade/pytrainer.glade:6693 msgid "00" msgstr "00" -#: glade/pytrainer.glade:1269 glade/pytrainer.glade:1319 -#: glade/pytrainer.glade:3053 glade/pytrainer.glade:3103 -#: glade/pytrainer.glade:4181 glade/pytrainer.glade:4231 -#: glade/pytrainer.glade:5476 glade/pytrainer.glade:5526 -#: glade/pytrainer.glade:7646 glade/pytrainer.glade:7691 +#: glade/pytrainer.glade:1269 +#: glade/pytrainer.glade:1319 +#: glade/pytrainer.glade:3053 +#: glade/pytrainer.glade:3103 +#: glade/pytrainer.glade:4181 +#: glade/pytrainer.glade:4231 +#: glade/pytrainer.glade:5323 +#: glade/pytrainer.glade:5373 +#: glade/pytrainer.glade:6618 +#: glade/pytrainer.glade:6668 +#: glade/pytrainer.glade:8788 +#: glade/pytrainer.glade:8833 msgid ":" msgstr ":" -#: glade/pytrainer.glade:1413 glade/pytrainer.glade:2375 -#: glade/pytrainer.glade:2937 glade/pytrainer.glade:3219 -#: glade/pytrainer.glade:3360 glade/pytrainer.glade:3444 -#: glade/pytrainer.glade:3724 glade/pytrainer.glade:3752 -#: glade/pytrainer.glade:4065 glade/pytrainer.glade:4320 -#: glade/pytrainer.glade:4404 glade/pytrainer.glade:4600 -#: glade/pytrainer.glade:4880 glade/pytrainer.glade:5220 -#: glade/pytrainer.glade:5304 glade/pytrainer.glade:5360 -#: glade/pytrainer.glade:5669 glade/pytrainer.glade:5952 -#: glade/pytrainer.glade:5980 glade/pytrainer.glade:6008 -#: glade/pytrainer.glade:6036 +#: glade/pytrainer.glade:1413 +#: glade/pytrainer.glade:2375 +#: glade/pytrainer.glade:2937 +#: glade/pytrainer.glade:3219 +#: glade/pytrainer.glade:3360 +#: glade/pytrainer.glade:3444 +#: glade/pytrainer.glade:3724 +#: glade/pytrainer.glade:3752 +#: glade/pytrainer.glade:4065 +#: glade/pytrainer.glade:4320 +#: glade/pytrainer.glade:4404 +#: glade/pytrainer.glade:4600 +#: glade/pytrainer.glade:4880 +#: glade/pytrainer.glade:5207 +#: glade/pytrainer.glade:5462 +#: glade/pytrainer.glade:5546 +#: glade/pytrainer.glade:5742 +#: glade/pytrainer.glade:6022 +#: glade/pytrainer.glade:6362 +#: glade/pytrainer.glade:6446 +#: glade/pytrainer.glade:6502 +#: glade/pytrainer.glade:6811 +#: glade/pytrainer.glade:7094 +#: glade/pytrainer.glade:7122 +#: glade/pytrainer.glade:7150 +#: glade/pytrainer.glade:7178 msgid " " msgstr "" @@ -226,8 +316,10 @@ "Ritmo\n" "Pulsaciones" -#: glade/pytrainer.glade:1653 glade/pytrainer.glade:5038 -#: glade/pytrainer.glade:6194 +#: glade/pytrainer.glade:1653 +#: glade/pytrainer.glade:5038 +#: glade/pytrainer.glade:6180 +#: glade/pytrainer.glade:7336 msgid "Versus" msgstr "Contra" @@ -239,18 +331,29 @@ "Pace\n" "Heart Rate\n" msgstr "" +"Nada\n" +"Perfil\n" +"Velocidad\n" +"Ritmo\n" +"Pulsaciones\n" #: glade/pytrainer.glade:1843 msgid "<b>Beats:</b>" msgstr "<b>Pulsaciones:</b>" -#: glade/pytrainer.glade:1871 glade/pytrainer.glade:3332 -#: glade/pytrainer.glade:4376 glade/pytrainer.glade:5192 +#: glade/pytrainer.glade:1871 +#: glade/pytrainer.glade:3332 +#: glade/pytrainer.glade:4376 +#: glade/pytrainer.glade:5518 +#: glade/pytrainer.glade:6334 msgid "<b>Calories: </b>" -msgstr "<b>Calorias:</b>" +msgstr "<b>Calorías:</b>" -#: glade/pytrainer.glade:1899 glade/pytrainer.glade:3612 -#: glade/pytrainer.glade:4796 glade/pytrainer.glade:5924 +#: glade/pytrainer.glade:1899 +#: glade/pytrainer.glade:3612 +#: glade/pytrainer.glade:4796 +#: glade/pytrainer.glade:5938 +#: glade/pytrainer.glade:7066 #, fuzzy msgid "<b>Max Beats:</b>" msgstr "<b>Pulsaciones:</b>" @@ -265,7 +368,8 @@ msgid "<b>HR Zone5:</b>" msgstr "<b>Mes:</b>" -#: glade/pytrainer.glade:1984 glade/pytrainer.glade:2348 +#: glade/pytrainer.glade:1984 +#: glade/pytrainer.glade:2348 msgid " bpm" msgstr "ppm" @@ -293,18 +397,30 @@ msgid "<b>HR Zone1:</b>" msgstr "<b>Mes:</b>" -#: glade/pytrainer.glade:2236 glade/pytrainer.glade:2292 -#: glade/pytrainer.glade:2320 glade/pytrainer.glade:3668 -#: glade/pytrainer.glade:4489 glade/pytrainer.glade:4824 +#: glade/pytrainer.glade:2236 +#: glade/pytrainer.glade:2292 +#: glade/pytrainer.glade:2320 +#: glade/pytrainer.glade:3668 +#: glade/pytrainer.glade:4489 +#: glade/pytrainer.glade:4824 +#: glade/pytrainer.glade:5631 +#: glade/pytrainer.glade:5966 msgid " " msgstr "" -#: glade/pytrainer.glade:2403 glade/pytrainer.glade:2430 -#: glade/pytrainer.glade:2458 glade/pytrainer.glade:2486 -#: glade/pytrainer.glade:2514 glade/pytrainer.glade:3472 -#: glade/pytrainer.glade:3640 glade/pytrainer.glade:4628 -#: glade/pytrainer.glade:4768 glade/pytrainer.glade:5332 -#: glade/pytrainer.glade:5753 +#: glade/pytrainer.glade:2403 +#: glade/pytrainer.glade:2430 +#: glade/pytrainer.glade:2458 +#: glade/pytrainer.glade:2486 +#: glade/pytrainer.glade:2514 +#: glade/pytrainer.glade:3472 +#: glade/pytrainer.glade:3640 +#: glade/pytrainer.glade:4628 +#: glade/pytrainer.glade:4768 +#: glade/pytrainer.glade:5770 +#: glade/pytrainer.glade:5910 +#: glade/pytrainer.glade:6474 +#: glade/pytrainer.glade:6895 msgid "bpm" msgstr "ppm" @@ -318,8 +434,9 @@ msgid " <b>Heart Rate:</b>" msgstr "<b>Fecha:</b>" -#: glade/pytrainer.glade:2757 glade/pytrainer.glade:7008 -#: glade/pytrainer.glade:10875 +#: glade/pytrainer.glade:2757 +#: glade/pytrainer.glade:8150 +#: glade/pytrainer.glade:12008 msgid "label-2147483648" msgstr " " @@ -332,19 +449,25 @@ msgid "Record" msgstr "Registro" -#: glade/pytrainer.glade:3276 glade/pytrainer.glade:4461 -#: glade/pytrainer.glade:5782 +#: glade/pytrainer.glade:3276 +#: glade/pytrainer.glade:4461 +#: glade/pytrainer.glade:5603 +#: glade/pytrainer.glade:6924 #, fuzzy msgid "<b>Max Speed:</b>" msgstr "<b>Nombre:</b>" -#: glade/pytrainer.glade:3388 glade/pytrainer.glade:4432 -#: glade/pytrainer.glade:5248 +#: glade/pytrainer.glade:3388 +#: glade/pytrainer.glade:4432 +#: glade/pytrainer.glade:5574 +#: glade/pytrainer.glade:6390 msgid "Cal" msgstr "Cal" -#: glade/pytrainer.glade:3416 glade/pytrainer.glade:4572 -#: glade/pytrainer.glade:5276 +#: glade/pytrainer.glade:3416 +#: glade/pytrainer.glade:4572 +#: glade/pytrainer.glade:5714 +#: glade/pytrainer.glade:6418 msgid "<b>Beats avg:</b>" msgstr "<b>Media pulsaciones:</b>" @@ -368,87 +491,104 @@ #: glade/pytrainer.glade:3979 msgid "Day" -msgstr "Dia" +msgstr "Día" -#: glade/pytrainer.glade:4156 glade/pytrainer.glade:5451 +#: glade/pytrainer.glade:4156 +#: glade/pytrainer.glade:5298 +#: glade/pytrainer.glade:6593 msgid "000" msgstr "000" -#: glade/pytrainer.glade:4545 glade/pytrainer.glade:7844 +#: glade/pytrainer.glade:4545 +#: glade/pytrainer.glade:5687 +#: glade/pytrainer.glade:8986 msgid " " msgstr " " #: glade/pytrainer.glade:4918 -msgid " <b>Month:</b>" -msgstr "<b>Mes:</b>" +#, fuzzy +msgid " <b>Week:</b>" +msgstr "<b>Semana:</b>" -#: glade/pytrainer.glade:5018 glade/pytrainer.glade:6174 +#: glade/pytrainer.glade:5018 +#: glade/pytrainer.glade:6160 +#: glade/pytrainer.glade:7316 msgid "" -"Kilometers\n" +"Distance\n" "Time\n" -"Beats\n" -"Average\n" +"Average Heart Rate\n" +"Average Speed\n" "Calories" msgstr "" -"Kilometros\n" +"Distancia\n" "Tiempo\n" "Pulsaciones\n" -"Media\n" -"Calorias" +"Velocidad media\n" +"Calorías" -#: glade/pytrainer.glade:5063 glade/pytrainer.glade:6219 -#, fuzzy +#: glade/pytrainer.glade:5063 +#: glade/pytrainer.glade:6205 +#: glade/pytrainer.glade:7361 msgid "" "None\n" -"Kilometers\n" +"Distance\n" "Time\n" -"Beats\n" -"Average\n" +"Average Heart Rate\n" +"Average Speed\n" "Calories" msgstr "" -"Kilometros\n" +"Nada\n" +"Distancia\n" "Tiempo\n" "Pulsaciones\n" -"Media\n" -"Calorias" +"Velocidad media\n" +"Calorías" -#: glade/pytrainer.glade:5133 +#: glade/pytrainer.glade:5132 +msgid "Week" +msgstr "Semana" + +#: glade/pytrainer.glade:6060 +msgid " <b>Month:</b>" +msgstr "<b>Mes:</b>" + +#: glade/pytrainer.glade:6275 msgid "Month" msgstr "Mes" -#: glade/pytrainer.glade:6074 +#: glade/pytrainer.glade:7216 msgid " <b>Year:</b>" msgstr "<b>Año:</b>" -#: glade/pytrainer.glade:6289 +#: glade/pytrainer.glade:7431 msgid "Year" msgstr "Año" -#: glade/pytrainer.glade:6332 +#: glade/pytrainer.glade:7474 msgid "label154" msgstr " " -#: glade/pytrainer.glade:6369 +#: glade/pytrainer.glade:7511 msgid "<b>Title:</b>" -msgstr "<b>Titulo:</b>" +msgstr "<b>Título:</b>" -#: glade/pytrainer.glade:6414 +#: glade/pytrainer.glade:7556 msgid "Search" msgstr "Buscar" -#: glade/pytrainer.glade:6461 +#: glade/pytrainer.glade:7603 msgid "Columns" msgstr "Columnas" -#: glade/pytrainer.glade:6536 +#: glade/pytrainer.glade:7678 msgid "label155" msgstr " " -#: glade/pytrainer.glade:6670 +#: glade/pytrainer.glade:7812 msgid "Type:" msgstr "Tipo:" -#: glade/pytrainer.glade:6698 +#: glade/pytrainer.glade:7840 msgid "" "Font\n" "Restaurant\n" @@ -456,496 +596,902 @@ "Summit" msgstr "" -#: glade/pytrainer.glade:6719 +#: glade/pytrainer.glade:7861 #, fuzzy msgid "Latitude: " msgstr "<b>Latitud:</b>" -#: glade/pytrainer.glade:6747 +#: glade/pytrainer.glade:7889 #, fuzzy msgid " Name:" -msgstr "Nombre" +msgstr "Nombre:" -#: glade/pytrainer.glade:6775 +#: glade/pytrainer.glade:7917 #, fuzzy msgid "Longitude:" msgstr "<b>Longitud:</b>" -#: glade/pytrainer.glade:6803 glade/pytrainer.glade:12442 -#: glade/pytrainer.glade:12765 +#: glade/pytrainer.glade:7945 +#: glade/pytrainer.glade:13567 +#: glade/pytrainer.glade:13890 #, fuzzy msgid "Description:" msgstr "<b>Descripcion:</b>" -#: glade/pytrainer.glade:6923 +#: glade/pytrainer.glade:8065 msgid "<b> Waypoint: </b>" -msgstr "<b>Waypoint:</b>" +msgstr "<b> Waypoint: </b>" -#: glade/pytrainer.glade:7056 +#: glade/pytrainer.glade:8198 msgid "label162" msgstr " " -#: glade/pytrainer.glade:7196 +#: glade/pytrainer.glade:8338 msgid "label163" msgstr " " -#: glade/pytrainer.glade:7221 +#: glade/pytrainer.glade:8363 msgid "New Entry" msgstr "Nueva Entrada" -#: glade/pytrainer.glade:7294 +#: glade/pytrainer.glade:8436 #, fuzzy msgid "Title:" -msgstr "Titulo" +msgstr "Título:" -#: glade/pytrainer.glade:7343 +#: glade/pytrainer.glade:8485 #, fuzzy msgid "GPX File:" msgstr "Archivo Gpxl" -#: glade/pytrainer.glade:7413 +#: glade/pytrainer.glade:8555 msgid "Calculate Values" -msgstr "Calcular Valores" +msgstr "Calcular valores" -#: glade/pytrainer.glade:7432 +#: glade/pytrainer.glade:8574 #, fuzzy msgid "Sport:" -msgstr "Deporte" +msgstr "Deporte:" -#: glade/pytrainer.glade:7483 +#: glade/pytrainer.glade:8625 #, fuzzy msgid "<b>Main</b>" msgstr "<b>Mes:</b>" -#: glade/pytrainer.glade:7544 +#: glade/pytrainer.glade:8686 #, fuzzy msgid "Distance (Km):" msgstr "Distancia (Km)" -#: glade/pytrainer.glade:7573 glade/pytrainer.glade:7770 -#: glade/pytrainer.glade:8051 glade/pytrainer.glade:8297 -#: glade/pytrainer.glade:8765 glade/pytrainer.glade:11513 +#: glade/pytrainer.glade:8715 +#: glade/pytrainer.glade:8912 +#: glade/pytrainer.glade:9193 +#: glade/pytrainer.glade:9439 +#: glade/pytrainer.glade:9907 +#: glade/pytrainer.glade:12638 #, fuzzy msgid "Calculate" msgstr "Calcular Tiempo" -#: glade/pytrainer.glade:7592 +#: glade/pytrainer.glade:8734 #, fuzzy msgid "Time:" msgstr "Tiempo" -#: glade/pytrainer.glade:7790 +#: glade/pytrainer.glade:8932 #, fuzzy msgid "Date:" msgstr "Fecha" -#: glade/pytrainer.glade:7910 glade/pytrainer.glade:11563 +#: glade/pytrainer.glade:9052 +#: glade/pytrainer.glade:12688 #, fuzzy msgid "<b>General</b>" msgstr "<b>Media:</b>" -#: glade/pytrainer.glade:7971 +#: glade/pytrainer.glade:9113 #, fuzzy msgid "Max (km/h):" msgstr "Media (Km/h)" -#: glade/pytrainer.glade:8022 +#: glade/pytrainer.glade:9164 #, fuzzy msgid "Velocity (km/h)" msgstr "Velocidad (km/h)" -#: glade/pytrainer.glade:8097 +#: glade/pytrainer.glade:9239 #, fuzzy msgid "<b>Velocity</b>" msgstr "<b>Borrar deporte</b>" -#: glade/pytrainer.glade:8133 +#: glade/pytrainer.glade:9275 #, fuzzy msgid "Quick Entry" msgstr "Nueva Entrada" -#: glade/pytrainer.glade:8193 +#: glade/pytrainer.glade:9335 msgid "Max (min/km):" -msgstr "Max·(min/km)" +msgstr "Max (min/km)" -#: glade/pytrainer.glade:8245 +#: glade/pytrainer.glade:9387 msgid "Pace (min/km):" -msgstr "" +msgstr "Ritmo (min/km)" -#: glade/pytrainer.glade:8320 +#: glade/pytrainer.glade:9462 #, fuzzy msgid "<b>Pace</b>" msgstr "<b>Nombre:</b>" -#: glade/pytrainer.glade:8381 +#: glade/pytrainer.glade:9523 msgid "Ascent:" -msgstr "" +msgstr "Ascenso:" -#: glade/pytrainer.glade:8433 +#: glade/pytrainer.glade:9575 msgid "Descent:" -msgstr "" +msgstr "Descenso:" -#: glade/pytrainer.glade:8488 +#: glade/pytrainer.glade:9630 #, fuzzy msgid "<b>Accumulated Altitude Change</b>" -msgstr "<b>Desnivel Acumulado:</b>" +msgstr "<b>Desnivel acumulado:</b>" -#: glade/pytrainer.glade:8549 +#: glade/pytrainer.glade:9691 msgid "Max (bpm):" -msgstr "" +msgstr "Pulsaciones máximas" -#: glade/pytrainer.glade:8578 +#: glade/pytrainer.glade:9720 msgid "Heart rate:" -msgstr "" +msgstr "Pulsaciones" -#: glade/pytrainer.glade:8652 +#: glade/pytrainer.glade:9794 +#: pytrainer/gui/windowmain.py:681 +#: pytrainer/monthgraph.py:77 +#: pytrainer/yeargraph.py:78 +#: pytrainer/weekgraph.py:119 msgid "Calories" -msgstr "Calorias" +msgstr "Calorías" -#: glade/pytrainer.glade:8703 -msgid "" -"<small><b>Note:</b> In order to calculate the calories you must set the " -"sport MET (in Preferences->Sport) </small>" -msgstr "" +#: glade/pytrainer.glade:9845 +msgid "<small><b>Note:</b> In order to calculate the calories you must set the sport MET (in Preferences->Sport) </small>" +msgstr "<small><b>Nota:</a> Para el cálculo de calorías es necesario introducir el valor de MET del deporte (en Preferencias -> Deporte)</small>" -#: glade/pytrainer.glade:8820 +#: glade/pytrainer.glade:9962 #, fuzzy msgid "<b>Heart Rate</b>" msgstr "<b>Media pulsaciones:</b>" -#: glade/pytrainer.glade:8856 +#: glade/pytrainer.glade:9998 msgid "Advanced" -msgstr "" +msgstr "Avanzado" -#: glade/pytrainer.glade:8953 +#: glade/pytrainer.glade:10095 msgid "<b>Comments</b>" msgstr "<b>Comentarios</b>" -#: glade/pytrainer.glade:8982 +#: glade/pytrainer.glade:10124 #, fuzzy msgid "Comments" msgstr "<b>Comentarios</b>" -#: glade/pytrainer.glade:9087 +#: glade/pytrainer.glade:10229 msgid "Preferences" -msgstr "" +msgstr "Preferencias" -#: glade/pytrainer.glade:9161 +#: glade/pytrainer.glade:10303 msgid "Metric system" -msgstr "" +msgstr "Sistema métrico" -#: glade/pytrainer.glade:9183 +#: glade/pytrainer.glade:10325 msgid "U.S. customary units" -msgstr "" +msgstr "Sistema americano" -#: glade/pytrainer.glade:9209 +#: glade/pytrainer.glade:10351 msgid "<b>System of Measurement</b>" -msgstr "" +msgstr "<b>Sistema de medida</b>" -#: glade/pytrainer.glade:9269 +#: glade/pytrainer.glade:10411 #, fuzzy msgid "Database type:" msgstr "Tipo de base de datos" -#: glade/pytrainer.glade:9297 +#: glade/pytrainer.glade:10439 #, fuzzy msgid "Database host:" msgstr "Servidor base de datos" -#: glade/pytrainer.glade:9346 +#: glade/pytrainer.glade:10488 #, fuzzy msgid "Database name:" msgstr "Nombre base de datos" -#: glade/pytrainer.glade:9414 +#: glade/pytrainer.glade:10556 #, fuzzy msgid "Database user:" msgstr "Usuarios base de datos" -#: glade/pytrainer.glade:9442 +#: glade/pytrainer.glade:10584 #, fuzzy msgid "Database pass:" msgstr "Contraseña base de datos" -#: glade/pytrainer.glade:9516 +#: glade/pytrainer.glade:10658 msgid "<b>Database</b>" msgstr "<b>Base de datos:</b>" -#: glade/pytrainer.glade:9576 +#: glade/pytrainer.glade:10718 msgid "Use this port for internal connections: " -msgstr "" +msgstr "Use este puerto para conexiones internas" -#: glade/pytrainer.glade:9627 -msgid "" -"<small><b>Note:</b> Change this only if you know what you are doing</small>" -msgstr "<small><b>Nota:</b> Cambie ésto sólo si sabe lo que hace.</small>" +#: glade/pytrainer.glade:10769 +msgid "<small><b>Note:</b> Change this only if you know what you are doing</small>" +msgstr "<small><b>Nota:</b> Cambie ésto solamente si sabe lo que hace.</small>" -#: glade/pytrainer.glade:9659 +#: glade/pytrainer.glade:10801 #, fuzzy msgid "<b>Port Connnection</b>" -msgstr "<b>Descripcion:</b>" +msgstr "<b>Descripción:</b>" -#: glade/pytrainer.glade:9695 +#: glade/pytrainer.glade:10837 #, fuzzy msgid "General" -msgstr "Genero" +msgstr "General" -#: glade/pytrainer.glade:9748 +#: glade/pytrainer.glade:10890 #, fuzzy msgid "User name:" msgstr "Nuevo nombre" -#: glade/pytrainer.glade:9776 +#: glade/pytrainer.glade:10918 #, fuzzy msgid "Gender:" -msgstr "Genero" +msgstr "Género" -#: glade/pytrainer.glade:9822 +#: glade/pytrainer.glade:10964 #, fuzzy msgid "Height:" msgstr "Altura" -#: glade/pytrainer.glade:9893 +#: glade/pytrainer.glade:11035 msgid "Date of birth:" msgstr "Fecha de nacimiento:" -#: glade/pytrainer.glade:10005 +#: glade/pytrainer.glade:11147 #, fuzzy msgid "Weight:" msgstr "Peso" -#: glade/pytrainer.glade:10037 +#: glade/pytrainer.glade:11179 #, fuzzy msgid "<b>Athlete Details</b>" -msgstr "<b>Borrar deporte</b>" +msgstr "<b>Datos personales</b>" -#: glade/pytrainer.glade:10066 +#: glade/pytrainer.glade:11208 #, fuzzy msgid "Athlete" -msgstr "borrar" +msgstr "Atleta" -#: glade/pytrainer.glade:10249 +#: glade/pytrainer.glade:11391 #, fuzzy msgid "<b>Sport List</b>" msgstr "<b>Lista de deportes:</b>" -#: glade/pytrainer.glade:10278 +#: glade/pytrainer.glade:11420 msgid "llist" msgstr "" -#: glade/pytrainer.glade:10358 glade/pytrainer.glade:12386 -#: glade/pytrainer.glade:12877 +#: glade/pytrainer.glade:11500 +#: glade/pytrainer.glade:13511 +#: glade/pytrainer.glade:14002 #, fuzzy msgid "Name:" msgstr "Nombre" -#: glade/pytrainer.glade:10386 +#: glade/pytrainer.glade:11528 msgid "M.E.T.:" -msgstr "M.E.T:" +msgstr "M.E.T.:" -#: glade/pytrainer.glade:10435 +#: glade/pytrainer.glade:11577 #, fuzzy msgid "Extra Weight:" -msgstr "Peso" +msgstr "Peso extra:" -#: glade/pytrainer.glade:10511 glade/pytrainer.glade:11117 -msgid "" -"<small><b>Note:</b> You can get your M.E.T. sport Coefficient here: http://" -"pytrainer.e-oss.net/met.pdf</small>" -msgstr "" +#: glade/pytrainer.glade:11651 +#: glade/pytrainer.glade:12249 +msgid "More information on determining yor M.E.T sport coefficient on Wikipedia" +msgstr "Más información sobre el coeficiente M.E.T. en Wikipedia" -#: glade/pytrainer.glade:10622 +#: glade/pytrainer.glade:11755 #, fuzzy msgid "<b>Add New Sport</b>" msgstr "<b>Añadir nuevo deporte</b>" -#: glade/pytrainer.glade:10651 +#: glade/pytrainer.glade:11784 msgid "new" msgstr "nuevo" -#: glade/pytrainer.glade:10711 +#: glade/pytrainer.glade:11844 msgid "" "Deleting a sport removes associated records.\n" "Continue?" -msgstr "SI borra un deporte elimina sus registros asociados.\n" -"Desea continuar?" +msgstr "" +"Si borra un deporte elimina sus registros asociados.\n" +"¿Desea continuar?" -#: glade/pytrainer.glade:10851 +#: glade/pytrainer.glade:11984 #, fuzzy msgid "<b>Delete Sport</b>" msgstr "<b>Borrar deporte</b>" -#: glade/pytrainer.glade:10911 +#: glade/pytrainer.glade:12044 msgid "delete" msgstr "borrar" -#: glade/pytrainer.glade:10970 +#: glade/pytrainer.glade:12103 msgid "Name" msgstr "Nombre" -#: glade/pytrainer.glade:11019 +#: glade/pytrainer.glade:12152 msgid "M.E.T." msgstr "M.E.T." -#: glade/pytrainer.glade:11068 +#: glade/pytrainer.glade:12201 +#: pytrainer/gui/windowprofile.py:69 #, fuzzy msgid "Extra Weight" msgstr "Peso" -#: glade/pytrainer.glade:11234 +#: glade/pytrainer.glade:12359 #, fuzzy msgid "<b>Edit Sport</b>" msgstr "<b>Editar deporte</b>" -#: glade/pytrainer.glade:11258 +#: glade/pytrainer.glade:12383 #, fuzzy msgid "<b>lalaal</b>" msgstr "<b>Base de datos:</b>" -#: glade/pytrainer.glade:11294 +#: glade/pytrainer.glade:12419 msgid "edit" msgstr "editar" -#: glade/pytrainer.glade:11323 +#: glade/pytrainer.glade:12448 msgid "Sports" msgstr "Deportes" -#: glade/pytrainer.glade:11382 +#: glade/pytrainer.glade:12507 msgid "Maximum heart rate:" msgstr "Pulsaciones máximas:" -#: glade/pytrainer.glade:11410 +#: glade/pytrainer.glade:12535 msgid "Resting heart rate:" msgstr "Pulsaciones en reposo:" -#: glade/pytrainer.glade:11484 -msgid "" -"<small><b>Note:</b> Maximum heart rate is calculated by subtracting the " -"number 220 minus your age. </small>" -msgstr "<small><b>Nota:</b> EL número máximo de pulsaciones se calcula con la " -"siguiente fórmula: 220 menos su edad. </small>" +#: glade/pytrainer.glade:12609 +msgid "<small><b>Note:</b> Maximum heart rate is calculated by subtracting the number 220 minus your age. </small>" +msgstr "<small><b>Nota:</b> EL número máximo de pulsaciones se calcula con la siguiente fórmula: 220 menos su edad. </small>" -#: glade/pytrainer.glade:11623 -msgid "" -"<small><b>NOTE:</b> in order to use the Karvonen method you must cover the " -"Resting hr field.</small>" -msgstr "" +#: glade/pytrainer.glade:12748 +msgid "<small><b>NOTE:</b> in order to use the Karvonen method you must cover the Resting hr field.</small>" +msgstr "<small><b>NOTE:</b> Rellene todos los campos relativos a pulsaciones para usar el método Karvonen</small>" -#: glade/pytrainer.glade:11652 +#: glade/pytrainer.glade:12777 msgid "Percentages based method" -msgstr "Metodo basado en Porcentajes" +msgstr "Metodo basado en porcentajes" -#: glade/pytrainer.glade:11674 +#: glade/pytrainer.glade:12799 +#: pytrainer/gui/windowmain.py:254 msgid "Karvonen method" -msgstr "" +msgstr "Método Karvonen" -#: glade/pytrainer.glade:11696 +#: glade/pytrainer.glade:12821 msgid "Select how to calculate your heart rate zones." -msgstr "" +msgstr "Seleccione cómo calcular las zonas de pulsaciones" -#: glade/pytrainer.glade:11728 +#: glade/pytrainer.glade:12853 #, fuzzy msgid "<b>Heart Rate Zones</b>" msgstr "<b>Pulsaciones:</b>" -#: glade/pytrainer.glade:11764 +#: glade/pytrainer.glade:12889 +#: pytrainer/daygraph.py:56 +#: pytrainer/recordgraph.py:85 +#: pytrainer/heartrategraph.py:38 msgid "Heart Rate" -msgstr "" +msgstr "Pulsaciones" -#: glade/pytrainer.glade:11869 +#: glade/pytrainer.glade:12994 msgid "Calendar" msgstr "Calendario" -#: glade/pytrainer.glade:12071 +#: glade/pytrainer.glade:13196 msgid "Edit Record" msgstr "Editar Registro" -#: glade/pytrainer.glade:12092 +#: glade/pytrainer.glade:13217 msgid "Show graph in classic view" -msgstr "Mostrar en la vista clásica" +msgstr "Mostrar en vista clásica" -#: glade/pytrainer.glade:12128 +#: glade/pytrainer.glade:13253 msgid "warning" msgstr "advertencia" -#: glade/pytrainer.glade:12330 +#: glade/pytrainer.glade:13455 msgid "<b>Extension Details</b>" msgstr "<b>Detalles de la Extensión</b>" -#: glade/pytrainer.glade:12358 +#: glade/pytrainer.glade:13483 msgid "name-entry" -msgstr "" +msgstr "Nombre" -#: glade/pytrainer.glade:12414 glade/pytrainer.glade:12821 +#: glade/pytrainer.glade:13539 +#: glade/pytrainer.glade:13946 #, fuzzy msgid "Status:" msgstr "<b>Estado:</b>" -#: glade/pytrainer.glade:12470 glade/pytrainer.glade:12793 +#: glade/pytrainer.glade:13595 +#: glade/pytrainer.glade:13918 msgid "status-entry" -msgstr "" +msgstr "Estado" -#: glade/pytrainer.glade:12498 +#: glade/pytrainer.glade:13623 msgid "description-entry" -msgstr "" +msgstr "Descripción" -#: glade/pytrainer.glade:12633 +#: glade/pytrainer.glade:13758 msgid "Plugins" msgstr "Plugins" -#: glade/pytrainer.glade:12708 +#: glade/pytrainer.glade:13833 #, fuzzy msgid "<b>Plugin Details</b>" msgstr "<b>Base de datos:</b>" -#: glade/pytrainer.glade:12737 +#: glade/pytrainer.glade:13862 msgid "description-entry " -msgstr "" +msgstr "Descripción" -#: glade/pytrainer.glade:12849 +#: glade/pytrainer.glade:13974 msgid "nameEntry" msgstr "Nueva Entrada" -#: glade/pytrainer.glade:13020 +#: glade/pytrainer.glade:14145 msgid "Select track record" msgstr "Seleccione uno de los tracks" +#: pytrainer/main.py:394 +msgid "Delete this database entry?" +msgstr "¿Borrar esta entrada de la base de datos?" + +#: pytrainer/main.py:408 +msgid "Delete this waypoint?" +msgstr "¿Borrar este waypoint?" + +#: pytrainer/gui/windowprofile.py:51 +#, fuzzy +msgid "Male" +msgstr "Valor" + +#: pytrainer/gui/windowprofile.py:52 +msgid "Female" +msgstr "Mujer" + +#: pytrainer/gui/windowprofile.py:69 +#, fuzzy +msgid "MET" +msgstr "M.E.T." + +#: pytrainer/gui/windowplugins.py:70 +#: pytrainer/gui/windowplugins.py:97 +#: pytrainer/gui/windowextensions.py:70 +msgid "Enable" +msgstr "Habilitar" + +#: pytrainer/gui/windowplugins.py:72 +#: pytrainer/gui/windowplugins.py:96 +#: pytrainer/gui/windowextensions.py:72 +#, fuzzy +msgid "Disable" +msgstr "Distancia" + +#: pytrainer/gui/windowplugins.py:81 +#: pytrainer/gui/windowextensions.py:81 +#, python-format +msgid "%s settings" +msgstr "%s opciones" + +#: pytrainer/gui/windowplugins.py:104 +msgid "Ok" +msgstr "Ok" + +#: pytrainer/gui/windowmain.py:57 +#: pytrainer/gui/windowmain.py:60 +#: pytrainer/gui/windowmain.py:64 +msgid "id" +msgstr "id" + +#: pytrainer/gui/windowmain.py:57 +msgid "Kilometer" +msgstr "Kilómetros" + +#: pytrainer/gui/windowmain.py:60 +#: pytrainer/gui/windowmain.py:674 +#, fuzzy +msgid "Title" +msgstr "Titulo" + +#: pytrainer/gui/windowmain.py:60 +#: pytrainer/gui/windowmain.py:675 +#: pytrainer/gui/dialogselecttrack.py:40 +#, fuzzy +msgid "Date" +msgstr "Fecha" + +#: pytrainer/gui/windowmain.py:60 +#: pytrainer/gui/windowmain.py:676 +#: pytrainer/extensions/googlemaps.py:91 +msgid "Distance" +msgstr "Distancia" + +#: pytrainer/gui/windowmain.py:60 +#: pytrainer/gui/windowmain.py:678 +#: pytrainer/extensions/googlemaps.py:91 +#, fuzzy +msgid "Time" +msgstr "Tiempo" + +#: pytrainer/gui/windowmain.py:60 +#: pytrainer/gui/windowmain.py:679 +msgid "Beats" +msgstr "Pulsaciones" + +#: pytrainer/gui/windowmain.py:60 +#: pytrainer/gui/windowmain.py:680 +msgid "Average" +msgstr "Media" + +#: pytrainer/gui/windowmain.py:64 +msgid "Waypoint" +msgstr "Waypoint" + +#: pytrainer/gui/windowmain.py:158 +#: pytrainer/gui/windowmain.py:267 +#: pytrainer/gui/windowmain.py:366 +#: pytrainer/gui/windowmain.py:444 +#, fuzzy +msgid "miles" +msgstr "Archivo" + +#: pytrainer/gui/windowmain.py:159 +#: pytrainer/gui/windowmain.py:160 +#: pytrainer/gui/windowmain.py:268 +#: pytrainer/gui/windowmain.py:269 +#: pytrainer/gui/windowmain.py:367 +#: pytrainer/gui/windowmain.py:368 +#: pytrainer/gui/windowmain.py:445 +#: pytrainer/gui/windowmain.py:446 +msgid "miles/h" +msgstr "" + +#: pytrainer/gui/windowmain.py:161 +#: pytrainer/gui/windowmain.py:162 +#: pytrainer/gui/windowmain.py:270 +#: pytrainer/gui/windowmain.py:271 +#: pytrainer/gui/windowmain.py:369 +#: pytrainer/gui/windowmain.py:370 +#: pytrainer/gui/windowmain.py:447 +#: pytrainer/gui/windowmain.py:448 +#, fuzzy +msgid "min/mile" +msgstr "min/km" + +#: pytrainer/gui/windowmain.py:163 +#: pytrainer/gui/windowmain.py:164 +#, fuzzy +msgid "feet" +msgstr "borrar" + +#: pytrainer/gui/windowmain.py:166 +#: pytrainer/gui/windowmain.py:273 +#: pytrainer/gui/windowmain.py:372 +#: pytrainer/gui/windowmain.py:450 +#: pytrainer/extensions/googlemaps.py:91 +#, fuzzy +msgid "km" +msgstr "Km/h" + +#: pytrainer/gui/windowmain.py:256 +#, fuzzy +msgid "Percentages method" +msgstr "Método basado en porcentajes" + +#: pytrainer/gui/dialogselecttrack.py:40 +msgid "Track Name" +msgstr "Nombre de la ruta" + +#: pytrainer/gui/drawArea.py:142 +#: pytrainer/extensions/googlemaps.py:89 +msgid "h" +msgstr "" + +#: pytrainer/gui/drawArea.py:143 +#: pytrainer/extensions/googlemaps.py:89 +#, fuzzy +msgid "min" +msgstr "min/km" + +#: pytrainer/gui/windowextensions.py:104 +#: pytrainer/gui/windowextensions.py:117 +msgid "OK" +msgstr "Ok" + +#: pytrainer/lib/gpx.py:90 +#, fuzzy +msgid "No Name" +msgstr "Nombre" + +#: pytrainer/lib/gpx.py:97 +msgid "No Data" +msgstr "Sin datos" + +#: pytrainer/lib/heartrate.py:46 +msgid "Moderate activity" +msgstr "Actividad moderada" + +#: pytrainer/lib/heartrate.py:47 +msgid "Weight Control" +msgstr "Control de peso" + +#: pytrainer/lib/heartrate.py:48 +msgid "Aerobic" +msgstr "Aeróbico" + +#: pytrainer/lib/heartrate.py:49 +msgid "Anaerobic" +msgstr "Anaeróbico" + +#: pytrainer/lib/heartrate.py:50 +msgid "VO2 MAX" +msgstr "VO2 máximo" + +#: pytrainer/daygraph.py:52 +#: pytrainer/daygraph.py:54 +#: pytrainer/daygraph.py:56 +#: pytrainer/recordgraph.py:79 +#: pytrainer/recordgraph.py:81 +#: pytrainer/recordgraph.py:83 +#: pytrainer/recordgraph.py:85 +#: pytrainer/heartrategraph.py:38 +#: pytrainer/monthgraph.py:69 +#: pytrainer/yeargraph.py:70 +#: pytrainer/weekgraph.py:111 +msgid "Distance (km)" +msgstr "Distancia (Km)" + +#: pytrainer/daygraph.py:52 +#: pytrainer/recordgraph.py:79 +msgid "Height (m)" +msgstr "Altura (m)" + +#: pytrainer/daygraph.py:52 +#: pytrainer/recordgraph.py:79 +msgid "Stage Profile" +msgstr "Perfil de Etapa" + +#: pytrainer/daygraph.py:54 +#, fuzzy +msgid "Velocity (Km/h)" +msgstr "Velocidad (km/h)" + +#: pytrainer/daygraph.py:54 +#, fuzzy +msgid "Velocity" +msgstr "velocidad" + +#: pytrainer/daygraph.py:56 +#: pytrainer/recordgraph.py:85 +#: pytrainer/heartrategraph.py:38 +#, fuzzy +msgid "Beats (bpm)" +msgstr "Media pulsaciones (ppm)" + +#: pytrainer/recordgraph.py:81 +#, fuzzy +msgid "Speed (Km/h)" +msgstr "media (km/h)" + +#: pytrainer/recordgraph.py:81 +msgid "Speed" +msgstr "Velocidad" + +#: pytrainer/recordgraph.py:83 +#, fuzzy +msgid "Pace (min/km)" +msgstr "Ritmo (min/km)" + +#: pytrainer/recordgraph.py:83 +msgid "Pace" +msgstr "Ritmo" + +#: pytrainer/monthgraph.py:69 +#: pytrainer/monthgraph.py:71 +#: pytrainer/monthgraph.py:73 +#: pytrainer/monthgraph.py:75 +#: pytrainer/monthgraph.py:77 +msgid "day" +msgstr "dia" + +#: pytrainer/monthgraph.py:69 +#: pytrainer/weekgraph.py:111 +#, fuzzy +msgid "Daily Distance" +msgstr "Distancia" + +#: pytrainer/monthgraph.py:71 +#: pytrainer/yeargraph.py:72 +#: pytrainer/weekgraph.py:113 +#, fuzzy +msgid "Time (hours)" +msgstr "Tiempo en horas" + +#: pytrainer/monthgraph.py:71 +#: pytrainer/weekgraph.py:113 +#, fuzzy +msgid "Daily Time" +msgstr "tiempo diario" + +#: pytrainer/monthgraph.py:73 +#: pytrainer/yeargraph.py:74 +#: pytrainer/weekgraph.py:115 +msgid "Average Heart Rate (bpm)" +msgstr "Pulsaciones medias (ppm)" + +#: pytrainer/monthgraph.py:73 +#: pytrainer/weekgraph.py:115 +#, fuzzy +msgid "Daily Average Heart Rate" +msgstr "medias diarias" + +#: pytrainer/monthgraph.py:75 +#: pytrainer/yeargraph.py:76 +#: pytrainer/weekgraph.py:117 +#, fuzzy +msgid "Average Speed (km/h)" +msgstr "media (km/h)" + +#: pytrainer/monthgraph.py:75 +#: pytrainer/weekgraph.py:117 +#, fuzzy +msgid "Daily Average Speed" +msgstr "medias diarias" + +#: pytrainer/monthgraph.py:77 +#: pytrainer/weekgraph.py:119 +#, fuzzy +msgid "Daily Calories" +msgstr "calorias diarias" + +#: pytrainer/waypoint.py:80 +msgid "The gpx file seems to be a several days records. Perhaps you will need to edit your gpx file" +msgstr "Parece que el archivo gpx contiene salidas de varios dias. Probablementenecesitarás editar tu archivo gpx" + +#: pytrainer/record.py:368 +msgid "pyTrainer cant import data from your gpx file" +msgstr "pyTrainer no puede importar datos de tu fichero gpx" + +#: pytrainer/yeargraph.py:70 +#: pytrainer/yeargraph.py:72 +#: pytrainer/yeargraph.py:74 +#: pytrainer/yeargraph.py:76 +#: pytrainer/yeargraph.py:78 +msgid "month" +msgstr "mes" + +#: pytrainer/yeargraph.py:70 +#, fuzzy +msgid "Monthly Distance" +msgstr "Distancia" + +#: pytrainer/yeargraph.py:72 +#, fuzzy +msgid "Monthly Time" +msgstr "tiempo mensual" + +#: pytrainer/yeargraph.py:74 +#, fuzzy +msgid "Monthly Average Heart Rate" +msgstr "medias mensuales" + +#: pytrainer/yeargraph.py:76 +#, fuzzy +msgid "Monthly Average Speed" +msgstr "medias mensuales" + +#: pytrainer/yeargraph.py:78 +#, fuzzy +msgid "Monthly Calories" +msgstr "calorias mensuales" + +#~ msgid "None" +#~ msgstr "Ninguno" +#~ msgid "January" +#~ msgstr "Enero" +#~ msgid "Febrary" +#~ msgstr "Febrero" +#~ msgid "March" +#~ msgstr "Marzo" +#~ msgid "April" +#~ msgstr "Abril" +#~ msgid "May" +#~ msgstr "Mayo" +#~ msgid "June" +#~ msgstr "Junio" +#~ msgid "July" +#~ msgstr "Julio" +#~ msgid "August" +#~ msgstr "Agosto" +#~ msgid "September" +#~ msgstr "Septiembre" +#~ msgid "October" +#~ msgstr "Octubre" +#~ msgid "November" +#~ msgstr "Noviembre" +#~ msgid "December" +#~ msgstr "Diciembre" + +#, fuzzy +#~ msgid "Kilometers" +#~ msgstr "Kilómetros" + +#, fuzzy +#~ msgid "Daily kilometers" +#~ msgstr "Kilómetros diarios" + +#, fuzzy +#~ msgid "Beats per Minute" +#~ msgstr "pulsaciones por minuto" + +#, fuzzy +#~ msgid "Daily Beats" +#~ msgstr "pulsaciones diarias" +#~ msgid "kilometers" +#~ msgstr "Kilometros" +#~ msgid "monthly kilometers" +#~ msgstr "Kilometros mensuales" +#~ msgid "time in hours" +#~ msgstr "Tiempo en horas" +#~ msgid "beats per minute" +#~ msgstr "pulsaciones por minuto" +#~ msgid "monthly beats" +#~ msgstr "pulsaciones mensuales" +#~ msgid "average (hm/h)" +#~ msgstr "media (km/h)" +#~ msgid "calories" +#~ msgstr "calorias" +#~ msgid "Week View" +#~ msgstr "Vista semanal" #~ msgid " Km" #~ msgstr "km" - #~ msgid " km/h" #~ msgstr "Km/h" - #~ msgid "<b>Positive:</b>" #~ msgstr "<b>Positivo:</b>" - #~ msgid "<b>Negative:</b>" #~ msgstr "<b>Negativo:</b>" - #~ msgid " <b>Name:</b>" #~ msgstr "<b>Nombre:</b>" - #~ msgid " <b>Description:</b>" #~ msgstr "<b>Descripción:</b>" - -#~ msgid "Beats avg (bpm)" -#~ msgstr "Media pulsaciones (ppm)" - #~ msgid "Calculate Distance" #~ msgstr "Calcular Distancia" - #~ msgid "Calculate Average" #~ msgstr "Calcular Media" - #~ msgid "Profile" #~ msgstr "Perfil" - #~ msgid "Age" #~ msgstr "Edad" - #~ msgid "Database" #~ msgstr "Base de datos" - #~ msgid "" #~ "You are going to remove a sport. When you delete a \n" #~ "sport you delete the records asociated. Are you sure \n" @@ -955,19 +1501,14 @@ #~ "un deporte borras también la lista de registros asociados\n" #~ "en la base de datos. ¿Estás seguro de que es ésto lo que \n" #~ "quieres hacer?" - #~ msgid "pytrainer" #~ msgstr "pytrainer" - #~ msgid "(c) Fiz Vazquez <vu...@si...>" #~ msgstr " " - #~ msgid "The free sport trainning center" #~ msgstr "El centro de entrenamiento libre" - #~ msgid "pytrainer.e-oss.net" #~ msgstr " " - #~ msgid "" #~ "Catalan: Eloi Crespillo Itchart <el...@ik...>\n" #~ "Czech: Lobus Pokorny <sp...@se...>\n" @@ -977,159 +1518,25 @@ #~ "german: Aleks <al...@sc...>\n" #~ "Spanish: Fiz vazquez <vu...@si...>" #~ msgstr " " - #~ msgid "window2" #~ msgstr "window2" - #~ msgid "No Active Plugins" #~ msgstr "No hay plugins activos" - #~ msgid "No Active Extensions" #~ msgstr "No hay extensiones activas" - #~ msgid "" #~ "You are going to remove one database entry. Are you sure yo want do it?" #~ msgstr "" #~ "Estás a punto de borrar una entrada en la base de datos. Estás seguro de " #~ "que quieres hacer eso?" - #~ msgid "You are going to remove one waypoint. Are you sure yo want do it?" #~ msgstr "" #~ "Estás a punto de borrar una entrada en la base de datos. Estás seguro de " #~ "que quieres hacer eso?" - -#~ msgid "January" -#~ msgstr "Enero" - -#~ msgid "Febrary" -#~ msgstr "Febrero" - -#~ msgid "March" -#~ msgstr "Marzo" - -#~ msgid "April" -#~ msgstr "Abril" - -#~ msgid "May" -#~ msgstr "Mayo" - -#~ msgid "June" -#~ msgstr "Junio" - -#~ msgid "July" -#~ msgstr "Julio" - -#~ msgid "August" -#~ msgstr "Agosto" - -#~ msgid "September" -#~ msgstr "Septiembre" - -#~ msgid "October" -#~ msgstr "Octubre" - -#~ msgid "November" -#~ msgstr "Noviembre" - -#~ msgid "December" -#~ msgstr "Diciembre" - -#~ msgid "month" -#~ msgstr "mes" - -#~ msgid "kilometers" -#~ msgstr "Kilometros" - -#~ msgid "monthly kilometers" -#~ msgstr "Kilometros mensuales" - -#~ msgid "time in hours" -#~ msgstr "Tiempo en horas" - -#~ msgid "monthly time" -#~ msgstr "tiempo mensual" - -#~ msgid "beats per minute" -#~ msgstr "pulsaciones por minuto" - -#~ msgid "monthly beats" -#~ msgstr "pulsaciones mensuales" - -#~ msgid "average (hm/h)" -#~ msgstr "media (km/h)" - -#~ msgid "monthly averages" -#~ msgstr "medias mensuales" - -#~ msgid "calories" -#~ msgstr "calorias" - -#~ msgid "monthly calories" -#~ msgstr "calorias mensuales" - -#~ msgid "id" -#~ msgstr "id" - -#~ msgid "Kilometer" -#~ msgstr "Kilometros" - -#~ msgid "Distance" -#~ msgstr "Distancia" - -#~ msgid "Beats" -#~ msgstr "Pulsaciones" - -#~ msgid "Average" -#~ msgstr "Media" - -#~ msgid "Waypoint" -#~ msgstr "Waypoint" - #~ msgid "Active" #~ msgstr "Activo" - #~ msgid "unActive" #~ msgstr "inActivo" - -#~ msgid "%s settings" -#~ msgstr "%s opciones" - -#~ msgid "Ok" -#~ msgstr "Ok" - -#~ msgid "Track Name" -#~ msgstr "Nombre de la ruta." - -#~ msgid "Distance (km)" -#~ msgstr "Distancia (Km)" - -#~ msgid "Height (m)" -#~ msgstr "Altura (m)" - -#~ msgid "Stage Profile" -#~ msgstr "Perfil de Etapa" - -#~ msgid "velocity" -#~ msgstr "velocidad" - -#~ msgid "day" -#~ msgstr "dia" - -#~ msgid "daily kilometers" -#~ msgstr "Kilometros diarios" - -#~ msgid "daily time" -#~ msgstr "tiempo diario" - -#~ msgid "daily beats" -#~ msgstr "pulsaciones diarias" - -#~ msgid "daily averages" -#~ msgstr "medias diarias" - -#~ msgid "daily calories" -#~ msgstr "calorias diarias" - #~ msgid "" #~ "The gpx file seems to have several track records. Press cancel to select " #~ "a track record. Press Ok to load all of them as a single track record." @@ -1137,34 +1544,20 @@ #~ "Parece que el archivo gpx contiene varios registros de rutas. Presione " #~ "Cancelar para seleccionar una ruta. Selecciona aceptar para " #~ "seleccionarlos todos como una unica ruta." - -#~ msgid "" -#~ "The gpx file seems to be a several days records. Perhaps you will need to " -#~ "edit your gpx file" -#~ msgstr "" -#~ "Parece que el archivo gpx contiene salidas de varios dias. " -#~ "Probablementenecesitarás editar tu archivo gpx" - #~ msgid "Km/day" #~ msgstr "Km/dia" - #~ msgid "bpm/day" #~ msgstr "ppm/dia" - #~ msgid "km/h/day" #~ msgstr "km/h/dia" - #~ msgid "cal/day" #~ msgstr "cal/dia" - #~ msgid "time/day" #~ msgstr "tiempo/dia" - #~ msgid "Export " #~ msgstr "Exportar" - #~ msgid "Kj/day" #~ msgstr "Kj/dia" - #~ msgid "Press Here to create the database" #~ msgstr "Presiona aqui para crear la base de datos" + Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot =================================================================== --- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot 2009-12-04 19:37:15 UTC (rev 419) +++ pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot 2009-12-04 19:38:00 UTC (rev 420) @@ -1,15 +1,15 @@ -# Spanish translations for vud package. -# Copyright (C) 2009 THE vud'S COPYRIGHT HOLDER -# This file is distributed under the same license as the vud package. -# Fiz Vazquez <vu...@si...>, 2009. +# Spanish translations for PACKAGE package. +# Copyright (C) 2009 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# David García Granda <dg...@gm...>, 2009. # msgid "" msgstr "" -"Project-Id-Version: vud 1\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-04-16 22:27+0200\n" -"PO-Revision-Date: 2009-04-16 22:27+0200\n" -"Last-Translator: Fiz Vazquez <vu...@si...>\n" +"POT-Creation-Date: 2009-12-04 20:21+0100\n" +"PO-Revision-Date: 2009-12-04 20:21+0100\n" +"Last-Translator: David Garca Granda <dg...@gm...>\n" "Language-Team: Spanish\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ASCII\n" @@ -52,7 +52,7 @@ msgid "Tools" msgstr "" -#: glade/pytrainer.glade:192 glade/pytrainer.glade:12254 +#: glade/pytrainer.glade:192 glade/pytrainer.glade:13379 msgid "Extensions" msgstr "" @@ -64,7 +64,9 @@ msgid "_Help" msgstr "" -#: glade/pytrainer.glade:336 +#: glade/pytrainer.glade:336 pytrainer/gui/windowprofile.py:69 +#: pytrainer/gui/windowmain.py:57 pytrainer/gui/windowmain.py:60 +#: pytrainer/gui/windowmain.py:677 msgid "Sport" msgstr "" @@ -86,17 +88,20 @@ msgstr "" #: glade/pytrainer.glade:555 glade/pytrainer.glade:2994 -#: glade/pytrainer.glade:4122 glade/pytrainer.glade:5417 +#: glade/pytrainer.glade:4122 glade/pytrainer.glade:5264 +#: glade/pytrainer.glade:6559 msgid "<b>Time:</b>" msgstr "" #: glade/pytrainer.glade:584 glade/pytrainer.glade:3191 -#: glade/pytrainer.glade:4292 glade/pytrainer.glade:5641 +#: glade/pytrainer.glade:4292 glade/pytrainer.glade:5434 +#: glade/pytrainer.glade:6783 msgid "<b>Speed:</b>" msgstr "" #: glade/pytrainer.glade:612 glade/pytrainer.glade:3500 -#: glade/pytrainer.glade:4656 glade/pytrainer.glade:5811 +#: glade/pytrainer.glade:4656 glade/pytrainer.glade:5798 +#: glade/pytrainer.glade:6953 msgid "<b>Pace:</b>" msgstr "" @@ -111,18 +116,29 @@ #: glade/pytrainer.glade:696 glade/pytrainer.glade:1379 #: glade/pytrainer.glade:3247 glade/pytrainer.glade:3304 #: glade/pytrainer.glade:4348 glade/pytrainer.glade:4517 -#: glade/pytrainer.glade:5697 glade/pytrainer.glade:5725 +#: glade/pytrainer.glade:5490 glade/pytrainer.glade:5659 +#: glade/pytrainer.glade:6839 glade/pytrainer.glade:6867 +#: pytrainer/gui/windowmain.py:167 pytrainer/gui/windowmain.py:168 +#: pytrainer/gui/windowmain.py:274 pytrainer/gui/windowmain.py:275 +#: pytrainer/gui/windowmain.py:373 pytrainer/gui/windowmain.py:374 +#: pytrainer/gui/windowmain.py:451 pytrainer/gui/windowmain.py:452 msgid "km/h" msgstr "" #: glade/pytrainer.glade:724 glade/pytrainer.glade:1089 #: glade/pytrainer.glade:3528 glade/pytrainer.glade:3584 #: glade/pytrainer.glade:4712 glade/pytrainer.glade:4740 -#: glade/pytrainer.glade:5868 glade/pytrainer.glade:5896 +#: glade/pytrainer.glade:5854 glade/pytrainer.glade:5882 +#: glade/pytrainer.glade:7010 glade/pytrainer.glade:7038 +#: pytrainer/gui/windowmain.py:169 pytrainer/gui/windowmain.py:170 +#: pytrainer/gui/windowmain.py:276 pytrainer/gui/windowmain.py:277 +#: pytrainer/gui/windowmain.py:375 pytrainer/gui/windowmain.py:376 +#: pytrainer/gui/windowmain.py:453 pytrainer/gui/windowmain.py:454 msgid "min/km" msgstr "" #: glade/pytrainer.glade:752 glade/pytrainer.glade:1145 +#: pytrainer/gui/windowmain.py:171 pytrainer/gui/windowmain.py:172 msgid "m" msgstr "" @@ -134,6 +150,7 @@ #: glade/pytrainer.glade:2040 glade/pytrainer.glade:2068 #: glade/pytrainer.glade:2096 glade/pytrainer.glade:2264 #: glade/pytrainer.glade:3696 glade/pytrainer.glade:4852 +#: glade/pytrainer.glade:5994 msgid " " msgstr "" @@ -142,7 +159,8 @@ msgstr "" #: glade/pytrainer.glade:948 glade/pytrainer.glade:2966 -#: glade/pytrainer.glade:4094 glade/pytrainer.glade:5389 +#: glade/pytrainer.glade:4094 glade/pytrainer.glade:5236 +#: glade/pytrainer.glade:6531 msgid "<b>Distance:</b>" msgstr "" @@ -151,7 +169,8 @@ msgstr "" #: glade/pytrainer.glade:1005 glade/pytrainer.glade:3556 -#: glade/pytrainer.glade:4684 glade/pytrainer.glade:5840 +#: glade/pytrainer.glade:4684 glade/pytrainer.glade:5826 +#: glade/pytrainer.glade:6982 msgid "<b>Max Pace:</b>" msgstr "" @@ -164,7 +183,8 @@ msgstr "" #: glade/pytrainer.glade:1211 glade/pytrainer.glade:2910 -#: glade/pytrainer.glade:4038 glade/pytrainer.glade:5613 +#: glade/pytrainer.glade:4038 glade/pytrainer.glade:5180 +#: glade/pytrainer.glade:6755 msgid "Km" msgstr "" @@ -172,15 +192,17 @@ #: glade/pytrainer.glade:1344 glade/pytrainer.glade:3028 #: glade/pytrainer.glade:3078 glade/pytrainer.glade:3128 #: glade/pytrainer.glade:4206 glade/pytrainer.glade:4256 -#: glade/pytrainer.glade:5501 glade/pytrainer.glade:5551 +#: glade/pytrainer.glade:5348 glade/pytrainer.glade:5398 +#: glade/pytrainer.glade:6643 glade/pytrainer.glade:6693 msgid "00" msgstr "" #: glade/pytrainer.glade:1269 glade/pytrainer.glade:1319 #: glade/pytrainer.glade:3053 glade/pytrainer.glade:3103 #: glade/pytrainer.glade:4181 glade/pytrainer.glade:4231 -#: glade/pytrainer.glade:5476 glade/pytrainer.glade:5526 -#: glade/pytrainer.glade:7646 glade/pytrainer.glade:7691 +#: glade/pytrainer.glade:5323 glade/pytrainer.glade:5373 +#: glade/pytrainer.glade:6618 glade/pytrainer.glade:6668 +#: glade/pytrainer.glade:8788 glade/pytrainer.glade:8833 msgid ":" msgstr "" @@ -190,11 +212,13 @@ #: glade/pytrainer.glade:3724 glade/pytrainer.glade:3752 #: glade/pytrainer.glade:4065 glade/pytrainer.glade:4320 #: glade/pytrainer.glade:4404 glade/pytrainer.glade:4600 -#: glade/pytrainer.glade:4880 glade/pytrainer.glade:5220 -#: glade/pytrainer.glade:5304 glade/pytrainer.glade:5360 -#: glade/pytrainer.glade:5669 glade/pytrainer.glade:5952 -#: glade/pytrainer.glade:5980 glade/pytrainer.glade:6008 -#: glade/pytrainer.glade:6036 +#: glade/pytrainer.glade:4880 glade/pytrainer.glade:5207 +#: glade/pytrainer.glade:5462 glade/pytrainer.glade:5546 +#: glade/pytrainer.glade:5742 glade/pytrainer.glade:6022 +#: glade/pytrainer.glade:6362 glade/pytrainer.glade:6446 +#: glade/pytrainer.glade:6502 glade/pytrainer.glade:6811 +#: glade/pytrainer.glade:7094 glade/pytrainer.glade:7122 +#: glade/pytrainer.glade:7150 glade/pytrainer.glade:7178 msgid " " msgstr "" @@ -211,7 +235,7 @@ msgstr "" #: glade/pytrainer.glade:1653 glade/pytrainer.glade:5038 -#: glade/pytrainer.glade:6194 +#: glade/pytrainer.glade:6180 glade/pytrainer.glade:7336 msgid "Versus" msgstr "" @@ -229,12 +253,14 @@ msgstr "" #: glade/pytrainer.glade:1871 glade/pytrainer.glade:3332 -#: glade/pytrainer.glade:4376 glade/pytrainer.glade:5192 +#: glade/pytrainer.glade:4376 glade/pytrainer.glade:5518 +#: glade/pytrainer.glade:6334 msgid "<b>Calories: </b>" msgstr "" #: glade/pytrainer.glade:1899 glade/pytrainer.glade:3612 -#: glade/pytrainer.glade:4796 glade/pytrainer.glade:5924 +#: glade/pytrainer.glade:4796 glade/pytrainer.glade:5938 +#: glade/pytrainer.glade:7066 msgid "<b>Max Beats:</b>" msgstr "" @@ -273,6 +299,7 @@ #: glade/pytrainer.glade:2236 glade/pytrainer.glade:2292 #: glade/pytrainer.glade:2320 glade/pytrainer.glade:3668 #: glade/pytrainer.glade:4489 glade/pytrainer.glade:4824 +#: glade/pytrainer.glade:5631 glade/pytrainer.glade:5966 msgid " " msgstr "" @@ -280,8 +307,9 @@ #: glade/pytrainer.glade:2458 glade/pytrainer.glade:2486 #: glade/pytrainer.glade:2514 glade/pytrainer.glade:3472 #: glade/pytrainer.glade:3640 glade/pytrainer.glade:4628 -#: glade/pytrainer.glade:4768 glade/pytrainer.glade:5332 -#: glade/pytrainer.glade:5753 +#: glade/pytrainer.glade:4768 glade/pytrainer.glade:5770 +#: glade/pytrainer.glade:5910 glade/pytrainer.glade:6474 +#: glade/pytrainer.glade:6895 msgid "bpm" msgstr "" @@ -293,8 +321,8 @@ msgid " <b>Heart Rate:</b>" msgstr "" -#: glade/pytrainer.glade:2757 glade/pytrainer.glade:7008 -#: glade/pytrainer.glade:10875 +#: glade/pytrainer.glade:2757 glade/pytrainer.glade:8150 +#: glade/pytrainer.glade:12008 msgid "label-2147483648" msgstr "" @@ -307,17 +335,17 @@ msgstr "" #: glade/pytrainer.glade:3276 glade/pytrainer.glade:4461 -#: glade/pytrainer.glade:5782 +#: glade/pytrainer.glade:5603 glade/pytrainer.glade:6924 msgid "<b>Max Speed:</b>" msgstr "" #: glade/pytrainer.glade:3388 glade/pytrainer.glade:4432 -#: glade/pytrainer.glade:5248 +#: glade/pytrainer.glade:5574 glade/pytrainer.glade:6390 msgid "Cal" msgstr "" #: glade/pytrainer.glade:3416 glade/pytrainer.glade:4572 -#: glade/pytrainer.glade:5276 +#: glade/pytrainer.glade:5714 glade/pytrainer.glade:6418 msgid "<b>Beats avg:</b>" msgstr "" @@ -340,74 +368,86 @@ msgid "Day" msgstr "" -#: glade/pytrainer.glade:4156 glade/pytrainer.glade:5451 +#: glade/pytrainer.glade:4156 glade/pytrainer.glade:5298 +#: glade/pytrainer.glade:6593 msgid "000" msgstr "" -#: glade/pytrainer.glade:4545 glade/pytrainer.glade:7844 +#: glade/pytrainer.glade:4545 glade/pytrainer.glade:5687 +#: glade/pytrainer.glade:8986 msgid " " msgstr "" #: glade/pytrainer.glade:4918 -msgid " <b>Month:</b>" +msgid " <b>Week:</b>" msgstr "" -#: glade/pytrainer.glade:5018 glade/pytrainer.glade:6174 +#: glade/pytrainer.glade:5018 glade/pytrainer.glade:6160 +#: glade/pytrainer.glade:7316 msgid "" -"Kilometers\n" +"Distance\n" "Time\n" -"Beats\n" -"Average\n" +"Average Heart Rate\n" +"Average Speed\n" "Calories" msgstr "" -#: glade/pytrainer.glade:5063 glade/pytrainer.glade:6219 +#: glade/pytrainer.glade:5063 glade/pytrainer.glade:6205 +#: glade/pytrainer.glade:7361 msgid "" "None\n" -"Kilometers\n" +"Distance\n" "Time\n" -"Beats\n" -"Average\n" +"Average Heart Rate\n" +"Average Speed\n" "Calories" msgstr "" -#: glade/pytrainer.glade:5133 +#: glade/pytrainer.glade:5132 +msgid "Week" +msgstr "" + +#: glade/pytrainer.glade:6060 +msgid " <b>Month:</b>" +msgstr "" + +#: glade/pytrainer.glade:6275 msgid "Month" msgstr "" -#: glade/pytrainer.glade:6074 +#: glade/pytrainer.glade:7216 msgid " <b>Year:</b>" msgstr "" -#: glade/pytrainer.glade:6289 +#: glade/pytrainer.glade:7431 msgid "Year" msgstr "" -#: glade/pytrainer.glade:6332 +#: glade/pytrainer.glade:7474 msgid "label154" msgstr "" -#: glade/pytrainer.glade:6369 +#: glade/pytrainer.glade:7511 msgid "<b>Title:</b>" msgstr "" -#: glade/pytrainer.glade:6414 +#: glade/pytrainer.glade:7556 msgid "Search" msgstr "" -#: glade/pytrainer.glade:6461 +#: glade/pytrainer.glade:7603 msgid "Columns" msgstr "" -#: glade/pytrainer.glade:6536 +#: glade/pytrainer.glade:7678 msgid "label155" msgstr "" -#: glade/pytrainer.glade:6670 +#: glade/pytrainer.glade:7812 msgid "Type:" msgstr "" -#: glade/pytrainer.glade:6698 +#: glade/pytrainer.glade:7840 msgid "" "Font\n" "Restaurant\n" @@ -415,409 +455,689 @@ "Summit" msgstr "" -#: glade/pytrainer.glade:6719 +#: glade/pytrainer.glade:7861 msgid "Latitude: " msgstr "" -#: glade/pytrainer.glade:6747 +#: glade/pytrainer.glade:7889 msgid " Name:" msgstr "" -#: glade/pytrainer.glade:6775 +#: glade/pytrainer.glade:7917 msgid "Longitude:" msgstr "" -#: glade/pytrainer.glade:6803 glade/pytrainer.glade:12442 -#: glade/pytrainer.glade:12765 +#: glade/pytrainer.glade:7945 glade/pytrainer.glade:13567 +#: glade/pytrainer.glade:13890 msgid "Description:" msgstr "" -#: glade/pytrainer.glade:6923 +#: glade/pytrainer.glade:8065 msgid "<b> Waypoint: </b>" msgstr "" -#: glade/pytrainer.glade:7056 +#: glade/pytrainer.glade:8198 msgid "label162" msgstr "" -#: glade/pytrainer.glade:7196 +#: glade/pytrainer.glade:8338 msgid "label163" msgstr "" -#: glade/pytrainer.glade:7221 +#: glade/pytrainer.glade:8363 msgid "New Entry" msgstr "" -#: glade/pytrainer.glade:7294 +#: glade/pytrainer.glade:8436 msgid "Title:" msgstr "" -#: glade/pytrainer.glade:7343 +#: glade/pytrainer.glade:8485 msgid "GPX File:" msgstr "" -#: glade/pytrainer.glade:7413 +#: glade/pytrainer.glade:8555 msgid "Calculate Values" msgstr "" -#: glade/pytrainer.glade:7432 +#: glade/pytrainer.glade:8574 msgid "Sport:" msgstr "" -#: glade/pytrainer.glade:7483 +#: glade/pytrainer.glade:8625 msgid "<b>Main</b>" msgstr "" -#: glade/pytrainer.glade:7544 +#: glade/pytrainer.glade:8686 msgid "Distance (Km):" msgstr "" -#: glade/pytrainer.glade:7573 glade/pytrainer.glade:7770 -#: glade/pytrainer.glade:8051 glade/pytrainer.glade:8297 -#: glade/pytrainer.glade:8765 glade/pytrainer.glade:11513 +#: glade/pytrainer.glade:8715 glade/pytrainer.glade:8912 +#: glade/pytrainer.glade:9193 glade/pytrainer.glade:9439 +#: glade/pytrainer.glade:9907 glade/pytrainer.glade:12638 msgid "Calculate" msgstr "" -#: glade/pytrainer.glade:7592 +#: glade/pytrainer.glade:8734 msgid "Time:" msgstr "" -#: glade/pytrainer.glade:7790 +#: glade/pytrainer.glade:8932 msgid "Date:" msgstr "" -#: glade/pytrainer.glade:7910 glade/pytrainer.glade:11563 +#: glade/pytrainer.glade:9052 glade/pytrainer.glade:12688 msgid "<b>General</b>" msgstr "" -#: glade/pytrainer.glade:7971 +#: glade/pytrainer.glade:9113 msgid "Max (km/h):" msgstr "" -#: glade/pytrainer.glade:8022 +#: glade/pytrainer.glade:9164 msgid "Velocity (km/h)" msgstr "" -#: glade/pytrainer.glade:8097 +#: glade/pytrainer.glade:9239 msgid "<b>Velocity</b>" msgstr "" -#: glade/pytrainer.glade:8133 +#: glade/pytrainer.glade:9275 msgid "Quick Entry" msgstr "" -#: glade/pytrainer.glade:8193 +#: glade/pytrainer.glade:9335 msgid "Max (min/km):" msgstr "" -#: glade/pytrainer.glade:8245 +#: glade/pytrainer.glade:9387 msgid "Pace (min/km):" msgstr "" -#: glade/pytrainer.glade:8320 +#: glade/pytrainer.glade:9462 msgid "<b>Pace</b>" msgstr "" -#: glade/pytrainer.glade:8381 +#: glade/pytrainer.glade:9523 msgid "Ascent:" msgstr "" -#: glade/pytrainer.glade:8433 +#: glade/pytrainer.glade:9575 msgid "Descent:" msgstr "" -#: glade/pytrainer.glade:8488 +#: glade/pytrainer.glade:9630 msgid "<b>Accumulated Alt... [truncated message content] |
From: <dg...@us...> - 2009-12-04 21:17:39
|
Revision: 423 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=423&view=rev Author: dgranda Date: 2009-12-04 21:17:28 +0000 (Fri, 04 Dec 2009) Log Message: ----------- Updating spanish translation, 2nd - and hopefully last - attempt Modified Paths: -------------- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer.mo pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot pytrainer/trunk/messages.pot Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer.mo =================================================================== (Binary files differ) Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po =================================================================== --- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2009-12-04 19:46:35 UTC (rev 422) +++ pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2009-12-04 21:17:28 UTC (rev 423) @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: vud 1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-04 20:21+0100\n" -"PO-Revision-Date: 2009-12-04 20:32+0100\n" +"POT-Creation-Date: 2009-12-04 21:22+0100\n" +"PO-Revision-Date: 2009-12-04 22:14+0100\n" "Last-Translator: David García Granda <dg...@gm...>\n" "Language-Team: Spanish <es...@li...>\n" "MIME-Version: 1.0\n" @@ -25,7 +25,6 @@ msgstr "Archivo" #: glade/pytrainer.glade:72 -#, fuzzy msgid "_Export as Text Separated by Commas" msgstr "Exportar como texto separado por comas" @@ -46,7 +45,6 @@ msgstr "Listado de registros" #: glade/pytrainer.glade:166 -#, fuzzy msgid " _Waypoints Editor" msgstr "Editor de waypoints" @@ -60,7 +58,6 @@ msgstr "Extensiones" #: glade/pytrainer.glade:202 -#, fuzzy msgid "GPS Device Plugins" msgstr "Plugins de dispositivos GPS" @@ -92,9 +89,8 @@ msgstr "" #: glade/pytrainer.glade:527 -#, fuzzy msgid "<b>Sport:</b>" -msgstr "<b>Lista de deportes:</b>" +msgstr "<b>Deporte:</b>" #: glade/pytrainer.glade:555 #: glade/pytrainer.glade:2994 @@ -109,23 +105,20 @@ #: glade/pytrainer.glade:4292 #: glade/pytrainer.glade:5434 #: glade/pytrainer.glade:6783 -#, fuzzy msgid "<b>Speed:</b>" -msgstr "<b>Titulo:</b>" +msgstr "<b>Velocidad:</b>" #: glade/pytrainer.glade:612 #: glade/pytrainer.glade:3500 #: glade/pytrainer.glade:4656 #: glade/pytrainer.glade:5798 #: glade/pytrainer.glade:6953 -#, fuzzy msgid "<b>Pace:</b>" -msgstr "<b>Nombre:</b>" +msgstr "<b>Ritmo:</b>" #: glade/pytrainer.glade:640 -#, fuzzy msgid "<b>Ascent:</b>" -msgstr "<b>Pulsaciones:</b>" +msgstr "<b>Ascenso:</b>" #: glade/pytrainer.glade:668 msgid "<b>Comments:</b>" @@ -198,7 +191,6 @@ msgstr " " #: glade/pytrainer.glade:920 -#, fuzzy msgid "<b>Date:</b>" msgstr "<b>Fecha:</b>" @@ -211,23 +203,20 @@ msgstr "<b>Distancia:</b>" #: glade/pytrainer.glade:977 -#, fuzzy msgid "<b>Max Speed</b>" -msgstr "<b>Nombre:</b>" +msgstr "<b>Pico velocidad:</b>" #: glade/pytrainer.glade:1005 #: glade/pytrainer.glade:3556 #: glade/pytrainer.glade:4684 #: glade/pytrainer.glade:5826 #: glade/pytrainer.glade:6982 -#, fuzzy msgid "<b>Max Pace:</b>" -msgstr "<b>Nombre:</b>" +msgstr "<b>Pico ritmo:</b>" #: glade/pytrainer.glade:1033 -#, fuzzy msgid "<b>Descent:</b>" -msgstr "<b>Distancia:</b>" +msgstr "<b>Descenso:</b>" #: glade/pytrainer.glade:1061 msgid " " @@ -302,7 +291,7 @@ #: glade/pytrainer.glade:1520 msgid " <b>Title:</b>" -msgstr "<b>Titulo:</b>" +msgstr "<b>Título:</b>" #: glade/pytrainer.glade:1634 msgid "" @@ -321,7 +310,7 @@ #: glade/pytrainer.glade:6180 #: glade/pytrainer.glade:7336 msgid "Versus" -msgstr "Contra" +msgstr "contra" #: glade/pytrainer.glade:1678 msgid "" @@ -347,26 +336,23 @@ #: glade/pytrainer.glade:5518 #: glade/pytrainer.glade:6334 msgid "<b>Calories: </b>" -msgstr "<b>Calorías:</b>" +msgstr "<b>Calorías: </b>" #: glade/pytrainer.glade:1899 #: glade/pytrainer.glade:3612 #: glade/pytrainer.glade:4796 #: glade/pytrainer.glade:5938 #: glade/pytrainer.glade:7066 -#, fuzzy msgid "<b>Max Beats:</b>" -msgstr "<b>Pulsaciones:</b>" +msgstr "<b>Pico pulsaciones:</b>" #: glade/pytrainer.glade:1927 -#, fuzzy msgid "<b>HR Zones Method:</b>" -msgstr "<b>Mes:</b>" +msgstr "<b>Método de cálculo:</b>" #: glade/pytrainer.glade:1956 -#, fuzzy msgid "<b>HR Zone5:</b>" -msgstr "<b>Mes:</b>" +msgstr "<b>Máximo esfuerzo:</b>" #: glade/pytrainer.glade:1984 #: glade/pytrainer.glade:2348 @@ -378,24 +364,20 @@ msgstr "Cal" #: glade/pytrainer.glade:2124 -#, fuzzy msgid "<b>HR Zone4:</b>" -msgstr "<b>Mes:</b>" +msgstr "<b>Anaeróbica:</b>" #: glade/pytrainer.glade:2152 -#, fuzzy msgid "<b>HR Zone3:</b>" -msgstr "<b>Mes:</b>" +msgstr "<b>Aeróbica:</b>" #: glade/pytrainer.glade:2180 -#, fuzzy msgid "<b>HR Zone2:</b>" -msgstr "<b>Mes:</b>" +msgstr "<b>Quemagrasas:</b>" #: glade/pytrainer.glade:2208 -#, fuzzy msgid "<b>HR Zone1:</b>" -msgstr "<b>Mes:</b>" +msgstr "<b>Recuperación:</b>" #: glade/pytrainer.glade:2236 #: glade/pytrainer.glade:2292 @@ -430,9 +412,8 @@ msgstr " " #: glade/pytrainer.glade:2580 -#, fuzzy msgid " <b>Heart Rate:</b>" -msgstr "<b>Fecha:</b>" +msgstr "<b>Pulsaciones:</b>" #: glade/pytrainer.glade:2757 #: glade/pytrainer.glade:8150 @@ -453,9 +434,8 @@ #: glade/pytrainer.glade:4461 #: glade/pytrainer.glade:5603 #: glade/pytrainer.glade:6924 -#, fuzzy msgid "<b>Max Speed:</b>" -msgstr "<b>Nombre:</b>" +msgstr "<b>Velocidad máxima:</b>" #: glade/pytrainer.glade:3388 #: glade/pytrainer.glade:4432 @@ -506,7 +486,6 @@ msgstr " " #: glade/pytrainer.glade:4918 -#, fuzzy msgid " <b>Week:</b>" msgstr "<b>Semana:</b>" @@ -597,26 +576,22 @@ msgstr "" #: glade/pytrainer.glade:7861 -#, fuzzy msgid "Latitude: " msgstr "<b>Latitud:</b>" #: glade/pytrainer.glade:7889 -#, fuzzy msgid " Name:" msgstr "Nombre:" #: glade/pytrainer.glade:7917 -#, fuzzy msgid "Longitude:" msgstr "<b>Longitud:</b>" #: glade/pytrainer.glade:7945 #: glade/pytrainer.glade:13567 #: glade/pytrainer.glade:13890 -#, fuzzy msgid "Description:" -msgstr "<b>Descripcion:</b>" +msgstr "<b>Descripción:</b>" #: glade/pytrainer.glade:8065 msgid "<b> Waypoint: </b>" @@ -632,36 +607,31 @@ #: glade/pytrainer.glade:8363 msgid "New Entry" -msgstr "Nueva Entrada" +msgstr "Nueva entrada" #: glade/pytrainer.glade:8436 -#, fuzzy msgid "Title:" msgstr "Título:" #: glade/pytrainer.glade:8485 -#, fuzzy msgid "GPX File:" -msgstr "Archivo Gpxl" +msgstr "Archivo GPX" #: glade/pytrainer.glade:8555 msgid "Calculate Values" msgstr "Calcular valores" #: glade/pytrainer.glade:8574 -#, fuzzy msgid "Sport:" msgstr "Deporte:" #: glade/pytrainer.glade:8625 -#, fuzzy msgid "<b>Main</b>" -msgstr "<b>Mes:</b>" +msgstr "<b>Principal</b>" #: glade/pytrainer.glade:8686 -#, fuzzy msgid "Distance (Km):" -msgstr "Distancia (Km)" +msgstr "Distancia (Km):" #: glade/pytrainer.glade:8715 #: glade/pytrainer.glade:8912 @@ -669,45 +639,37 @@ #: glade/pytrainer.glade:9439 #: glade/pytrainer.glade:9907 #: glade/pytrainer.glade:12638 -#, fuzzy msgid "Calculate" -msgstr "Calcular Tiempo" +msgstr "Calcular" #: glade/pytrainer.glade:8734 -#, fuzzy msgid "Time:" -msgstr "Tiempo" +msgstr "Tiempo:" #: glade/pytrainer.glade:8932 -#, fuzzy msgid "Date:" -msgstr "Fecha" +msgstr "Fecha:" #: glade/pytrainer.glade:9052 #: glade/pytrainer.glade:12688 -#, fuzzy msgid "<b>General</b>" -msgstr "<b>Media:</b>" +msgstr "<b>General:</b>" #: glade/pytrainer.glade:9113 -#, fuzzy msgid "Max (km/h):" -msgstr "Media (Km/h)" +msgstr "Punta (Km/h)" #: glade/pytrainer.glade:9164 -#, fuzzy msgid "Velocity (km/h)" msgstr "Velocidad (km/h)" #: glade/pytrainer.glade:9239 -#, fuzzy msgid "<b>Velocity</b>" -msgstr "<b>Borrar deporte</b>" +msgstr "<b>Velocidad</b>" #: glade/pytrainer.glade:9275 -#, fuzzy msgid "Quick Entry" -msgstr "Nueva Entrada" +msgstr "Nueva entrada" #: glade/pytrainer.glade:9335 msgid "Max (min/km):" @@ -718,9 +680,8 @@ msgstr "Ritmo (min/km)" #: glade/pytrainer.glade:9462 -#, fuzzy msgid "<b>Pace</b>" -msgstr "<b>Nombre:</b>" +msgstr "<b>Ritmo</b>" #: glade/pytrainer.glade:9523 msgid "Ascent:" @@ -731,7 +692,6 @@ msgstr "Descenso:" #: glade/pytrainer.glade:9630 -#, fuzzy msgid "<b>Accumulated Altitude Change</b>" msgstr "<b>Desnivel acumulado:</b>" @@ -753,12 +713,11 @@ #: glade/pytrainer.glade:9845 msgid "<small><b>Note:</b> In order to calculate the calories you must set the sport MET (in Preferences->Sport) </small>" -msgstr "<small><b>Nota:</a> Para el cálculo de calorías es necesario introducir el valor de MET del deporte (en Preferencias -> Deporte)</small>" +msgstr "<small><b>Nota:</a> para el cálculo de calorías es necesario introducir el valor de MET del deporte (en Preferencias -> Deporte)</small>" #: glade/pytrainer.glade:9962 -#, fuzzy msgid "<b>Heart Rate</b>" -msgstr "<b>Media pulsaciones:</b>" +msgstr "<b>Pulsaciones</b>" #: glade/pytrainer.glade:9998 msgid "Advanced" @@ -769,9 +728,8 @@ msgstr "<b>Comentarios</b>" #: glade/pytrainer.glade:10124 -#, fuzzy msgid "Comments" -msgstr "<b>Comentarios</b>" +msgstr "Comentarios" #: glade/pytrainer.glade:10229 msgid "Preferences" @@ -790,27 +748,22 @@ msgstr "<b>Sistema de medida</b>" #: glade/pytrainer.glade:10411 -#, fuzzy msgid "Database type:" msgstr "Tipo de base de datos" #: glade/pytrainer.glade:10439 -#, fuzzy msgid "Database host:" msgstr "Servidor base de datos" #: glade/pytrainer.glade:10488 -#, fuzzy msgid "Database name:" msgstr "Nombre base de datos" #: glade/pytrainer.glade:10556 -#, fuzzy msgid "Database user:" -msgstr "Usuarios base de datos" +msgstr "Usuario base de datos" #: glade/pytrainer.glade:10584 -#, fuzzy msgid "Database pass:" msgstr "Contraseña base de datos" @@ -824,54 +777,45 @@ #: glade/pytrainer.glade:10769 msgid "<small><b>Note:</b> Change this only if you know what you are doing</small>" -msgstr "<small><b>Nota:</b> Cambie ésto solamente si sabe lo que hace.</small>" +msgstr "<small><b>Nota:</b> cambie esto solamente si sabe lo que hace</small>" #: glade/pytrainer.glade:10801 -#, fuzzy msgid "<b>Port Connnection</b>" -msgstr "<b>Descripción:</b>" +msgstr "<b>Puerto de conexión:</b>" #: glade/pytrainer.glade:10837 -#, fuzzy msgid "General" msgstr "General" #: glade/pytrainer.glade:10890 -#, fuzzy msgid "User name:" -msgstr "Nuevo nombre" +msgstr "Nombre de usuario:" #: glade/pytrainer.glade:10918 -#, fuzzy msgid "Gender:" -msgstr "Género" +msgstr "Género:" #: glade/pytrainer.glade:10964 -#, fuzzy msgid "Height:" -msgstr "Altura" +msgstr "Altura:" #: glade/pytrainer.glade:11035 msgid "Date of birth:" msgstr "Fecha de nacimiento:" #: glade/pytrainer.glade:11147 -#, fuzzy msgid "Weight:" -msgstr "Peso" +msgstr "Peso:" #: glade/pytrainer.glade:11179 -#, fuzzy msgid "<b>Athlete Details</b>" msgstr "<b>Datos personales</b>" #: glade/pytrainer.glade:11208 -#, fuzzy msgid "Athlete" msgstr "Atleta" #: glade/pytrainer.glade:11391 -#, fuzzy msgid "<b>Sport List</b>" msgstr "<b>Lista de deportes:</b>" @@ -882,16 +826,14 @@ #: glade/pytrainer.glade:11500 #: glade/pytrainer.glade:13511 #: glade/pytrainer.glade:14002 -#, fuzzy msgid "Name:" -msgstr "Nombre" +msgstr "Nombre:" #: glade/pytrainer.glade:11528 msgid "M.E.T.:" msgstr "M.E.T.:" #: glade/pytrainer.glade:11577 -#, fuzzy msgid "Extra Weight:" msgstr "Peso extra:" @@ -901,7 +843,6 @@ msgstr "Más información sobre el coeficiente M.E.T. en Wikipedia" #: glade/pytrainer.glade:11755 -#, fuzzy msgid "<b>Add New Sport</b>" msgstr "<b>Añadir nuevo deporte</b>" @@ -918,7 +859,6 @@ "¿Desea continuar?" #: glade/pytrainer.glade:11984 -#, fuzzy msgid "<b>Delete Sport</b>" msgstr "<b>Borrar deporte</b>" @@ -936,12 +876,10 @@ #: glade/pytrainer.glade:12201 #: pytrainer/gui/windowprofile.py:69 -#, fuzzy msgid "Extra Weight" -msgstr "Peso" +msgstr "Peso extra" #: glade/pytrainer.glade:12359 -#, fuzzy msgid "<b>Edit Sport</b>" msgstr "<b>Editar deporte</b>" @@ -968,29 +906,28 @@ #: glade/pytrainer.glade:12609 msgid "<small><b>Note:</b> Maximum heart rate is calculated by subtracting the number 220 minus your age. </small>" -msgstr "<small><b>Nota:</b> EL número máximo de pulsaciones se calcula con la siguiente fórmula: 220 menos su edad. </small>" +msgstr "<small><b>Nota:</b> el número máximo de pulsaciones se calcula con la siguiente fórmula: 220 menos su edad. </small>" #: glade/pytrainer.glade:12748 msgid "<small><b>NOTE:</b> in order to use the Karvonen method you must cover the Resting hr field.</small>" -msgstr "<small><b>NOTE:</b> Rellene todos los campos relativos a pulsaciones para usar el método Karvonen</small>" +msgstr "<small><b>Nota:</b> rellene todos los campos relativos a pulsaciones si usa el método Karvonen</small>" #: glade/pytrainer.glade:12777 msgid "Percentages based method" -msgstr "Metodo basado en porcentajes" +msgstr "Basado en porcentajes" #: glade/pytrainer.glade:12799 #: pytrainer/gui/windowmain.py:254 msgid "Karvonen method" -msgstr "Método Karvonen" +msgstr "Karvonen" #: glade/pytrainer.glade:12821 msgid "Select how to calculate your heart rate zones." -msgstr "Seleccione cómo calcular las zonas de pulsaciones" +msgstr "Seleccione cómo calcular las zonas de frecuencia cardiaca" #: glade/pytrainer.glade:12853 -#, fuzzy msgid "<b>Heart Rate Zones</b>" -msgstr "<b>Pulsaciones:</b>" +msgstr "<b>Zonas de frecuencia cardiaca</b>" #: glade/pytrainer.glade:12889 #: pytrainer/daygraph.py:56 @@ -1005,7 +942,7 @@ #: glade/pytrainer.glade:13196 msgid "Edit Record" -msgstr "Editar Registro" +msgstr "Editar registro" #: glade/pytrainer.glade:13217 msgid "Show graph in classic view" @@ -1025,7 +962,6 @@ #: glade/pytrainer.glade:13539 #: glade/pytrainer.glade:13946 -#, fuzzy msgid "Status:" msgstr "<b>Estado:</b>" @@ -1043,9 +979,8 @@ msgstr "Plugins" #: glade/pytrainer.glade:13833 -#, fuzzy msgid "<b>Plugin Details</b>" -msgstr "<b>Base de datos:</b>" +msgstr "<b>Detalles del plugin:</b>" #: glade/pytrainer.glade:13862 msgid "description-entry " @@ -1068,16 +1003,14 @@ msgstr "¿Borrar este waypoint?" #: pytrainer/gui/windowprofile.py:51 -#, fuzzy msgid "Male" -msgstr "Valor" +msgstr "Varón" #: pytrainer/gui/windowprofile.py:52 msgid "Female" msgstr "Mujer" #: pytrainer/gui/windowprofile.py:69 -#, fuzzy msgid "MET" msgstr "M.E.T." @@ -1116,14 +1049,12 @@ #: pytrainer/gui/windowmain.py:60 #: pytrainer/gui/windowmain.py:674 -#, fuzzy msgid "Title" -msgstr "Titulo" +msgstr "Título" #: pytrainer/gui/windowmain.py:60 #: pytrainer/gui/windowmain.py:675 #: pytrainer/gui/dialogselecttrack.py:40 -#, fuzzy msgid "Date" msgstr "Fecha" @@ -1136,7 +1067,6 @@ #: pytrainer/gui/windowmain.py:60 #: pytrainer/gui/windowmain.py:678 #: pytrainer/extensions/googlemaps.py:91 -#, fuzzy msgid "Time" msgstr "Tiempo" @@ -1158,9 +1088,8 @@ #: pytrainer/gui/windowmain.py:267 #: pytrainer/gui/windowmain.py:366 #: pytrainer/gui/windowmain.py:444 -#, fuzzy msgid "miles" -msgstr "Archivo" +msgstr "millas" #: pytrainer/gui/windowmain.py:159 #: pytrainer/gui/windowmain.py:160 @@ -1196,14 +1125,12 @@ #: pytrainer/gui/windowmain.py:372 #: pytrainer/gui/windowmain.py:450 #: pytrainer/extensions/googlemaps.py:91 -#, fuzzy msgid "km" -msgstr "Km/h" +msgstr "Km" #: pytrainer/gui/windowmain.py:256 -#, fuzzy msgid "Percentages method" -msgstr "Método basado en porcentajes" +msgstr "basado en porcentajes" #: pytrainer/gui/dialogselecttrack.py:40 msgid "Track Name" @@ -1216,9 +1143,8 @@ #: pytrainer/gui/drawArea.py:143 #: pytrainer/extensions/googlemaps.py:89 -#, fuzzy msgid "min" -msgstr "min/km" +msgstr "min" #: pytrainer/gui/windowextensions.py:104 #: pytrainer/gui/windowextensions.py:117 @@ -1226,7 +1152,6 @@ msgstr "Ok" #: pytrainer/lib/gpx.py:90 -#, fuzzy msgid "No Name" msgstr "Nombre" @@ -1279,33 +1204,28 @@ msgstr "Perfil de Etapa" #: pytrainer/daygraph.py:54 -#, fuzzy msgid "Velocity (Km/h)" msgstr "Velocidad (km/h)" #: pytrainer/daygraph.py:54 -#, fuzzy msgid "Velocity" -msgstr "velocidad" +msgstr "Velocidad" #: pytrainer/daygraph.py:56 #: pytrainer/recordgraph.py:85 #: pytrainer/heartrategraph.py:38 -#, fuzzy msgid "Beats (bpm)" msgstr "Media pulsaciones (ppm)" #: pytrainer/recordgraph.py:81 -#, fuzzy msgid "Speed (Km/h)" -msgstr "media (km/h)" +msgstr "Velocidad (km/h)" #: pytrainer/recordgraph.py:81 msgid "Speed" msgstr "Velocidad" #: pytrainer/recordgraph.py:83 -#, fuzzy msgid "Pace (min/km)" msgstr "Ritmo (min/km)" @@ -1319,24 +1239,21 @@ #: pytrainer/monthgraph.py:75 #: pytrainer/monthgraph.py:77 msgid "day" -msgstr "dia" +msgstr "día" #: pytrainer/monthgraph.py:69 #: pytrainer/weekgraph.py:111 -#, fuzzy msgid "Daily Distance" msgstr "Distancia" #: pytrainer/monthgraph.py:71 #: pytrainer/yeargraph.py:72 #: pytrainer/weekgraph.py:113 -#, fuzzy msgid "Time (hours)" msgstr "Tiempo en horas" #: pytrainer/monthgraph.py:71 #: pytrainer/weekgraph.py:113 -#, fuzzy msgid "Daily Time" msgstr "tiempo diario" @@ -1348,26 +1265,22 @@ #: pytrainer/monthgraph.py:73 #: pytrainer/weekgraph.py:115 -#, fuzzy msgid "Daily Average Heart Rate" -msgstr "medias diarias" +msgstr "Pulsaciones diarias" #: pytrainer/monthgraph.py:75 #: pytrainer/yeargraph.py:76 #: pytrainer/weekgraph.py:117 -#, fuzzy msgid "Average Speed (km/h)" -msgstr "media (km/h)" +msgstr "Velocidad media (km/h)" #: pytrainer/monthgraph.py:75 #: pytrainer/weekgraph.py:117 -#, fuzzy msgid "Daily Average Speed" msgstr "medias diarias" #: pytrainer/monthgraph.py:77 #: pytrainer/weekgraph.py:119 -#, fuzzy msgid "Daily Calories" msgstr "calorias diarias" @@ -1388,27 +1301,22 @@ msgstr "mes" #: pytrainer/yeargraph.py:70 -#, fuzzy msgid "Monthly Distance" msgstr "Distancia" #: pytrainer/yeargraph.py:72 -#, fuzzy msgid "Monthly Time" msgstr "tiempo mensual" #: pytrainer/yeargraph.py:74 -#, fuzzy msgid "Monthly Average Heart Rate" -msgstr "medias mensuales" +msgstr "Pulsaciones medias mensuales" #: pytrainer/yeargraph.py:76 -#, fuzzy msgid "Monthly Average Speed" msgstr "medias mensuales" #: pytrainer/yeargraph.py:78 -#, fuzzy msgid "Monthly Calories" msgstr "calorias mensuales" Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot =================================================================== --- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot 2009-12-04 19:46:35 UTC (rev 422) +++ pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.pot 2009-12-04 21:17:28 UTC (rev 423) @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-04 20:21+0100\n" -"PO-Revision-Date: 2009-12-04 20:21+0100\n" +"POT-Creation-Date: 2009-12-04 21:22+0100\n" +"PO-Revision-Date: 2009-12-04 21:22+0100\n" "Last-Translator: David Garca Granda <dg...@gm...>\n" "Language-Team: Spanish\n" "MIME-Version: 1.0\n" Modified: pytrainer/trunk/messages.pot =================================================================== --- pytrainer/trunk/messages.pot 2009-12-04 19:46:35 UTC (rev 422) +++ pytrainer/trunk/messages.pot 2009-12-04 21:17:28 UTC (rev 423) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-04 20:21+0100\n" +"POT-Creation-Date: 2009-12-04 21:22+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-12-05 13:16:46
|
Revision: 424 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=424&view=rev Author: dgranda Date: 2009-12-05 13:16:37 +0000 (Sat, 05 Dec 2009) Log Message: ----------- Minor changes to spanish translation. Credits updated Modified Paths: -------------- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer.mo pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po pytrainer/trunk/pytrainer/gui/aboutdialog.py Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer.mo =================================================================== (Binary files differ) Modified: pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po =================================================================== --- pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2009-12-04 21:17:28 UTC (rev 423) +++ pytrainer/trunk/locale/es/LC_MESSAGES/pytrainer_es.po 2009-12-05 13:16:37 UTC (rev 424) @@ -8,7 +8,7 @@ "Project-Id-Version: vud 1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-12-04 21:22+0100\n" -"PO-Revision-Date: 2009-12-04 22:14+0100\n" +"PO-Revision-Date: 2009-12-05 14:06+0100\n" "Last-Translator: David García Granda <dg...@gm...>\n" "Language-Team: Spanish <es...@li...>\n" "MIME-Version: 1.0\n" @@ -170,9 +170,8 @@ #: glade/pytrainer.glade:1145 #: pytrainer/gui/windowmain.py:171 #: pytrainer/gui/windowmain.py:172 -#, fuzzy msgid "m" -msgstr "km" +msgstr "m" #: glade/pytrainer.glade:780 msgid " " @@ -954,7 +953,7 @@ #: glade/pytrainer.glade:13455 msgid "<b>Extension Details</b>" -msgstr "<b>Detalles de la Extensión</b>" +msgstr "<b>Detalles de la extensión</b>" #: glade/pytrainer.glade:13483 msgid "name-entry" @@ -963,7 +962,7 @@ #: glade/pytrainer.glade:13539 #: glade/pytrainer.glade:13946 msgid "Status:" -msgstr "<b>Estado:</b>" +msgstr "Estado:" #: glade/pytrainer.glade:13595 #: glade/pytrainer.glade:13918 @@ -988,7 +987,7 @@ #: glade/pytrainer.glade:13974 msgid "nameEntry" -msgstr "Nueva Entrada" +msgstr "Nombre entrada" #: glade/pytrainer.glade:14145 msgid "Select track record" @@ -1018,14 +1017,13 @@ #: pytrainer/gui/windowplugins.py:97 #: pytrainer/gui/windowextensions.py:70 msgid "Enable" -msgstr "Habilitar" +msgstr "Activo" #: pytrainer/gui/windowplugins.py:72 #: pytrainer/gui/windowplugins.py:96 #: pytrainer/gui/windowextensions.py:72 -#, fuzzy msgid "Disable" -msgstr "Distancia" +msgstr "Desactivo" #: pytrainer/gui/windowplugins.py:81 #: pytrainer/gui/windowextensions.py:81 @@ -1110,15 +1108,13 @@ #: pytrainer/gui/windowmain.py:370 #: pytrainer/gui/windowmain.py:447 #: pytrainer/gui/windowmain.py:448 -#, fuzzy msgid "min/mile" -msgstr "min/km" +msgstr "min/milla" #: pytrainer/gui/windowmain.py:163 #: pytrainer/gui/windowmain.py:164 -#, fuzzy msgid "feet" -msgstr "borrar" +msgstr "pies" #: pytrainer/gui/windowmain.py:166 #: pytrainer/gui/windowmain.py:273 @@ -1153,7 +1149,7 @@ #: pytrainer/lib/gpx.py:90 msgid "No Name" -msgstr "Nombre" +msgstr "Sin nombre" #: pytrainer/lib/gpx.py:97 msgid "No Data" @@ -1255,7 +1251,7 @@ #: pytrainer/monthgraph.py:71 #: pytrainer/weekgraph.py:113 msgid "Daily Time" -msgstr "tiempo diario" +msgstr "Tiempo diario" #: pytrainer/monthgraph.py:73 #: pytrainer/yeargraph.py:74 @@ -1282,7 +1278,7 @@ #: pytrainer/monthgraph.py:77 #: pytrainer/weekgraph.py:119 msgid "Daily Calories" -msgstr "calorias diarias" +msgstr "Calorías diarias" #: pytrainer/waypoint.py:80 msgid "The gpx file seems to be a several days records. Perhaps you will need to edit your gpx file" @@ -1306,7 +1302,7 @@ #: pytrainer/yeargraph.py:72 msgid "Monthly Time" -msgstr "tiempo mensual" +msgstr "Tiempo mensual" #: pytrainer/yeargraph.py:74 msgid "Monthly Average Heart Rate" @@ -1318,7 +1314,7 @@ #: pytrainer/yeargraph.py:78 msgid "Monthly Calories" -msgstr "calorias mensuales" +msgstr "Calorías mensuales" #~ msgid "None" #~ msgstr "Ninguno" Modified: pytrainer/trunk/pytrainer/gui/aboutdialog.py =================================================================== --- pytrainer/trunk/pytrainer/gui/aboutdialog.py 2009-12-04 21:17:28 UTC (rev 423) +++ pytrainer/trunk/pytrainer/gui/aboutdialog.py 2009-12-05 13:16:37 UTC (rev 424) @@ -33,7 +33,7 @@ def run(self): authors = ["Fiz Vázquez <vu...@si...>\nDavid García Granda <dg...@gm...>\nJohn Blance <joh...@gm...>\n\n-Package maintainers:\n\nRedHat/Fedora: Douglas E. Warner <sil...@si...>\nDebian: Noèl Köthe <no...@de...>\nUbuntu: Kevin Dwyer <ke...@ph...>, Alessio Treglia <qua...@ub...>"] - translator_credits = "Basque: Jabier Santamaria <men...@gm...>\nCatalan: Eloi Crespillo Itchart <el...@ik...>\nCzech: Lobus Pokorny <sp...@se...>\nFrench: Dj <dj...@dj...>, Pierre Gaigé <pg...@fr...>\nNorwegian: Havard Davidsen <hav...@gm...>\nPolish: Seweryn Kokot <sk...@po...>\nGerman: Aleks <al...@sc...>, Noèl Köthe <no...@de...>\nSpanish: Fiz Vázquez <vu...@si...>" + translator_credits = "Basque: Jabier Santamaria <men...@gm...>\nCatalan: Eloi Crespillo Itchart <el...@ik...>\nCzech: Lobus Pokorny <sp...@se...>\nFrench: Dj <dj...@dj...>, Pierre Gaigé <pg...@fr...>\nNorwegian: Havard Davidsen <hav...@gm...>\nPolish: Seweryn Kokot <sk...@po...>\nGerman: Aleks <al...@sc...>, Noèl Köthe <no...@de...>\nSpanish: Fiz Vázquez <vu...@si...>, David García Granda <dg...@gm...>" license = "PyTrainer - The free sport tracking center\nCopyright (C) 2005-09 Fiz Vázquez\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA" about_dialog = gtk.AboutDialog() about_dialog.set_destroy_with_parent(True) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dg...@us...> - 2009-12-06 12:37:23
|
Revision: 427 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=427&view=rev Author: dgranda Date: 2009-12-06 12:37:13 +0000 (Sun, 06 Dec 2009) Log Message: ----------- Updating changelog, package dependencies and official version to 1.7.0 Modified Paths: -------------- pytrainer/trunk/CHANGES pytrainer/trunk/INSTALL pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/CHANGES =================================================================== --- pytrainer/trunk/CHANGES 2009-12-06 11:43:09 UTC (rev 426) +++ pytrainer/trunk/CHANGES 2009-12-06 12:37:13 UTC (rev 427) @@ -1,20 +1,23 @@ - PyTrainer changes for 1.7.0: +Updated Spanish translation (svn rev 420,423,424) +Updated French translation (svn rev 421) +Migration to lxml for better performance (svn rev 412,413,414) +Start of rework for Google Map rendering - experimental!, test with --gmaps3 at startup (svn 411,415) Modified on_sportlist_changed event to improve performance (svn rev 409) Fix for minor bug in translation scripts (svn rev 402) Fix for bug #2811470 - clickable link for further details on MET (links to wikipedia) (svn rev 391) -Fix for bug #2089342 auto refresh after import, edit and delete of records (svn rev 390) -Refactoring database and config file sanity checks (triggered with --check) (svn rev 389,392,396,401) -Added weekly view (svn rev 388,393,394,395,398,403-410) +Fix for bug #2089342 auto refresh after import, edit and delete of records (svn rev 390,425) +Refactoring database and config file sanity checks (triggered with --check at startup) (svn rev 389,392,396,401) +Added weekly view (svn rev 388,393,394,395,398,403-410,426) Fix for multiple graphs view (svn rev 386,387) Better error handling preventing pytrainer to crash (svn rev 364,369) -Support for plugin validation (svn rev 361,363,371) +Support for plugin validation (triggered with --valid at startup)(svn rev 361,363,371) Import TCXv2 files (svn rev 351,355,356) Improving import from TCXv1 format (svn rev 354,371,375,376) -Several improvements in plugins handling (svn rev 350,353,360,378) +Several improvements in plugins handling (svn rev 350,353,360,378,422) Import GPX files (svn rev 349) - - PyTrainer tasks for 1.6.0.9: Added dynamic loading and unloading of plugin menu items (svn rev 344) Modified: pytrainer/trunk/INSTALL =================================================================== --- pytrainer/trunk/INSTALL 2009-12-06 11:43:09 UTC (rev 426) +++ pytrainer/trunk/INSTALL 2009-12-06 12:37:13 UTC (rev 427) @@ -7,29 +7,24 @@ 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 10 package revisions as of 24.03.2009 for 1.6.0.7) +1.1.- Working packages (Fedora 12 package revisions as of 2009.12.06 for 1.7.0) -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.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-27 +python-2.6.2-2 +python-matplotlib-0.98.5.2-5 +gnome-python2-gtkmozembed-2.25.3-13 +pygtk2-libglade-2.16.0-1.fc12.i686 +pygtk2-2.16.0-1.fc12.i686 +SOAPpy-0.11.6-10.fc12.noarch +python-lxml-2.2.3-1 +libxml2-python-2.7.6-1 +libxml2-2.7.6-1 +libxslt-python-1.1.26-1 +libxslt-1.1.26-1 +sqlite-3.6.20-1 (sqlite is preferred as db than mysql) gpsbabel-1.3.5-1 +xulrunner-1.9.1.5-1 +firefox-3.5.5-1 -(additional packages from 1.7.0 onwards) -python-lxml -libxml2 -libxslt - -1.2.- Optional packages (Google Maps integration) - -xulrunner-1.9.0.7-1 -firefox-3.0.7-1 - 2.- Installation process Copy the tarball file to a location where you have write and execution rights. Make sure executables are under your $PATH. Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-06 11:43:09 UTC (rev 426) +++ pytrainer/trunk/pytrainer/main.py 2009-12-06 12:37:13 UTC (rev 427) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0pre" + self.version ="1.7.0" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-14 06:51:15
|
Revision: 430 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=430&view=rev Author: jblance Date: 2009-12-14 06:51:05 +0000 (Mon, 14 Dec 2009) Log Message: ----------- Initial Garmintools dump file import plugin code commit Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/gpx.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/plugins.py Added Paths: ----------- pytrainer/trunk/plugins/garmintools/ pytrainer/trunk/plugins/garmintools/conf.xml pytrainer/trunk/plugins/garmintools/garmintools.py pytrainer/trunk/plugins/garmintools/translate.xsl Added: pytrainer/trunk/plugins/garmintools/conf.xml =================================================================== --- pytrainer/trunk/plugins/garmintools/conf.xml (rev 0) +++ pytrainer/trunk/plugins/garmintools/conf.xml 2009-12-14 06:51:05 UTC (rev 430) @@ -0,0 +1,10 @@ +<?xml version="1.0" ?> +<pytrainer-plugin + name="Garmintools dump file import" + description="Import your records from a dump file generated by Garmintools" + plugincode="garmintools" + pluginbutton="Import from file: Garmintools dump" + executable="garmintools" +> +<conf-values variable="Force_sport_to" value=""/> +</pytrainer-plugin> Added: pytrainer/trunk/plugins/garmintools/garmintools.py =================================================================== --- pytrainer/trunk/plugins/garmintools/garmintools.py (rev 0) +++ pytrainer/trunk/plugins/garmintools/garmintools.py 2009-12-14 06:51:05 UTC (rev 430) @@ -0,0 +1,129 @@ +# -*- coding: iso-8859-1 -*- + +#Copyright (C) Fiz Vazquez vu...@si... +# Modified by dgranda + +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. + +#This program 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 General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import logging +import os +import StringIO +from lxml import etree +from lib.xmlUtils import XMLParser + +from gui.dialogs import fileChooserDialog, guiFlush + +class garmintools(): + def __init__(self, parent = None, validate=False): + self.parent = parent + self.tmpdir = self.parent.conf.getValue("tmpdir") + self.data_path = os.path.dirname(__file__) + self.validate = validate + self.sport = self.getConfValue("Force_sport_to") + + def getConfValue(self, confVar): + info = XMLParser(self.data_path+"/conf.xml") + code = info.getValue("pytrainer-plugin","plugincode") + plugindir = self.parent.conf.getValue("plugindir") + if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): + value = None + else: + info = XMLParser(plugindir+"/"+code+"/conf.xml") + value = info.getValue("pytrainer-plugin",confVar) + return value + + def run(self): + logging.debug(">>") + # able to select multiple files.... + selectedFiles = fileChooserDialog(title="Choose a garmintools dump file (or files) to import", multiple=True).getFiles() + guiFlush() + importfiles = [] + if not selectedFiles: #Nothing selected + return importfiles + for filename in selectedFiles: + if self.valid_input_file(filename): + #Garmin dump files are not valid xml - need to load into a xmltree + #read file into string + with open(filename, 'r') as f: + xmlString = f.read() + fileString = StringIO.StringIO("<root>"+xmlString+"</root>") + #parse string as xml + tree = etree.parse(fileString) + if not self.inDatabase(tree): + sport = self.getSport(tree) + gpxfile = "%s/garmintools-%d.gpx" % (self.tmpdir, len(importfiles)) + self.createGPXfile(gpxfile, tree) + importfiles.append((gpxfile, sport)) + else: + logging.debug("%s already in database. Skipping import." % (filename,) ) + else: + logging.info("File %s failed validation" % (filename)) + logging.debug("<<") + return importfiles + + def valid_input_file(self, filename): + """ Function to validate input file if requested""" + if not self.validate: #not asked to validate + logging.debug("Not validating %s" % (filename) ) + return True + else: + print "Cannot validate garmintools dump files yet" + logging.debug("Cannot validate garmintools dump files yet") + return True + '''xslfile = os.path.realpath(self.parent.parent.data_path)+ "/schemas/GarminTrainingCenterDatabase_v2.xsd" + from lib.xmlValidation import xmlValidator + validator = xmlValidator() + return validator.validateXSL(filename, xslfile)''' + + def inDatabase(self, tree): + #comparing date and start time (sport may have been changed in DB after import) + time = self.detailsFromFile(tree) + if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)): + return True + else: + return False + + def getSport(self, tree): + #return sport from file or overide if present + if self.sport: + return self.sport + root = tree.getroot() + sportElement = root.find(".//run") + try: + sport = sportElement.get("sport") + except: + sport = "import" + print sport + return sport + + def detailsFromFile(self, tree): + root = tree.getroot() + #Find first point + pointElement = root.find(".//point") + if pointElement is not None: + #Try to get time from point + time = pointElement.get("time") + print "TODO first time is different from time used by gpsbabel and has locale embedded" + time + return time + return None + + def createGPXfile(self, gpxfile, tree): + """ Function to transform a Garmintools dump file to a valid GPX+ file + """ + xslt_doc = etree.parse(self.data_path+"/translate.xsl") + transform = etree.XSLT(xslt_doc) + result_tree = transform(tree) + result_tree.write(gpxfile, xml_declaration=True) + Added: pytrainer/trunk/plugins/garmintools/translate.xsl =================================================================== --- pytrainer/trunk/plugins/garmintools/translate.xsl (rev 0) +++ pytrainer/trunk/plugins/garmintools/translate.xsl 2009-12-14 06:51:05 UTC (rev 430) @@ -0,0 +1,51 @@ +<?xml version="1.0"?> + +<!-- note defining a namespace for TrainingCenterDatabase as the translation does not seem to work with a default namespace --> +<xsl:stylesheet version="1.0" +xmlns:t="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> +<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> + +<!-- this is a bit of a messy way to get whitespace into the output - but it works --> +<xsl:variable name="newline"><xsl:text> +</xsl:text></xsl:variable> + +<xsl:template match="/"> + <gpx creator="pytrainer http://sourceforge.net/projects/pytrainer" version="1.1" + xmlns="http://www.topografix.com/GPX/1/1" + xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" > + + <xsl:value-of select="$newline"/> + <xsl:variable name="sport"><xsl:value-of select="root/run/@sport"/></xsl:variable> + <xsl:variable name="time"><xsl:value-of select="root/point/@time"/></xsl:variable> + <xsl:variable name="name"><xsl:value-of select="$sport"/><xsl:value-of select="substring($time, 1,10)"/></xsl:variable> + <metadata><xsl:value-of select="$newline"/> + <name><xsl:value-of select="$name"/></name><xsl:value-of select="$newline"/> + <link href="http://sourceforge.net/projects/pytrainer"/><xsl:value-of select="$newline"/> + <time><xsl:value-of select="$time"/></time><xsl:value-of select="$newline"/> + </metadata><xsl:value-of select="$newline"/> + <trk><xsl:value-of select="$newline"/> + <trkseg><xsl:value-of select="$newline"/> + <!-- <xsl:variable name="calories"><xsl:value-of select="t:Calories"/></xsl:variable> --> + <xsl:for-each select="root/point"> + <xsl:if test="@lat"> <!-- only write trkpt if lat/lon exist --> + <xsl:variable name="lat"><xsl:value-of select="@lat"/></xsl:variable> + <xsl:variable name="lon"><xsl:value-of select="@lon"/></xsl:variable> + <trkpt lat="{$lat}" lon="{$lon}"><xsl:value-of select="$newline"/> + <ele><xsl:value-of select="@alt"/></ele><xsl:value-of select="$newline"/> + <time><xsl:value-of select="@time"/></time><xsl:value-of select="$newline"/> + <xsl:if test="@hr"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:hr><xsl:value-of select="@hr"/></gpxdata:hr><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> + </trkpt><xsl:value-of select="$newline"/> + </xsl:if> + </xsl:for-each> + <xsl:value-of select="$newline"/> + </trkseg><xsl:value-of select="$newline"/> + </trk><xsl:value-of select="$newline"/> + </gpx><xsl:value-of select="$newline"/> +</xsl:template> +</xsl:stylesheet> Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-07 18:36:16 UTC (rev 429) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-14 06:51:05 UTC (rev 430) @@ -27,11 +27,7 @@ from datetime import datetime import logging from xmlUtils import XMLParser -#import xml.dom -#from xml.dom import minidom, Node, getDOMImplementation -#import xml.etree.cElementTree from lxml import etree -#from gtrnctr2gpx import gtrnctr2gpx # copied to pytrainer/lib/ directory # use of namespaces is mandatory if defined mainNS = string.Template(".//{http://www.topografix.com/GPX/1/1}$tag") @@ -91,13 +87,31 @@ timeResult = trk.find(timeTag) if timeResult is not None: time_ = timeResult.text # check timezone - mk_time = time.strptime(time_, "%Y-%m-%dT%H:%M:%SZ") + mk_time = self.geDatetTime(time_) time_ = time.strftime("%Y-%m-%d", mk_time) else: time_ = _("No Data") logging.debug("name: "+name+" | time: "+time_) tracks.append((name,time_)) return tracks + + def getDateTime(self, time_): + try: + theTime = datetime.strptime(time_, "%Y-%m-%dT%H:%M:%SZ") + return theTime + except: + pass + try: + #Time includes UTC offset... + #2009-12-02T12:58:55+01:00 + #TODO Need to sort time offset etc.... + offset = time_[-6:] + time_ = time_[:-6] #remove last 6 chars - ie UTC offset eg +01:00 + theTime = datetime.strptime(time_, "%Y-%m-%dT%H:%M:%S") + return theTime + except: + pass + return None def getUnevenness(self): return self.upositive,self.unegative @@ -116,7 +130,7 @@ lapInfo = [] tree = self.tree date = tree.findtext(timeTag) - startTime = datetime.strptime(date, "%Y-%m-%dT%H:%M:%SZ") + startTime = self.getDateTime(date) trksegs = tree.findall(trackSegTag) for trkseg in trksegs: trkpts = trkseg.findall(trackPointTag) @@ -124,7 +138,7 @@ lat = trkpt.get("lat") lon = trkpt.get("lon") temp = trkpt.findtext(timeTag) - time = datetime.strptime(temp, "%Y-%m-%dT%H:%M:%SZ") + time = self.getDateTime(temp) elapsedTime = time - startTime #print "Found time: %s, lat: %s lon: %s" % (elapsedTime, lat, lon) lapInfo.append((elapsedTime, lat, lon)) @@ -158,12 +172,14 @@ return retorno date_ = tree.find(timeTag).text - mk_time = time.strptime(date_, "%Y-%m-%dT%H:%M:%SZ") - self.date = time.strftime("%Y-%m-%d", mk_time) + mk_time = self.getDateTime(date_) + self.date = mk_time.strftime("%Y-%m-%d") for trkpoint in trkpoints: lat = trkpoint.get("lat") lon = trkpoint.get("lon") + if lat is None or lat == "" or lon is None or lon == "": + continue #get the heart rate value from the gpx extended format file hrResult = trkpoint.find(hrTag) if hrResult is not None: @@ -171,17 +187,24 @@ len_validhrpoints += 1 else: hr = 0 + #get the cadence (if present) + #TODO + #get the time timeResult = trkpoint.find(timeTag) if timeResult is not None: - time_ = timeResult.text - mk_time = time.strptime(time_, "%Y-%m-%dT%H:%M:%SZ") - time_ = time.mktime(mk_time) + date_ = timeResult.text + mk_time = self.getDateTime(date_) + time_ = time.mktime(mk_time.timetuple()) #Convert date to seconds else: time_ = 1 + #get the elevation ele = trkpoint.find(elevationTag).text #chequeamos que la altura sea correcta / check that the height is correct - if len(ele)<15: - tmp_alt = int(float(ele)) + if ele is not None: + if len(ele)<15: + tmp_alt = int(float(ele)) + else: + tmp_alt= 0 #evitamos los puntos blancos / we avoid the white points if (float(lat) < -0.000001) or (float(lat) > 0.0000001): @@ -255,7 +278,8 @@ Retrieves start time from a given gpx file args: - gpxFile: path to xml file (gpx format) - returns: string with start time - 2008-03-22T12:17:43Z""" + returns: string with start time - 2008-03-22T12:17:43Z or 2009-12-02T12:58:55+01:00 + """ logging.debug(">>") date_time = self.tree.find(timeTag) #returns first instance found if date_time is None: @@ -264,20 +288,4 @@ logging.debug(gpxFile+" | "+ date_time.text) logging.debug("<<") return date_time.text - - #TODO Pending removal - ''' - def retrieveDataFromGTRNCTR(self, gtrnctrFile, entry): - """23.03.2008 - dgranda - Builds a new GPX file based on one entry from GPS (dates matching) - args: - - gtrnctrFile: path of file with data from GPS file (garmin format) - - entry: list with dictionaries: SPORT|DATE_START_TIME - returns: path to new GPX file""" - logging.debug('>>') - xmlParser = XMLParser(gtrnctrFile) - selectedEntry = xmlParser.getTrackFromDates(gtrnctrFile,entry,0) - newGPXEntry = self.conf.tmpdir + "/new_entry.gpx" - gtrnctr2gpx(selectedEntry, newGPXEntry) - logging.debug('<<') - return newGPXEntry ''' + Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-07 18:36:16 UTC (rev 429) +++ pytrainer/trunk/pytrainer/main.py 2009-12-14 06:51:05 UTC (rev 430) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0" + self.version ="1.7.0_svn#430" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? Modified: pytrainer/trunk/pytrainer/plugins.py =================================================================== --- pytrainer/trunk/pytrainer/plugins.py 2009-12-07 18:36:16 UTC (rev 429) +++ pytrainer/trunk/pytrainer/plugins.py 2009-12-14 06:51:05 UTC (rev 430) @@ -106,7 +106,7 @@ name = plugininfo.getValue("pytrainer-plugin","name") description = plugininfo.getValue("pytrainer-plugin","description") pluginsList.append((pluginsdir+"/"+plugin,name,description)) - + pluginsList.sort() return pluginsList def getPluginInfo(self,pathPlugin): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-14 07:03:39
|
Revision: 431 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=431&view=rev Author: jblance Date: 2009-12-14 07:03:28 +0000 (Mon, 14 Dec 2009) Log Message: ----------- Capitalise sport retrieved from import file Modified Paths: -------------- pytrainer/trunk/plugins/garmintools/garmintools.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/plugins/garmintools/garmintools.py =================================================================== --- pytrainer/trunk/plugins/garmintools/garmintools.py 2009-12-14 06:51:05 UTC (rev 430) +++ pytrainer/trunk/plugins/garmintools/garmintools.py 2009-12-14 07:03:28 UTC (rev 431) @@ -103,6 +103,7 @@ sportElement = root.find(".//run") try: sport = sportElement.get("sport") + sport = sport.capitalize() except: sport = "import" print sport Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-14 06:51:05 UTC (rev 430) +++ pytrainer/trunk/pytrainer/main.py 2009-12-14 07:03:28 UTC (rev 431) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#430" + self.version ="1.7.0_svn#431" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-12-14 07:40:16
|
Revision: 432 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=432&view=rev Author: jblance Date: 2009-12-14 07:40:08 +0000 (Mon, 14 Dec 2009) Log Message: ----------- Added cadence (rpm) support to record graph and tcxv2 plugin Modified Paths: -------------- pytrainer/trunk/glade/pytrainer.glade pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl pytrainer/trunk/pytrainer/gui/windowmain.py pytrainer/trunk/pytrainer/lib/gpx.py pytrainer/trunk/pytrainer/main.py pytrainer/trunk/pytrainer/recordgraph.py Modified: pytrainer/trunk/glade/pytrainer.glade =================================================================== --- pytrainer/trunk/glade/pytrainer.glade 2009-12-14 07:03:28 UTC (rev 431) +++ pytrainer/trunk/glade/pytrainer.glade 2009-12-14 07:40:08 UTC (rev 432) @@ -1634,7 +1634,8 @@ <property name="items" translatable="yes">Profile Speed Pace -Heart Rate</property> +Heart Rate +Cadence</property> <property name="add_tearoffs">False</property> <property name="has_frame">True</property> <property name="focus_on_click">True</property> @@ -1680,6 +1681,7 @@ Speed Pace Heart Rate +Cadence </property> <property name="add_tearoffs">False</property> <property name="has_frame">True</property> Modified: pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl =================================================================== --- pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl 2009-12-14 07:03:28 UTC (rev 431) +++ pytrainer/trunk/plugins/garmin-tcxv2/translate.xsl 2009-12-14 07:40:08 UTC (rev 432) @@ -42,6 +42,11 @@ <gpxdata:hr><xsl:value-of select="t:HeartRateBpm/t:Value"/></gpxdata:hr><xsl:value-of select="$newline"/> </extensions><xsl:value-of select="$newline"/> </xsl:if> + <xsl:if test="t:Cadence"> + <extensions><xsl:value-of select="$newline"/> + <gpxdata:cadence><xsl:value-of select="t:Cadence"/></gpxdata:cadence><xsl:value-of select="$newline"/> + </extensions><xsl:value-of select="$newline"/> + </xsl:if> </trkpt><xsl:value-of select="$newline"/> </xsl:if> </xsl:for-each> Modified: pytrainer/trunk/pytrainer/gui/windowmain.py =================================================================== --- pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-14 07:03:28 UTC (rev 431) +++ pytrainer/trunk/pytrainer/gui/windowmain.py 2009-12-14 07:40:08 UTC (rev 432) @@ -19,6 +19,7 @@ import sys import logging import datetime +import matplotlib from SimpleGladeApp import * from popupmenu import PopupMenu @@ -227,6 +228,15 @@ if len(record_list)>0: self.record_vbox.set_sensitive(1) else: + #Remove graph + vboxChildren = self.record_vbox.get_children() + logging.debug('Vbox has %d children %s' % (len(vboxChildren), str(vboxChildren) )) + # ToDo: check why vertical container is shared + for child in vboxChildren: + #Remove all FigureCanvasGTK and NavigationToolbar2GTKAgg to stop double ups of graphs + if isinstance(child, matplotlib.backends.backend_gtkagg.FigureCanvasGTK) or isinstance(child, matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg): + logging.debug('Removing child: '+str(child)) + self.record_vbox.remove(child) self.record_vbox.set_sensitive(0) #logging.debug("Going to draw "+str(record_list)) self.drawarearecord.drawgraph(record_list) Modified: pytrainer/trunk/pytrainer/lib/gpx.py =================================================================== --- pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-14 07:03:28 UTC (rev 431) +++ pytrainer/trunk/pytrainer/lib/gpx.py 2009-12-14 07:40:08 UTC (rev 432) @@ -42,6 +42,7 @@ gpxdataNS = string.Template(".//{http://www.cluetrust.com/XML/GPXDATA/1/0}$tag") calorieTag = gpxdataNS.substitute(tag="calories") hrTag = gpxdataNS.substitute(tag="hr") +cadTag = gpxdataNS.substitute(tag="cadence") class Gpx: def __init__(self, data_path = None, filename = None, trkname = None): @@ -188,7 +189,12 @@ else: hr = 0 #get the cadence (if present) - #TODO + #TODO + cadResult = trkpoint.find(cadTag) + if cadResult is not None: + cadence = int(cadResult.text) + else: + cadence = 0 #get the time timeResult = trkpoint.find(timeTag) if timeResult is not None: @@ -238,7 +244,7 @@ if vel>self.maxvel: self.maxvel=vel self.total_time += time_ - retorno.append((total_dist,tmp_alt, self.total_time,vel,lat,lon,hr)) #Could add rpm here + retorno.append((total_dist,tmp_alt, self.total_time,vel,lat,lon,hr,cadence)) rel_alt = tmp_alt - last_alt #Could allow for some 'jitter' in height here if rel_alt > 0: self.upositive += rel_alt Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2009-12-14 07:03:28 UTC (rev 431) +++ pytrainer/trunk/pytrainer/main.py 2009-12-14 07:40:08 UTC (rev 432) @@ -97,7 +97,7 @@ def __init__(self,filename = None, data_path = None): logging.debug('>>') self.data_path = data_path - self.version ="1.7.0_svn#431" + self.version ="1.7.0_svn#432" self.date = Date() main_dir = os.path.realpath(os.path.dirname(__file__)) #why? sys.path.insert(0, main_dir) #why? Modified: pytrainer/trunk/pytrainer/recordgraph.py =================================================================== --- pytrainer/trunk/pytrainer/recordgraph.py 2009-12-14 07:03:28 UTC (rev 431) +++ pytrainer/trunk/pytrainer/recordgraph.py 2009-12-14 07:40:08 UTC (rev 432) @@ -79,10 +79,12 @@ return _("Distance (km)"),_("Height (m)"),_("Stage Profile"),"#ff0000" if value == 1: return _("Distance (km)"),_("Speed (Km/h)"),_("Speed"),"#00ff00" - if value == 2: - return _("Distance (km)"),_("Pace (min/km)"),_("Pace"),"#0000ff" - if value == 3: - return _("Distance (km)"),_("Beats (bpm)"),_("Heart Rate"),"#ff0000" + if value == 2: + return _("Distance (km)"),_("Pace (min/km)"),_("Pace"),"#0000ff" + if value == 3: + return _("Distance (km)"),_("Beats (bpm)"),_("Heart Rate"),"#ff0000" + if value == 4: + return _("Distance (km)"),_("Cadence (rpm)"),_("Cadence"),"#ff0000" def get_values(self,values, value_selected): @@ -97,11 +99,13 @@ yvalue.append(value[3]) if value_selected==2: try: - yvalue.append(60/value[3]) + yvalue.append(60/value[3]) except: - yvalue.append(0) + yvalue.append(0) if value_selected==3: - yvalue.append(value[6]) + yvalue.append(value[6]) + if value_selected==4: + yvalue.append(value[7]) logging.debug("<<") return xvalue,yvalue This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |