parent
46e940efba
commit
e7191af8b3
|
@ -4,8 +4,14 @@
|
|||
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'} = '<pre><tt>';
|
||||
$Pod::Simple::HTML::Tagmap{'VerbatimFormatted'} = '<pre><tt>';
|
||||
$Pod::Simple::HTML::Tagmap{'/Verbatim'} = '</tt></pre>';
|
||||
|
@ -22,8 +28,9 @@ 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'
|
||||
<<EOF
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
@ -31,7 +38,7 @@ $parser->html_header_before_title(
|
|||
<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" />
|
||||
<link rel="stylesheet" href="$stylesurl/style.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
.pod pre {
|
||||
background: #333;
|
||||
|
@ -64,6 +71,7 @@ tt {
|
|||
<title>
|
||||
EOF
|
||||
);
|
||||
}
|
||||
$parser->html_header_after_title(
|
||||
<<'EOF'
|
||||
</title>
|
||||
|
|
|
@ -7,10 +7,10 @@ for f in $(grep '\.html$' debian/i3-wm.docs | grep -v 'docs/refcard.html' | grep
|
|||
do
|
||||
asciidoc -a linkcss -a stylesdir=https://i3wm.org/css -a scriptsdir=https://i3wm.org/js --backend=xhtml11 -f docs/asciidoc-git.conf $(dirname $f)/$(basename $f .html)
|
||||
done
|
||||
./docs/i3-pod2html i3-dmenu-desktop man/i3-dmenu-desktop.html
|
||||
./docs/i3-pod2html i3-save-tree man/i3-save-tree.html
|
||||
./docs/i3-pod2html build/testcases/lib/i3test.pm docs/lib-i3test.html
|
||||
./docs/i3-pod2html testcases/lib/i3test/Test.pm docs/lib-i3test-test.html
|
||||
./docs/i3-pod2html --stylesurl=https://i3wm.org/css i3-dmenu-desktop man/i3-dmenu-desktop.html
|
||||
./docs/i3-pod2html --stylesurl=https://i3wm.org/css i3-save-tree man/i3-save-tree.html
|
||||
./docs/i3-pod2html --stylesurl=https://i3wm.org/css build/testcases/lib/i3test.pm docs/lib-i3test.html
|
||||
./docs/i3-pod2html --stylesurl=https://i3wm.org/css testcases/lib/i3test/Test.pm docs/lib-i3test-test.html
|
||||
for file in $(sed 's/\.1$/.man/g' debian/i3-wm.manpages)
|
||||
do
|
||||
[ -f "$file" ] && asciidoc -a linkcss -a stylesdir=https://i3wm.org/css -a scriptsdir=https://i3wm.org/js --backend=xhtml11 -f docs/asciidoc-git.conf "$file"
|
||||
|
|
Loading…
Reference in New Issue