Archive for October, 2005

GeoTagging in EXIF

Friday, October 28th, 2005

For quite some time now I’ve been thinking of correlating tracklog GPS data from my GPS with the protos I’ve taken based on time. It looks such a thing alrady exists here and this blog contains a lot of good pointers.

I will try these out, but I still want something more automated… maybe I will write it one day… ;-)

Installing Perl modules

Friday, October 28th, 2005

As always with perl, there’s a couple of options ;-)

  1. Automatically using CPAN perl -MCPAN -e shell install Perl::Module::You::Want

  2. Automatically using g-cpan in Gentoo g-cpan -i Perl::Module::You::Want

  3. Semi automatically in Debian

    • find a “lib-module-you-want-perl” module that provides the package you want.
    • command apt cache search “lib.*-perl” gives you a list of all prepackaged perl modules.
    • install “apt-get install”
  4. By hand, described here.

Template replacement with M4

Thursday, October 20th, 2005

Trying to automate something I had to run a program with a configuration file modified for each run. The easy way to do this is to create a template file and generate the correct configuration file with variable substitution for each run.

This task could be done in a number of ways (sed, perl, shell), to name a few, but as Diego pointed out there is already a tool for this m4. It’s a bit archaic and has odd syntax (think strange quotes or strangely named built-in macros), but it’s ideal for my simple task.

At the end I run it like this: m4 -Dparam1=value1 -Dparam2=value2 <infile> > <outfile>

As simple as that. Thanks Diego! BTW: some pointers to M4: manual and linux journal article.