This directory contains utility scripts for the Forthic Python implementation.
Automatically generates comprehensive markdown documentation for all Forthic modules.
Features:
- Dynamically discovers all
DecoratedModulesubclasses - Extracts documentation from
@Wordand@DirectWorddecorators - Generates index and individual module documentation files
- Includes stack effects, descriptions, categories, options, and examples
Usage:
# Run directly
python3 scripts/generate_docs.py
# Or use the installed command (after pip install)
forthic-generate-docsOutput:
docs/index.md- Main index with module overviewdocs/modules/*.md- Individual module documentation files
What gets documented:
- Word names and stack effects
- Word descriptions
- Module-level metadata (categories, options, examples)
- Automatically sorted alphabetically
The script will automatically find all modules that inherit from DecoratedModule, so no manual configuration is needed when adding new modules!