[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Including scalable icons to improve size coverage

Luya Tshimbalanga wrote:
Matthias Clasen wrote:
I've used Charlies script and included svgs in yesterdays echo snapshot.
Please give it a try.

Fedora-art-list mailing list
Fedora-art-list redhat com

It work well. I wish the script allows the ability to directly save the
modification instead of the copy and paste. Idon't know much about perl

I've included the updated version that does this. I generally use pipes and a bash line script which makes copies (because there are often accidents overwriting originals).
You could do something like this:

mkdir done;
for SVG in *.svg; do cat "$SVG" | trim_svg.pl > "done/$SVG" ; done;

But the new version will accept command line filename arguments which will be overwritten.

trim_svg.pl *.svg


use XML::Twig;
if (! ARGV) {
    @ARGV = "-";
foreach (@ARGV) {
  my $twig=XML::Twig->new(twig_handlers => {
        'i:pgf' => sub {
            if ($_->{'att'}->{'id'} eq 'adobe_illustrator_pgf'){
        'i:pgfRef' => sub {
        'x:xmpmeta' => sub {
  );    # create the twig
  $twig->parsefile($_);        # build it
  open OUTFILE,  "> $_" or die "Can't open $_ : $!";
  $twig->flush (\*OUTFILE);                 # output the twig
  close OUTFILE;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]