Posts Tagged ‘git’
This post is an update to a previous post on getting information from my Garmin forerunner 305 using tools in Ubuntu 12.04. A comment on the previous post pointed out that svn repository I used was no longer working. This is not my repository, so I can’t do anything about that. However, I can make a github repository (the code seems to allow for free distribution) with the code I obtained in 2012. In the interest of being thorough I will provide complete instructions here, with updates as needed.
1 To download running information from my Garmin forerunner 305, I will use garmin-forerunner-tools:
sudo apt-get install garmin-forerunner-tools
2 To check the xml schema, we need xmllint. To make this utility available install libxml2-utils:
sudo apt-get install libxml2-utils
3 To do the file conversion between *.gmn and *.tcx we need utilities developed by others. I have made a github repository for them and you can obtain them using:
git clone firstname.lastname@example.org:cstrelioff/garmin-dev.git
If you don’t have git installed, use:
sudo apt-get install git
4 Finally, we have to make use of the utilities we have installed. One way to do this is to make a directory to save data, for example:
mkdir ~/GarminData cd ~/GarminData
To extract data, connect the watch via USB and run:
At this point you should see that there are *.gmn files in the GarminData directory that use the directory structure: Year/Month/filename.gmn .
Finally, we need to create *.tcx file that can be uploaded to Garmin Connect. To do this, we need to go to the directory where we placed the git repository (you should be able to execute
ls in the directory and see the script gmn2tcx). The basic format of a command is:
./gmn2tcx ~/GarminData/Year/Month/filename.gmn > runfilname.tcx
A couple of important things to note, using the command as above, are:
- the full path name must be provided for the input file
- the output file runfilename.tcx will be placed in the same directory as gmn2tcx
I use git version control for many projects. Mostly I use the command line tools to do all of my work but I’d like to find a useful GUI for looking at branches, diffs, etc. My first test will be the version of gitg in the repository.
sudo apt-get install gitg
Seems like a useful tool for browsing repositories, visualizing branches, looking at diffs, staging and committing changes with messages.
git is a tool for version control on programming projects. The install is easy:
sudo apt-get install git
Setup github access
Assuming you already have an account, the following gets github ssh access up and running, following the process described here. The following commands set parameters and generate a key for upload to the github website:
git config --global color.ui true git config --global user.name "Your Name" git config --global user.email "email@example.com" ssh-keygen -t rsa -C "firstname.lastname@example.org"
Copy the key to the clipboard (setup xclip if in needed — see here)
cat ~/.ssh/id_rsa.pub | clipboard
Your key is now in your clipboard, go to the github website and paste the new key in the appropriate area:
Finally, test to make sure that it works:
ssh -T email@example.com