PHyB (/fɪb/) is a simple (cursed) hypertext builder/processor using python in less than 200 lines of code.
You need python 3.6+ for PHyB to work.
To run PHyB on a single file use:
./phyb ./website/index.phb ./build/index.html
To run PHyB on a folder use:
./phyb ./website/ ./build/
The usage string currently looks like this:
usage: phyb [-h] [-v] INPUT_PATH [OUTPUT_PATH]
PHyB: Python Hypertext Builder.
positional arguments:
INPUT_PATH
OUTPUT_PATH
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
Here's an example simple page:
{!
from datetime import date
!}
<!doctype html>
<html>
<head>
<title>Simple little page.</title>
</head>
<body>
<p>This page was generated on {$ date.today() $}.</p>
</body>
</html>
Which would produce the following output (well if the date was 2020-03-09):
<!doctype html>
<html>
<head>
<title>Simple little page.</title>
</head>
<body>
<p>This page was generated on 2020-03-09.</p>
</body>
</html>
PHyB is currently used to generate my website polyomino.xyz.