#!/usr/bin/perl -w

# convert POD to HTML with Graph::Simple graphs

use lib 'lib';
use lib '../lib';
use Graph::Simple::Pod2HTML;
use Getopt::Long;

my $options = scalar @ARGV;
my $input = shift || 'test.pod';
my $backlink;
my $version;

my $rc = GetOptions (
        "backlink=s" => \$backlink,
        "output=s"   => \$output,
        "version"   => \$version,
        );

if (!$rc || $options == 0 || $version)
  {
  print "\n  Generate HTML from POD with graphs by Graph::Simple. Usage:\n\n";
  print "   ./pod2html inputfile [--output=path/file] [--backlink='Main|index.html']\n\n";
  exit unless $rc;
  exit if $version;
  }

my $parser = Graph::Simple::Pod2HTML->new();

$parser->css_file('base.css');

$parser->parse_from_file($input);

my $out = $output;
