[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    [kde-edu-devel] www/areas/edu
From:       Dominique Devriese <devriese () kde ! org>
Date:       2003-03-24 19:39:01
[Download RAW message or body]

CVS commit by domi: 

add image sizes to the addImage calls.  I've prolly missed some somewhere, but I \
don't have time to fine-tune stuff, since i have a date with my girlfriend tonight :) \
CCMAIL:kde-edu-devel@mail.kde.org I'm including the script here, in case anyone else \
wants to finish what i forgot.. ( it uses the identify program from the imagemagick \
suite to find the dimensions )

---

#! /usr/bin/env perl

@files = `find -name 'screenshots.php'`;

foreach $file ( @files )
  {
    chomp $file;
    open( INFILE, "<$file" );
    open( OUTFILE, ">$file.out" );
    while( <INFILE> )
      {
	if (/^(.*?)addImage\(\"(.*?)\", \"(.*?)\", \"(.*?)\", \"(.*?)\",(.*)$/ )
	  {
	    if( /^\/\//) { next; };
	    $begin = $1;
	    $thumb = $2;
	    $pic = $3;
	    $rest = $6;
	    $picfile = "`dirname $file`/$thumb";
	    ( $width, $height ) = ( `identify $picfile` =~ / (\d+)x(\d+) / );
	    print OUTFILE "${begin}addImage(\"$thumb\", \"$pic\", $width, $height, $rest\n";
	  }
	else { print OUTFILE $_; }
      };
    close( OUTFILE );
    close( INFILE );
    rename ( "$file.out", "$file" );
  };


  M +3 -3      flashkard/screenshots.php   1.8
  M +5 -5      khangman/screenshots.php   1.7
  M +2 -3      kiten/screenshots.php   1.4
  M +8 -8      klearnspelling/screenshots.php   1.5
  M +4 -4      klettres/screenshots.php   1.4
  M +4 -4      kmessedwords/screenshots.php   1.8



_______________________________________________
kde-edu-devel mailing list
kde-edu-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-edu-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic