Files
.github
AnyEvent-I3
contrib
debian
docs
GPN-2009-06-27
NoName-2009-03-12
slides-2012-01-25
slides-2012-03-16
asciidoc-git.conf
bigpicture.png
bigpicture.xcf
debugging
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
layout-saving
layout-saving-1.png
logo-30.png
modes.png
multi-monitor
refcard.html
refcard_style.css
single_terminal.png
snapping.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
etc
i3-config-wizard
i3-dump-log
i3-input
i3-msg
i3-nagbar
i3bar
include
libi3
m4
man
parser-specs
share
src
testcases
travis
.clang-format
.editorconfig
.gitignore
.travis.yml
DEPENDS
I3_VERSION
LICENSE
Makefile.am
PACKAGE-MAINTAINER
README.md
RELEASE-NOTES-4.14.1
RELEASE-NOTES-4.16.1
RELEASE-NOTES-4.18
configure.ac
generate-command-parser.pl
i3-dmenu-desktop
i3-migrate-config-to-v4
i3-save-tree
i3-sensible-editor
i3-sensible-pager
i3-sensible-terminal
logo.svg
pseudo-doc.doxygen
release.sh
i3/docs/i3-pod2html
Michael Stapelberg d968d39b27 Replace http:// with https:// where applicable
The testcases will be updated automatically in a separate commit.
2017-09-24 10:19:07 +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">
<link rel="stylesheet" href="https://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="https://www.reddit.com/r/i3wm/">FAQ</a></li>
<li><a href="/contact">Contact</a></li>
<li><a href="https://bugs.i3wm.org/">Bugs</a></li>
</ul>
<br style="clear: both">
<div id="content" class="pod">
<h1>i3 Perl documentation</h1>
EOF
);
$parser->output_fh($out);
$parser->parse_file($in);