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-factory
Process a license file:
plain-factory process input.yaml --output ./output --format all
Validate a license file:
plain-factory validate license.yaml
from 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-factory
Install development dependencies:
pip install -e ".[dev]"
Run tests:
pytest
Run with coverage:
pytest --cov=plain_factory
# Lint
ruff check .
# Format
ruff format .
# Type check
mypy src
MIT License