Le 18/07/2011 13:13, Werner van Staden a écrit : > On Mon, 2011-07-18 at 09:59 +0200, Vincent wrote: >> Le 17/07/2011 22:02, David García Granda a écrit : >>> This sounds like a sensible change. I'm not sure that activity types >>>>> should be editable though since it will mean data specific to activity >>>>> types will be stored in a name/value pair table. A predetermined set >>>>> of activity types would make for a better schema. >>>>> >>>> I agree. I had run into exactly the dilemma you mention - user created >>>> activity types would pose the problem of associating appropriate labels >>>> and DB fields. Whilst reviewing my code last night I realized that I had >>>> abandoned the editable activity types at some point and opted for >>>> hard-coded categories instead: Resistive, Cardio-Vascular & Weights. >>>> >>>> Regarding these new categories - for the sake of agreeing on a term - >>>> shall we use 'categories' or 'activity types'? Also, the official >>>> Pytrainer description refers to 'Resistive' sports. Do we want to keep >>>> this as the activity type/category for cycling, running, etc, or would a >>>> term such as 'geo-spacial', 'cross-country' or 'distance-based' be >>>> preferred? Please comment. >>>> >> Hi, >> I'm not sure but the "user created activity types" seems to be useful >> according Pytrainer categories with CSV imports, GPX imports... >> I remember I explored source code to do my own "GPX import" for >> SportsTracker and the categorie seems to be selected from import files >> if "forced_to" is unchecked. >> > Well, I've written the code, made an additional MySQL table and created > the additional notebook tab in the 'Preferences' dialog. So the > functionality exists for a user to specify custom categories. However, > this will have to be adapted to the use-case you describe above. The > 'Sports Categories' (activity types) being discussed in the top > paragraph will have to be hard coded (and not user specified) so that > the GUI can ask the user for sensible data for, say, Weight training and > for sensible data when creating a new Cardio-Vascular activity record. I > hope my explanation makes sense. > Yes, it is. (I d'ont speak english : It's hard to understand and to write in english but I try :-)
My question was about "hard-coded sports categories". I began with "I'm not sure" because I used an old version with modified "gpx file import" (myself : you can see old thread about nokia import). Now, I downloaded the oldest svn version (#816).The "garmin gpx file import" doesn't use the name of the sport in the gpx file (according with "Sports Categories"). So, hard-coded "sports categories" will have no impact with it. This seems to be a functionnality I added last year in my own version (to obtain directly the total by sport : "Running", "Cycling" or "Walking"). So, excuse me for the noise. Next time, I'll verify before... ------------------------------------------------------------------------------ 10 Tips for Better Web Security Learn 10 ways to better secure your business today. Topics covered include: Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, security Microsoft Exchange, secure Instant Messaging, and much more. http://www.accelacomm.com/jaw/sfnl/114/51426210/ _______________________________________________ Pytrainer-devel mailing list Pytrainer-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytrainer-devel