Sunday, 12 December 2010

SVN Keywords

I just realised that my townguide files are no longer automatically updating their SVN keywords to record the revision number of the files.
It turns out that this is because the keyword properties in svn is set by the client, not the repository, and worse still you can not apply keyword properties to directories - you have to do each file individually.
I got around this by using the find command to add keywords to all of the python files by doing:

find . -name \*.py -exec svn propset svn:keywords "LastChangedDate Rev Author" '{}' \; 
Of course for files that do not have keywords set you have to edit them to add $Rev$ etc. into the comments.

SVN Keywords

I just realised that my townguide files are no longer automatically updating their SVN keywords to record the revision number of the files.
It turns out that this is because the keyword properties in svn is set by the client, not the repository, and worse still you can not apply keyword properties to directories - you have to do each file individually.
I got around this by using the find command to add keywords to all of the python files by doing:

find . -name \*.py -exec svn propset svn:keywords "LastChangedDate Rev Author" '{}' \; 
Of course for files that do not have keywords set you have to edit them to add $Rev$ etc. into the comments.

Townguide - progress at last!

You can't beat some really bad weather to help make progress with my nerdy jobs.
I have got Waldemar's django front end to townguide working (http://dtownguide.webhop.net), and have managed to make a few changes, including adding fancy tab things to the main map selection form.
There are still a few things to sort out:

  • The area selection on the map does not align properly with the mouse pointer - not sure why - must be something to do with OpenLayers projections...
  • Mapnik re-sizes the output map to match the bounding box, so townguide needs to check the actual map size to make sure the grid squares are right.
  • There is something funny about the output resolution - need to see what it is using - the output looks much higher resolution than I asked for, so I suspect there is a sum wrong somewhere!
  • Add the GPX track and waypoint plugins (they are just templates at the moment).
  • Add an option to suppress un-named ways - the 'None' in the street index can confuse people.
  • Reinstate other output formats - only 'poster' is working.

Townguide - progress at last!

You can't beat some really bad weather to help make progress with my nerdy jobs.
I have got Waldemar's django front end to townguide working (http://dtownguide.webhop.net), and have managed to make a few changes, including adding fancy tab things to the main map selection form.
There are still a few things to sort out:

  • The area selection on the map does not align properly with the mouse pointer - not sure why - must be something to do with OpenLayers projections...
  • Mapnik re-sizes the output map to match the bounding box, so townguide needs to check the actual map size to make sure the grid squares are right.
  • There is something funny about the output resolution - need to see what it is using - the output looks much higher resolution than I asked for, so I suspect there is a sum wrong somewhere!
  • Add the GPX track and waypoint plugins (they are just templates at the moment).
  • Add an option to suppress un-named ways - the 'None' in the street index can confuse people.
  • Reinstate other output formats - only 'poster' is working.

Saturday, 27 November 2010

Townguide - where next?

My townguide map rendering application is about a year old now, but hasn't changed much since last winter.
Waldemar did a lot of work on it for his Google Summer of Code project where he re-hashed the townguide renderer code to make it more modular and produced a django based web front end.
I have not done very well getting this working because I do not understand django well enough to sort out a few minor bugs in it.
Instead I have taken his re-hashed renderer code and developed it further to make it even more modular - as well as 'plugins' for different PDF output formats, there are plugins for the base map and for different map overlays (a grid, custom markers, gpx tracks etc.) [well nearly anyway].  It also uses mapnik2 so can now produce nice high resolution output to make it comparable to the much prettier maposmatic output.

I have been reading a book about django for a few days now (Python Web Development with Django by Forcier, Bissex and Chun) and feel that I should be able to understand both Waldemar's code and the maposmatic version, so I will have a go at the web front end now - there seems little point in developing my clanky php version with these two much slicker front ends available.

Townguide - where next?

My townguide map rendering application is about a year old now, but hasn't changed much since last winter.
Waldemar did a lot of work on it for his Google Summer of Code project where he re-hashed the townguide renderer code to make it more modular and produced a django based web front end.
I have not done very well getting this working because I do not understand django well enough to sort out a few minor bugs in it.
Instead I have taken his re-hashed renderer code and developed it further to make it even more modular - as well as 'plugins' for different PDF output formats, there are plugins for the base map and for different map overlays (a grid, custom markers, gpx tracks etc.) [well nearly anyway].  It also uses mapnik2 so can now produce nice high resolution output to make it comparable to the much prettier maposmatic output.

I have been reading a book about django for a few days now (Python Web Development with Django by Forcier, Bissex and Chun) and feel that I should be able to understand both Waldemar's code and the maposmatic version, so I will have a go at the web front end now - there seems little point in developing my clanky php version with these two much slicker front ends available.

Sunday, 24 October 2010

IBM ThinkPad X60S Middle Mouse Button

Every time a new release of Ubuntu linux comes out, something breaks.   Fortunately over time the somethings are becoming less and less significant!
This time it was the middle mouse button on my IBM ThinkPad X60S.    I had got it working following the instructions here in version 10.04 - it just needed a configuration file in /usr/lib/X11/xorg.conf.d.
But it stopped working following the upgrade to Ubuntu 10.10.
It turns out that the xorg.conf.d location has changed to /usr/share/X11/xorg.conf.d.
Putting a file named 20-thinkpad.conf in that directory with the following contents got middle button scrolling working nicely again!
Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite 
TouchPad / TrackPoint"
MatchDevicePath "/dev/input/event*"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
EndSection
 There is talk that it should work by doing:
sudo apt-get install gpointing-device-settings

But it did not work for me (at least not just like that - tried re-starting xwindows, but still no scrolling - maybe there is some configuration needed, but I like the old way of dropping a file into a configuration directory!