From fc9ff8d1fea15dc9842678e14e747c5a25926c9f Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Thu, 20 Oct 2022 04:35:35 +0200 Subject: [PATCH] Added a basic HTML template for use when finalizing a book before converting it to other formats. --- man2book | 11 ++++++----- template/.gitkeep | 0 template/cover.html | 5 +++++ template/foot.html | 5 +++++ template/head.html | 1 + template/index.html | 5 ++++- template/toc.html | 1 + 7 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 template/.gitkeep create mode 100644 template/toc.html diff --git a/man2book b/man2book index 8d83103..e463c9b 100755 --- a/man2book +++ b/man2book @@ -30,9 +30,9 @@ from bs4 import BeautifulSoup __author__ = 'Johannes Findeisen ' # currently i only increase the third number because i commit early and often and nearly on every -# commit there are new features. 0.2.0 will be ready for generating a full book. then i will use the +# commit there are new features. 0.1.* will be ready for generating a full book. then i will use the # pythonic version scheme. -__version__ = '0.1.2' +__version__ = '0.1.3' def main(): @@ -67,9 +67,10 @@ def main(): '1,2,3') parser.add_argument('target_directory', metavar='TARGET_DIRECTORY', - help='the target directory for the output. it must contain two directories.' - 'one is the directory for temporary file output (tmp/) and one for ' - 'the final processing result (out).') + help='the target directory for the output. it must contain three ' + 'directories. the first is for the HTML template of the book ' + '(template), one is the directory for temporary file output (tmp) ' + 'and one for the final processing result (out).') parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + str(__version__)) diff --git a/template/.gitkeep b/template/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/template/cover.html b/template/cover.html index e69de29..33a81b8 100644 --- a/template/cover.html +++ b/template/cover.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/template/foot.html b/template/foot.html index e69de29..d14f768 100644 --- a/template/foot.html +++ b/template/foot.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/template/head.html b/template/head.html index 9802eaa..bc45ca3 100644 --- a/template/head.html +++ b/template/head.html @@ -1,3 +1,4 @@ + $TITLE \ No newline at end of file diff --git a/template/index.html b/template/index.html index bb66ca8..44a6092 100644 --- a/template/index.html +++ b/template/index.html @@ -1,5 +1,8 @@ - $HEAD + + $TOC + $CONTENT + diff --git a/template/toc.html b/template/toc.html new file mode 100644 index 0000000..9ce6665 --- /dev/null +++ b/template/toc.html @@ -0,0 +1 @@ + \ No newline at end of file