/usr/share/doc/libgraph-easy-as-svg-perl/examples/as_svg is in libgraph-easy-as-svg-perl 0.23-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #!/usr/bin/perl -w
# Convert an input file containing a Graph::Easy description to
# standalone SVG file
# Example usage:
# examples/as_svg t/in/2nodes.txt >test.svg
# echo "[ A ] -> [ B ]" | examples/as_svg
BEGIN { $|++; }
use strict;
use lib 'lib';
use Graph::Easy::Parser;
my $file = shift;
if (!defined $file)
{
$file = \*STDIN;
binmode STDIN, ':utf8' or die ("binmode STDIN, ':utf8' failed: $!");
}
my $parser = Graph::Easy::Parser->new( debug => (shift||0) );
my $graph = $parser->from_file( $file );
die ($parser->error()) unless defined $graph;
$graph->timeout(60);
$graph->layout();
warn ($graph->error()) if $graph->error();
binmode STDOUT, ':utf8' or die ("binmode STDOUT, ':utf8' failed: $!");
print $graph->as_svg_file();
|