[Clipart] transparent turkeys

Jon Phillips jon at rejon.org
Tue Feb 1 00:27:41 PST 2005


Stephen Silver wrote:
> Jon Phillips wrote:
> 
> 
>>Man, I almost forgot about this task. Do you all think we can fix them all b4 
>>the release on MONDAY if we use those quick scripts we passed around and some 
>>visual checking, or should I add this task to next month's roadmap?
> 
> 
> I've tested Jonadab's Perl script (with some changes - see below) and I don't
> see any problems.  So I think this can be used now, and there's no need to
> wait until next month.
> 
> Here's the script that I actually tested.  This incorporates the change
> I previously suggested (to handle the more general case) and fixes the
> syntax error on that line (missing semicolon) and uses "use strict" and
> is formatted differently, but is otherwise the same as the one Jonadab
> originally posted.
> 
> 
> use strict;
> 
> sub fix {
>     my ($dir) = @_;
>     my $f;
>     for $f (<$dir/*>) {
>         if (-d $f) { fix($f); }
>         elsif ($f =~ /svg$/i) {
>             open SVG, "<", $f;
>             open TMP, ">", "temp";
>             my $line=0;
>             while (<SVG>) {
>                 ++$line;
>                 if (/fill:url/) {
>                     s/fill-opacity:0[.0-9]*;/fill-opacity:1;/g;
>                     print "$f line $line\n";
>                 }
>                 print TMP $_;  }
>             close SVG;
>             close TMP;
>             `mv temp $f`;
>         }
>     }
> }
> 
> fix("openclipart-0.09");
> 

Jonadab did you try this for the current repository???

Thanks,
Jon




-- 
Jon Phillips

USA PH 510.499.0894
jon at rejon.org
http://www.rejon.org

Inkscape (http://inkscape.org)
Open Clip Art Library (www.openclipart.org)
CVS Book (http://cvsbook.ucsd.edu)
Scale Journal (http://scale.ucsd.edu)	



More information about the clipart mailing list