Joe Gregorio | 0eec308 | 2011-03-07 08:25:17 -0500 | [diff] [blame] | 1 | This is an example program that can run as a power |
| 2 | management hook to set the timezone on the computer |
| 3 | based on the user's location, as determined by Google |
| 4 | Latitude. To use this application you will need Google |
| 5 | Latitude running on a mobile device. |
| 6 | |
Joe Gregorio | 9d56b5a | 2012-03-30 09:21:26 -0400 | [diff] [blame] | 7 | api: latitude |
| 8 | keywords: cmdline |
| 9 | |
Joe Gregorio | 0eec308 | 2011-03-07 08:25:17 -0500 | [diff] [blame] | 10 | Installation |
| 11 | ============ |
| 12 | The google-api-python-client library will need to |
| 13 | be installed. |
| 14 | |
| 15 | $ sudo python setup.py install |
| 16 | |
| 17 | Then you will need to install the tznever application: |
| 18 | |
| 19 | $ sudo cp tznever /usr/sbin/tznever |
| 20 | |
| 21 | And then add it in as a power management hook: |
| 22 | |
| 23 | $ sudo ln -s /usr/sbin/tznever /etc/pm/sleep.d/45tznever |
| 24 | |
| 25 | Once that is done you need to run tznever once from the |
| 26 | the command line to tie it to your Latitude account: |
| 27 | |
| 28 | $ sudo tznever |
| 29 | |
| 30 | After that, every time your laptop resumes it will |
| 31 | check you Latitude location and set the timezone |
| 32 | accordingly. |
| 33 | |
| 34 | TODO |
| 35 | ==== |
| 36 | 1. What about stale Latitude data? |