Added a basic HTML template for use when finalizing a book before converting it to other formats.

This commit is contained in:
Johannes Findeisen 2022-10-20 04:35:35 +02:00
commit fc9ff8d1fe
7 changed files with 22 additions and 6 deletions

View file

@ -30,9 +30,9 @@ from bs4 import BeautifulSoup
__author__ = 'Johannes Findeisen <you@hanez.org>'
# 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__))

0
template/.gitkeep Normal file
View file

View file

@ -0,0 +1,5 @@
<!--
this is the place for the cover of the book.
you are free to do what you want but be sure
to respect the HTML standards.
-->

View file

@ -0,0 +1,5 @@
<!--
this is the place for the footer notes of the book.
you are free to do what you want but be sure
to respect the HTML standards.
-->

View file

@ -1,3 +1,4 @@
<head>
<meta charset="utf-8">
<title>$TITLE</title>
</head>

View file

@ -1,5 +1,8 @@
<!DOCTYPE html>
<html lang="en" id="top" xmlns="http://www.w3.org/1999/html">
<meta charset="utf-8">
$HEAD
<body>
$TOC
$CONTENT
</body>
</html>

1
template/toc.html Normal file
View file

@ -0,0 +1 @@
<!-- maybe not needed but added for future thinking about it. -->