From ee20b3594e49673ae469a4e2b3d1135151c23493 Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Wed, 10 Apr 2019 21:15:13 -0400 Subject: [PATCH] added pandoc template --- edward-shen.man | 2 +- index.html | 9 ++++++--- man-template.html | 28 ++++++++++++++++++++++++++++ man-to-html | 37 +++++-------------------------------- 4 files changed, 40 insertions(+), 36 deletions(-) create mode 100644 man-template.html diff --git a/edward-shen.man b/edward-shen.man index b4e3a79..5c00fe6 100644 --- a/edward-shen.man +++ b/edward-shen.man @@ -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 edward-shen \- some random software developer diff --git a/index.html b/index.html index a6edf9c..b9181a3 100644 --- a/index.html +++ b/index.html @@ -18,9 +18,10 @@ p { margin-left: 7ch; margin-bottom: 1rem } .formatted { margin-left: 0; white-space: pre } - -

EDWARD-SHEN(7) Edward Shen Manual EDWARD-SHEN(7)

NAME

+

EDWARD-SHEN(7) Edward Shen Manual EDWARD-SHEN(7)

+ +

NAME

edward-shen - some random software developer

SYNOPSIS

Honors candidate for a Bachelor of Science in Computer Science at Northeastern University with a 3.81 GPA, expecting to gradudate in 2021.

@@ -52,6 +53,8 @@ Team TBD.

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.

We would also like to thank all contributors and friends who had helped develop Edward Shen.

COPYRIGHT

-

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.

3.2.4 2019-04-10 EDWARD-SHEN(7)

+

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.

+ +

3.2.4 2019-04-10 EDWARD-SHEN(7)

diff --git a/man-template.html b/man-template.html new file mode 100644 index 0000000..a794161 --- /dev/null +++ b/man-template.html @@ -0,0 +1,28 @@ + + + +$title$ + + + +

EDWARD-SHEN(7) Edward Shen Manual EDWARD-SHEN(7)

+$header$ +$body$ +$footer$ +

3.2.4 2019-04-10 EDWARD-SHEN(7)

+ + diff --git a/man-to-html b/man-to-html index 98a4db2..0bec28b 100755 --- a/man-to-html +++ b/man-to-html @@ -1,35 +1,8 @@ #!/usr/bin/env bash -read -r -d '' front << EOF - - - -Edward Shen Manual - - +title="Edward Shen Manual" - -

EDWARD-SHEN(7) Edward Shen Manual EDWARD-SHEN(7)

-EOF - -read -r -d '' back << EOF -

3.2.4 2019-04-10 EDWARD-SHEN(7)

- - -EOF - -echo "$front$(pandoc -f man -t html "$1")$back" > "$2" +pandoc -f man -t html \ + --template man-template \ + -M title="$title" \ + "$1" > "$2"