#!/usr/bin/env perl # vim:ts=4:sw=4:expandtab use strict; use warnings; use Pod::Simple::HTML; use Getopt::Long; use v5.10; my $stylesurl = ''; GetOptions("stylesurl=s" => \$stylesurl) or die "parsing flags"; $Pod::Simple::HTML::Tagmap{'Verbatim'} = '
';
$Pod::Simple::HTML::Tagmap{'VerbatimFormatted'} = '
';
$Pod::Simple::HTML::Tagmap{'/Verbatim'} = '
'; $Pod::Simple::HTML::Tagmap{'/VerbatimFormatted'} = '
'; if (@ARGV < 2) { say STDERR "Syntax: i3-pod2html "; exit 1; } open(my $in, '<', $ARGV[0]) or die "Couldn’t open $ARGV[0] for reading: $!\n"; open(my $out, '>', $ARGV[1]) or die "Couldn’t open $ARGV[1] for writing: $!\n"; my $parser = Pod::Simple::HTML->new(); $parser->index(1); if ($stylesurl ne '') { $parser->html_header_before_title( < EOF ); } $parser->html_header_after_title( <<'EOF'

i3 - improved tiling WM


i3 Perl documentation

EOF ); $parser->output_fh($out); $parser->parse_file($in);