Skip to content

Instantly share code, notes, and snippets.

@kindohm
Created June 29, 2017 14:18
Show Gist options
  • Save kindohm/0ef9c68182940a651416e12597cd6963 to your computer and use it in GitHub Desktop.
Save kindohm/0ef9c68182940a651416e12597cd6963 to your computer and use it in GitHub Desktop.
removes line borders in tidal-vis outputs
#!/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