Created
June 29, 2017 14:18
-
-
Save kindohm/0ef9c68182940a651416e12597cd6963 to your computer and use it in GitHub Desktop.
removes line borders in tidal-vis outputs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
my $fn = $ARGV[0]; | |
open(my $svgfh, "<$fn") | |
or die "couldn't open $fn: $!"; | |
my $svg; | |
{ | |
local $/; | |
undef $/; | |
$svg = <$svgfh> | |
} | |
close $svgfh; | |
$svg =~ s!<svg\s+(.*?)>!<svg $1 shape-rendering="crispEdges">!s; | |
open($svgfh, ">$fn") | |
or die "couldn't open $fn for writing: $!"; | |
print $svgfh $svg; | |
close($svgfh); | |
0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment