← Back to team overview

phatch-dev team mailing list archive

Re: Mostly good news (and no bad news)

 

Hi Robin,
Sorry for the late reply but I had to make some changes and tests before
getting back to you.
I'm CC-ing phatch mailing list to allow Stani to reply or add comments if he
wanted to.

Attached you'll find the gps.py action and the core.lib.gps.py module. I
seperated them into two files. And made very little changes:
Stani added surd to phatch/other so I replaced 'import surd' with 'from
other import surd'
I also replaced ReadFileField with GeoReadFileField

The action seems to work pretty well! What is left to be done is Stani's job
now. He need to allow meta data to be updated. Thanks for the work!


> I got my code moved over into Phatch-land in one hour !!!  No trouble at
> all really.  And I understand the interface - makes complete sense.  I
> attach the code.  You'll see I discovered there's a group the "Geotag Icon
> Project" who are trying to get the whole world to use their icons for this
> purpose.  Let's go along with that unless Stani thinks otherwise.
>
The icon is good, but I think Stani prefers a shiny one with a transparent
background, to be consistent with the rest of the icons. I'll see if I can
find an alternative icon.


> -----
> I attach the code gps.py and you can pull down the test data if you wish:
> http://clanmills.com/files/gps_test.zip  (13mBytes)

Great, that made things much easier.


>
> -----
> So what's to be done?
>
> Well the script dies at photo.metadata.update(gps_data).  The message is
> "photo has no attribute named metadata".
> So I did some messing about and thought "Oh, I'll push back on the others
> about this".  It doesn't die any more - but it doesn't add the new meta data
> either.
>
> Do I need to pull down the latest phatch from SVN or somewhere?  I suspect
> Stani only added the photo.metadata code last week and it's not in my
> build/version of phatch.

That's right. You need to have
bazaar<http://doc.bazaar-vcs.org/bzr.dev/en/mini-tutorial/index.html>version
control system installed and then run:
bzr branch lp:phatch <https://launchpad.net/+branch/phatch>


>
> What is the format of gps_data?
> - I guessed a dictionary with [ exiv2-key-string : pyexiv2 data (a string
>  or a tuple) ]

I think so. That makes sense.


>
> Other wee puzzles (nothing urgent/important here):
> 1) Starting phatch and location of gps.py
> If I simply start phatch with the command phatch - the GPS action isn't
> offered
> If I start phatch in ~/gnu/phatch-0.1.5 (where I did the python setup.py
> stuff) everything was fine.
> - So I have gps.py in ~/gnu/phatch-0.1.5/phatch/actions/gps.py and I'm
> thinking "this sort of works, but it is not the right location"

Actions located in ~/.phatch/actions will be available to all instances of
phatch. What is happening in your case it that you have phatch in two
locations. The first is where you did the python setup.py stuff. And the
other is where phatch was installed in the system.


>
> 2) I found it kind of impossible to set the GPX file location and time with
> the UI.  I ended up editing the .phatch file with the text editor.
> - Maybe that's just me.  Let's not discuss this at the moment.

Not it's not just you. I told Stani about this and he committed a fix. Now
the gps.py action uses GeoReadFileField instead of ReadFileField


>
> 3) I was wondering if we get an indicator from phatch when the final image
> is being processed.  If I used this to create a montage or a web gallery,
> I'd want to buffer the data and write the delivery when the last photo is
> processed.  Any ideas?

I don't think there is, but Stani can confirm. Can you give more details on
what you intend the action to do?

>
> - No answer is required for the GeoTag project.  I'm thinking ahead to the
> next task !

I'm glad you are thinking ahead :)

>
> ---
> Schedule:
> A friend called and invited me to run with him in the Santa Cruz Mountains
> on Sunday.  I'll be up and away by 7am and not back until 4pm - which is
> mid-night for you.  So if you have any suggestions for me I'll follow up on
> them when I get home - however that'll be long after you've gone to bed.

Enjoy your time :)

Thank you for being part of our project. We really appreciate your effort.

Best Regards,
Nadia

Attachment: gps.zip
Description: Zip archive


Follow ups