The (crude) site.

It's funny that I'm using nbconvert, markdown, pandoc, tidy, and of
course python, all to make a simple static website...

"There's got to be a better way!"
This commit is contained in:
Simon Forman 2022-09-16 07:36:28 -07:00
parent b67fc46291
commit 7a25eee481
36 changed files with 531235 additions and 0 deletions

2605
docs/html/FR.html Normal file

File diff suppressed because it is too large Load Diff

View File

@ -86,7 +86,10 @@ coordinate pair in a square spiral (like the kind used to construct an
</code></pre>
<h2>Documentation</h2>
<h3>Jupyter Notebooks</h3>
<p><a href="/notebooks/index.html">Notebooks</a></p>
<p>The docs/notebooks dir contains Jupyter notebooks, ... TODO</p>
<h2>Function Reference</h2>
<p><a href="/FR.html">Function Reference</a></p>
<h3>Building the Docs</h3>
<p>Run <code>make</code> in the <code>docs</code> directory.</p>
<h2>Basics of Joy</h2>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

18709
docs/html/notebooks/Trees.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

20532
docs/html/notebooks/Types.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,49 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Thun Notebooks</title>
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<p><a href="/">Thun</a></p>
<h1>Notebooks</h1>
<p>Various Jupyter notebooks, some more polished than others, a few incomplete.
I'm in the process of rewriting them to use the Joy kernel.</p>
<ul>
<li><a href="/notebooks/0._This_Implementation_of_Joy_in_Python.html">0. This Implementation of Joy in Python</a></li>
<li><a href="/notebooks/1._Basic_Use_of_Joy_in_a_Notebook.html">1. Basic Use of Joy in a Notebook</a></li>
<li><a href="/notebooks/2._Library_Examples.html">2. Library Examples</a></li>
<li><a href="/notebooks/3._Developing_a_Program.html">3. Developing a Program</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_1st.html">Advent of Code 2017 December 1st</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_2nd.html">Advent of Code 2017 December 2nd</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_3rd.html">Advent of Code 2017 December 3rd</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_4th.html">Advent of Code 2017 December 4th</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_5th.html">Advent of Code 2017 December 5th</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_6th.html">Advent of Code 2017 December 6th</a></li>
<li><a href="/notebooks/Compiling_Joy.html">Compiling Joy</a></li>
<li><a href="/notebooks/Correcet_Programming.html">Correcet Programming</a></li>
<li><a href="/notebooks/Derivatives_of_Regular_Expressions.html">Derivatives of Regular Expressions</a></li>
<li><a href="/notebooks/Generator_Programs.html">Generator Programs</a></li>
<li><a href="/notebooks/Hylo-,_Ana-,_Cata-,_and_Para-morphisms_-_Recursion_Combinators.html">Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators</a></li>
<li><a href="/notebooks/Joy-in-Jupyter.html">Joy-in-Jupyter</a></li>
<li><a href="/notebooks/Multiples-of-3-and-5.html">Multiples-of-3-and-5</a></li>
<li><a href="/notebooks/Newton-Raphson.html">Newton-Raphson</a></li>
<li><a href="/notebooks/Ordered_Binary_Trees.html">Ordered Binary Trees</a></li>
<li><a href="/notebooks/Quadratic.html">Quadratic</a></li>
<li><a href="/notebooks/Recursion_Combinators.html">Recursion Combinators</a></li>
<li><a href="/notebooks/Remove-Function.html">Remove-Function</a></li>
<li><a href="/notebooks/Replacing.html">Replacing</a></li>
<li><a href="/notebooks/Square_Spiral.html">Square Spiral</a></li>
<li><a href="/notebooks/The_Four_Operations.html">The Four Operations</a></li>
<li><a href="/notebooks/Trees.html">Trees</a></li>
<li><a href="/notebooks/Treestep.html">Treestep</a></li>
<li><a href="/notebooks/TypeChecking.html">TypeChecking</a></li>
<li><a href="/notebooks/Types.html">Types</a></li>
<li><a href="/notebooks/Zipper.html">Zipper</a></li>
<li><a href="/notebooks/fun_with_scan.html">fun with scan</a></li>
<li><a href="/notebooks/with_sympy.html">with sympy</a></li>
</ul>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,53 @@
import pathlib, re, sys
import markdown
url_base = pathlib.Path('/notebooks')
r = re.compile('<title>(.*)</title>')
def title_of(html_path):
return r.search(html_path.read_text()).group(1).replace('_', ' ')
# Just explode if there's no match.
# NoneType has no "group" attr...
notebook_dir = pathlib.Path('.')
htmls = sorted(
(
path
for path in notebook_dir.glob('*.html')
if not path.name == 'index.html'
),
key=title_of,
)
text = ['''\
[Thun](/)
# Notebooks
Various Jupyter notebooks, some more polished than others, a few incomplete.
I'm in the process of rewriting them to use the Joy kernel.
''']
for p in htmls:
text.append(f'* [{title_of(p)}]({(url_base/p.name)!s})\n')
html = markdown.markdown(''.join(text), output_format="html5")
print(f'''\
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Thun Notebooks</title>
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
{html}
</body>
</html>
''')