Sunday, July 29, 2007

Second Life Relay for Life 2007

As of this moment the Second Life Relay for Life 2007 event is still going on. This year they are suing 32 sims compared with last years 12. Thats 2097152 square meters! The vent concludes at 2pm SL time today, so there's still time to participate in the actual walk. Though I am not a formal member of any of the RFL teams, I did make some small donations here and there and purchase some RFL items at various vendors throughout the grid. And I did serve in the Caledon RFL Militia, serving as a warm body in machinima. Since the performance of SL on my lappy is not so good I decided to visit the track location late friday night, and Saturday morning so I wouldn't be slowed down by a large number of avatars. I took a lot of screenshots, over 120 in fact.

With that many screenshots I wasn't going to post them here, that would be unwieldy, Thanks to Linux I have relatively easy ways of mass renaming images, mass converting images, and mass uploading them to flickr.

For the conversion I used convert from the ImageMagick tools set:

for x in *.bmp; do convert -quality 95 $x $x.jpg; done

For the renaming I found a perl script that did the job:


#!/usr/bin/perl

my $dir = '/path/to/images/directory';
my $names = '/path/to/file/with/the/wanted/names';
my $files = '/path/to/file/with/the/real/name';

chdir $dir or
die "Could not change dir to $dir: $!\n";

open NAMES, $names or die "Could not open $names: $!\n";

open FILES, $files or die "Could not open $files: $!\n";

my $name = ;
chomp $name;

my $file = ;
chomp $file;

while($name && $file) {
print "renaming $file to $name...\n";
rename $file, $name;
$name = ;
chomp $name;
$file = ;
chomp $file;
}

close NAMES;
close FILES;


Just create a text file with the old names, another with the new ones and point the script at them and the image directory. To create those files I just did an:

ls -1 > current_names.txt
cp current_names.txt wanted_names.txt

and then used the search/replace functions in vim to get the names I wanted fast.

For uploading to Flickr, I used the flickr_upload Perl script. like so:

flickr_upload --tag='"SL RFL"' --description "Screenshot taken at the Second Life Relay for Life 2007" *.jpg


The phots are at CronoCloud Creeggan's flickr photos and have the "SL RFL" tag

No comments: