Leaf Index
Leaf Index

A few useful starting points.

These are small, explicit examples. Replace the paths with directories you have reviewed.

Browse the included sample

The sample index was generated with the bundled script from three small text files. The links lead to actual files in this documentation bundle.

Include one level of folders

terminal
python3 leafindex.py ./handouts --recursive --max-depth 1 \
  --output ./handouts/list.html --title "Workshop handouts"

Files in the root and its immediate child directories are included. A grandchild directory is not visited.

List only Markdown and PDF files

terminal
python3 leafindex.py ./public-notes --extensions .md,.pdf \
  --output ./public-notes/catalog.html

Matching is based on the final suffix. Other files remain untouched; they simply do not appear in this list.

Use paths with spaces

terminal
python3 leafindex.py "./Reading Notes" \
  --output "./Reading Notes/index.html" --title "Reading Notes"

Quote paths in the shell. The generated links percent-encode spaces and other filename characters, and the visible names are HTML-escaped.

Refresh an index deliberately

The script refuses to replace an existing page. Generate a new filename, inspect it, then replace the previous page yourself if appropriate. There is no unattended refresh service.