Michal Čihař - Archives

Exiv2 support for Pentax maker notes

As I have Pentax camera, I wanted to be able to extract information from maker notes it stores to EXIF. As only tool which seems to be capable of this is ExifTool and it is a Perl beast which I really don't want to use from Python, I need to add support for it to some existing library.

I found two which could be used - libexif and Exiv2. Because of availability of Python bindings I choose Exiv2. The reason why I also prefer this is upcoming XMP support for which I was looking recently. The only disadvantage I can see is that libexif is more widely used by applications. Why the hell couldn't be just one library doing this?

Anyway if you're interested in Pentax maker note support for Exiv2, you can find it in their bug tracker and it will hopefully appear soon in their svn ;-).

First success with Photo uploader

Today I did really big stress testing of Photo uploader - I needed to upload 400 photos (total size somewhere near 600 MiB). And it worked without problems! I could not imagine that I would have to upload so much files using web forms or some damn slow Windows application.

Also since last announcement uploader development went on. It now supports 4 services (all in Czechia for now), I added some documentation and man page. Also version 0.1 has been released yesterday (but it does not yet contain mentioned updates), with plan to release 0.2 somewhere next week.

And as I got quite a lot of requests for GUI - I do not plan to write one myself (or at least not soon). So if you want one, please write it. As all hard work is done by phoupl module, it can be easily embedded into some simple image viewer written in Python.

Uploading photos to minilab

I was looking for some easier solution than using web forms, but no minilab seems to support Linux here. Windows applications I tried so far does not seem to work in Wine, so this is also not an option. Only thing that seems to work is Picassa, but it is quite big tool to make just uploading photos and it is anyway some beast using Wine.

So the only option was to write something myself. Using cURL from Python is quite easy so I hacked simple script to upload photos to minilab using PycURL. It currently supports only Droxi, but it might be later extended to support others. The code is also now a bit fragile as it does almost none error checking, but I was able to upload first set of photos to minilab and continue order in browser.

You can download my proof of concept code at Photo uploader page, but don't expect anything clever from it, but it should basically work :-).

XMP support for Python

As I produce quite a lot of photos and want to manage them in some reasonable way, I started to look for some tools which can do commenting/tagging/whatever of taken photos. I really don't want these meta data stored outside picture itself, so most of photo managers currently available are not acceptable. When reading Gnome 2.20, I noticed support for XMP (Extensible Metadata Platform) in eog.

Well I didn't know this standard up to now, but it looks interesting. Especially when open source tools can easily adopt library open sourced by Adobe. I would like to add support for this to Lazygal, but I didn't find any reasonable Python module to work with XMP. There is simple extractor, but nothing what would allow me to easily grab meta data out of file. In fact one solution seems to exist, but it costs almost $300 and is not free software in any way.

Or did I just miss something when using Google and some such Python library exists?

Funny advertisements

It's sometimes funny what automatically added advertisements can produce. This morning when I complained about lack of Windows developers for Gammu and shared my unwillingness to work on Windows, Microsoft sponsored this email ;-).

On Wed, 12 Sep 2007 09:55:56 +0900
Michal Čihař <michal@cihar.com> wrote:

> I have totally no interest in investing into Windows license and
> finding out how to use totally free MSVC.
[...]
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.

First usage of lazygal

After searching for new gallery and investigating lazygal, I finally decided it's time to give it some real world usage. My current album from Japan is being processed by this damn fast tool.

It needed a bit of hacking, but as the core was already there and Alexandre Rossi is quite cooperative upstream. I managed to implement almost everything I requested in original post. The only thing I'm still not completely happy with is the theme, but I hope I will improve it over time.

From original requirements, I completely dropped links to full size images. There is simply no reason to put here crappy pictures which my only camera I currently have here (built in camera in Nokia 6234) produces. Also once I'll buy new camera (what will be most likely Pentax K10D), I probably won't upload huge 10Mpix images on web server as I don't think it would be good for anything else than wasting my bandwidth.

Photo album candidate - lazygal

I received number of reactions on my photoalbum post. Several were saying "I'm using some great Perl tool which is not actively maintained anymore.". Well I know such tools. I also used BINS some time ago, but it did break something (I don't recall what exactly right now, it's quite far far away in past) and I was unable to fix it. That was reason I switched to Matew.

The other replies were much better. One of them recommended trying lazygal (well it was recommended by it's author). I gave it a try and it seemed to fit my basic needs quite well and extending it's EXIF support was a piece of cake. I will continue to tune it to my needs, but I'm pretty close right now. The hardest thing for me will be to come up with some good looking themes, but I will most likely steal my ones for Matew :-).

Photo album generator wanted

After (again) searching for some good photo album generator, I'm more and more inclined to writing yet another tool to do this. Maybe I just want too much from this, but I haven't found solution that would fit my needs:

  • Generate static HTML (or XHTML).
  • Design should be done using CSS.
  • Ability to process whole tree of photos into single album with directory based sub albums.
  • Generate data only for changed/new photos (timestamp checking).
  • Support for including EXIF information in results.
  • Clean and nicely looking default template.
  • Support for image comments from EXIF, JPEG comment field and external file.
  • Automatic generating of images suitable for web browsing as well as including links to full sized images from camera.
  • Somehow active development. I fear of using code which has not been updated for 3 years.
  • It should be fast. This excludes anything written in bash as spawning tons of external programs can not be fast.
  • Written in some language I know. I'm pretty sure I will hit some bug and I would like to be able to fix it. In fact only suitable language for me seems to be Python.
  • Command line interface is a must.

So far I'm using a bit customised Matew which really does not fulfil everything, but at least works reasonably good (but extremely slow). However the more and more pictures are in my album, the slower this beast seems to be, so it's probably time to switch to something new. So far I haven't found anything that would actually fit, but PyAC seems to be usable as starting point for my new project for generating albums. Or is there a working solution?

IMAP utils are completely clean of adware

I never knew, that someone would certify few lines of Python code, but Softpedia did so:

   Your product "IMAP utils 0.2" has been tested by the Softpedia labs and
   found to be completely clean of adware/spyware components.

   We are impressed with the quality of your product and encourage you to
   keep this high standards in the future.

   To assure our visitors that "IMAP utils 0.2" is clean, we have granted
   it with the "100% FREE" Softpedia award. Moreover, to let your users
   know about this certification, you may display this award on your
   website, on software boxes or inside your product.

I still wonder why simplest "product" I ever released is getting so much publicity…

goText supports Czech Vodafone

goText (Java apllication for your phone to send messages onver GPRS) has just received support to send messages to Czech Vodafone network. It is using public SMS gateway, the only drawback is that you have to detect captcha used on this page. But it still is cheaper than sending regullar SMS :-).

To use this service, add following URL to your goText services:

http://www.gotext.org/pub/cz-vodafone.php