Plain Factory is a flexible license construction system for Plain License. It provides tools for deconstructing and reconstructing licenses in various formats.
- Flexible license construction from YAML metadata
- Multiple output formats (Markdown, plaintext, reader-friendly)
- Customizable license templates
- Command-line interface for easy integration
pip install plain-factoryProcess a license file:
plain-factory process input.yaml --output ./output --format allValidate a license file:
plain-factory validate license.yamlfrom plain_factory import LicenseContent, assemble_license_page
# Create a license content object
license_content = LicenseContent.from_yaml("path/to/license.yaml")
# Assemble a license page
page = assemble_license_page(license_content)
# Save the license in different formats
page.save_markdown("output/license.md")
page.save_plaintext("output/license.txt")Clone the repository with submodules:
git clone --recursive https://github.com/plainlicense/plain-factory.git
cd plain-factoryInstall development dependencies:
pip install -e ".[dev]"Run tests:
pytestRun with coverage:
pytest --cov=plain_factory# Lint
ruff check .
# Format
ruff format .
# Type check
mypy srcMIT License