#!/usr/bin/perl -w
$world=pop(@ARGV);
die "input world!" unless $world;
print "Input number of first new screenshot, then number/name pairs.\n";
open CUTME, ">cutme";
$first=<>; chomp $first;
while (<>) {
	chomp; $num=$_;
	$name=<>; chomp $name;
	rename ("screenshot$num.png","$world-$first-$name.png");
	`gm convert -resize 640x480 $world-$first-$name.png $world-$first-$name-small.png`;
        #	print CUTME "[URL=\"http://www.chiark.greenend.org.uk/~damerell/games/ksp/$world-$first-$name.png\"][IMG]http://www.chiark.greenend.org.uk/~damerell/games/ksp/$world-$first-$name-small.png[/IMG][/URL]\n"; $first++;
        	print CUTME "http://www.chiark.greenend.org.uk/~damerell/games/ksp/$world-$first-$name.png\n"; $first++;
}
close CUTME;
