View Single Post
Posts: 169 | Thanked: 71 times | Joined on Aug 2010 @ Spain
#175
Originally Posted by MasterZap View Post
I think it would be fairly easy for someone who knows Python + UI to do a usable frontend.

After all, this script is really just (not meaning "just" in a way to diminish the workload of actually writing it) a combination of the google API sample code for latitude, and the python geolocation sample code, with some glue.

Unfortunately I don't know Qt or any other python GUI binding than pygame (and I don't think you'd want an UI in pygame, LOL) so I'm not the guy to do it for SURE.

Step by step?

Well, what you need is

#1 install the google latitude python API. This is basically done by:
#1.1 Downloading it from the link given above
#1.2 Unzipping it to somewhere (doesn't matter, next step copies it to where it "should go")
#1.3 doing "python setup.py install" in that directory
#2 make sure python-geolocation is installed (I'd wager this is just "apt-get install python-geolocation" but mine was already installed so I wouldn't bet bodyparts on it)
#3 Create /home/user/latitude and put my version of the script in it
#4 Run it once first to do the authorization magic. It will ask you to go to a link which you (unfortunately) have to cut-n-paste into your webbrowser
#5 Once done, the script should run. You can either sun it as is with "python zaps-latitude-updater.py", or put it into alarmed to be run e.g. every 15 minutes with the "--once" option, so it updates once and just exit, i.e. you can put in "python /home/user/latitude/zaps-latitude-updater.py --once" into AlarmeD

Your mileage may vary, this was originally just a test and it worked and solved my personal problem. The modifications I did was supertrivial (a few lines of code), and I thank the guy who wrote the original version (Aketzu) onto which I simply piggyback my meager crappy mods.

/Z
I guess the package name is "python-location". It's the closest I have seen using "apt-cache search python | grep loc". I had it already installed.

I have a problem. I don't understand the 1.3 step. I guess it's a noob thing. What is that setup.py? Aren't we talking about the zaps-latitude-updater.zip link? Because it only has one file of the same name but with .py extension. So if I run that I get that setup.py doesn't exist.

Anyway, i tried running th script and I get this:
Code:
Traceback (most recent call last):
  File "zaps-latitude-updater.py", line 36, in <module>
    from apiclient.discovery import build
ImportError: No module named apiclient.discovery
Any hint? Thanks in advance.

Last edited by jpala16; 2011-04-27 at 18:07.
 

The Following User Says Thank You to jpala16 For This Useful Post: