sphinx-notes / any

Sphinx domain for documenting anything
https://sphinx.silverrainz.me/any/
BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

Simplify object schema definition #38

Closed SilverRainZ closed 1 month ago

SilverRainZ commented 1 month ago

The current syntax is quite complex:

version_schema = Schema('version',
                        name=F(unique=True, referenceable=True, required=True, form=F.Form.LINES),
                        attrs={'date': F(referenceable=True)},
                        content=F(form=F.Form.LINES),
                        description_template=open('_templates/version.rst', 'r').read(),
                        reference_template='🏷️{{ title }}',
                        missing_reference_template='🏷️{{ title }}',
                        ambiguous_reference_template='🏷️{{ title }}')
SilverRainZ commented 1 month ago

Dup with #16