Files
contrib
debian
docs
GPN-2009-06-27
NoName-2009-03-12
slides-2012-01-25
slides-2012-03-16
Makefile
asciidoc-git.conf
bigpicture.png
bigpicture.xcf
debugging
debugging-release-version
docs.mk
hacking-howto
i3-pod2html
i3-sync-working.dia
i3-sync-working.png
i3-sync.dia
i3-sync.png
i3bar-protocol
ipc
keyboard-layer1.png
keyboard-layer1.svg
keyboard-layer2.png
keyboard-layer2.svg
logo-30.png
modes.png
multi-monitor
refcard.html
refcard_style.css
single_terminal.png
snapping.png
stacklimit.png
testsuite
tree-layout1.png
tree-layout2.png
tree-shot1.png
tree-shot2.png
tree-shot3.png
tree-shot4.png
two_columns.png
two_terminals.png
userguide
wsbar
wsbar.dia
wsbar.png
i3-config-wizard
i3-dump-log
i3-input
i3-msg
i3-nagbar
i3bar
include
libi3
man
parser-specs
src
testcases
tests
yajl-fallback
.gitignore
DEPENDS
LICENSE
Makefile
PACKAGE-MAINTAINER
RELEASE-NOTES-4.2
RELEASE-NOTES-4.3
common.mk
generate-command-parser.pl
i3-migrate-config-to-v4
i3-sensible-editor
i3-sensible-pager
i3-sensible-terminal
i3.applications.desktop
i3.config
i3.config.keycodes
i3.xsession.desktop
logo.svg
pseudo-doc.doxygen
i3/docs/i3-pod2html
2012-09-10 12:03:14 +02:00

91 lines
2.1 KiB
Perl
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env perl
# vim:ts=4:sw=4:expandtab
use strict;
use warnings;
use Pod::Simple::HTML;
use v5.10;
$Pod::Simple::HTML::Tagmap{'Verbatim'} = '<pre><tt>';
$Pod::Simple::HTML::Tagmap{'VerbatimFormatted'} = '<pre><tt>';
$Pod::Simple::HTML::Tagmap{'/Verbatim'} = '</tt></pre>';
$Pod::Simple::HTML::Tagmap{'/VerbatimFormatted'} = '</tt></pre>';
if (@ARGV < 2) {
say STDERR "Syntax: i3-pod2html <pod-input-path> <html-output-path>";
exit 1;
}
open(my $in, '<', $ARGV[0]) or die "Couldnt open $ARGV[0] for reading: $!\n";
open(my $out, '>', $ARGV[1]) or die "Couldnt open $ARGV[1] for writing: $!\n";
my $parser = Pod::Simple::HTML->new();
$parser->index(1);
$parser->html_header_before_title(
<<'EOF'
<!doctype html>
<html lang="en">
<head>
<link rel="icon" type="image/png" href="/favicon.png">
<meta charset="utf-8">
<meta name="generator" content="Pod::Simple::HTML">
<meta name="description" content="i3 Perl documentation (testsuite)">
<link rel="stylesheet" href="http://i3wm.org/css/style.css" type="text/css" />
<style type="text/css">
.pod pre {
background: #333;
border: 1px solid #555;
border-left: 5px solid #555;
padding: 0.5em;
padding-left: 0;
padding-right: 0.5em;
white-space: pre;
color: white;
}
.pod ul {
list-style-type: none;
}
.pod li {
margin-bottom: 0 !important;
}
tt {
font-family: 'Droid Sans Mono', sans-serif;
font-size: inherit;
}
.pod h1 a, .pod h2 a, .pod h3 a, .pod h4 a {
text-decoration: none;
color: white;
}
</style>
<title>
EOF
);
$parser->html_header_after_title(
<<'EOF'
</title>
</head>
<body>
<div id="main">
<a href="/"><h1 id="title">i3 - improved tiling WM</h1></a>
<ul id="nav">
<li><a style="border-bottom: 2px solid #fff" href="/docs">Docs</a></li>
<li><a href="/screenshots">Screens</a></li>
<li><a href="http://faq.i3wm.org/">FAQ</a></li>
<li><a href="/contact">Contact</a></li>
<li><a href="http://bugs.i3wm.org/">Bugs</a></li>
</ul>
<br style="clear: both">
<div id="content" class="pod">
<h1>i3 Perl documentation (testsuite)</h1>
EOF
);
$parser->output_fh($out);
$parser->parse_file($in);