added pandoc template
This commit is contained in:
parent
8b3faa6734
commit
ee20b3594e
4 changed files with 40 additions and 36 deletions
|
@ -1,4 +1,4 @@
|
||||||
.TH edward-shen 1 "2019-04-10" "4.3.2" "Edward Shen Manual"
|
.TH edward-shen 7 "2019-04-10" "4.3.2" "Edward Shen Manual"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
edward-shen \- some random software developer
|
edward-shen \- some random software developer
|
||||||
|
|
|
@ -18,9 +18,10 @@ p { margin-left: 7ch; margin-bottom: 1rem }
|
||||||
.formatted { margin-left: 0; white-space: pre }
|
.formatted { margin-left: 0; white-space: pre }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<p class="formatted">EDWARD-SHEN(7) Edward Shen Manual EDWARD-SHEN(7)</p><h1>NAME</h1>
|
<p class="formatted">EDWARD-SHEN(7) Edward Shen Manual EDWARD-SHEN(7)</p>
|
||||||
|
|
||||||
|
<h1>NAME</h1>
|
||||||
<p>edward-shen - some random software developer</p>
|
<p>edward-shen - some random software developer</p>
|
||||||
<h1>SYNOPSIS</h1>
|
<h1>SYNOPSIS</h1>
|
||||||
<p>Honors candidate for a Bachelor of Science in Computer Science at Northeastern University with a 3.81 GPA, expecting to gradudate in 2021.</p>
|
<p>Honors candidate for a Bachelor of Science in Computer Science at Northeastern University with a 3.81 GPA, expecting to gradudate in 2021.</p>
|
||||||
|
@ -52,6 +53,8 @@ Team TBD.</p>
|
||||||
<p>Edward Shen is only possible thanks to two upstream projects, which are closed sourced and have requested to remain anonymous. A sister project has also greatly contributed to Edward Shen.</p>
|
<p>Edward Shen is only possible thanks to two upstream projects, which are closed sourced and have requested to remain anonymous. A sister project has also greatly contributed to Edward Shen.</p>
|
||||||
<p>We would also like to thank all contributors and friends who had helped develop Edward Shen.</p>
|
<p>We would also like to thank all contributors and friends who had helped develop Edward Shen.</p>
|
||||||
<h1>COPYRIGHT</h1>
|
<h1>COPYRIGHT</h1>
|
||||||
<p>This man page is under GPLv3 or later. To use Edward Shen for any purpose, please contact Edward Shen <code@eddie.sh> to request a license.</p><p class="formatted">3.2.4 2019-04-10 EDWARD-SHEN(7)</p>
|
<p>This man page is under GPLv3 or later. To use Edward Shen for any purpose, please contact Edward Shen <code@eddie.sh> to request a license.</p>
|
||||||
|
|
||||||
|
<p class="formatted">3.2.4 2019-04-10 EDWARD-SHEN(7)</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
28
man-template.html
Normal file
28
man-template.html
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>$title$</title>
|
||||||
|
<style>
|
||||||
|
body, p, h1 {
|
||||||
|
font-family: monospace;
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 73ch;
|
||||||
|
width: 73ch;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
word-wrap: wrap;
|
||||||
|
}
|
||||||
|
body { margin: 1rem }
|
||||||
|
p { margin-left: 7ch; margin-bottom: 1rem }
|
||||||
|
.formatted { margin-left: 0; white-space: pre }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p class="formatted">EDWARD-SHEN(7) Edward Shen Manual EDWARD-SHEN(7)</p>
|
||||||
|
$header$
|
||||||
|
$body$
|
||||||
|
$footer$
|
||||||
|
<p class="formatted">3.2.4 2019-04-10 EDWARD-SHEN(7)</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
37
man-to-html
37
man-to-html
|
@ -1,35 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
read -r -d '' front << EOF
|
title="Edward Shen Manual"
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Edward Shen Manual</title>
|
|
||||||
<style>
|
|
||||||
body, p, h1 {
|
|
||||||
font-family: monospace;
|
|
||||||
display: inline-block;
|
|
||||||
max-width: 73ch;
|
|
||||||
width: 73ch;
|
|
||||||
margin: 0;
|
|
||||||
line-height: 1rem;
|
|
||||||
font-size: 1rem;
|
|
||||||
word-wrap: wrap;
|
|
||||||
}
|
|
||||||
body { margin: 1rem }
|
|
||||||
p { margin-left: 7ch; margin-bottom: 1rem }
|
|
||||||
.formatted { margin-left: 0; white-space: pre }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
pandoc -f man -t html \
|
||||||
<p class="formatted">EDWARD-SHEN(7) Edward Shen Manual EDWARD-SHEN(7)</p>
|
--template man-template \
|
||||||
EOF
|
-M title="$title" \
|
||||||
|
"$1" > "$2"
|
||||||
read -r -d '' back << EOF
|
|
||||||
<p class="formatted">3.2.4 2019-04-10 EDWARD-SHEN(7)</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "$front$(pandoc -f man -t html "$1")$back" > "$2"
|
|
||||||
|
|
Loading…
Reference in a new issue