Skip to content

docs: Add first version of a script that can convert forms from core into tabbed restructured text pages #697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Monviech
Copy link
Member

I did quite a few of these so lets automate it.

The result can be seen in this PR:

#696

The script is executed like this inside the docs folder:

/bin/python3.11 ./collect_forms.py --input /src/git/core/src/opnsense/mvc/app/controllers/OPNsense/Firewall/forms

And it will generate the following output:

Generated: source/manual/forms/Firewall/categoryedit.rst
Generated: source/manual/forms/Firewall/dialogfilterrule.rst
Generated: source/manual/forms/Firewall/dialognptrule.rst
Generated: source/manual/forms/Firewall/dialogonetoonerule.rst
Generated: source/manual/forms/Firewall/dialogsnatrule.rst
Generated: source/manual/forms/Firewall/geoipsettings.rst
Generated: source/manual/forms/Firewall/groupedit.rst

This can be used as includes in a manual like this:

.. include:: /manual/forms/Firewall/dialogfilterrule.rst

Now we can regenerate this tabbed view we have used in the manual without manually editing it. Its just one script execution and thats it.

@Monviech Monviech added the feature Adding new functionality label Apr 11, 2025
@Monviech Monviech requested a review from AdSchellevis April 11, 2025 12:57
@Monviech Monviech self-assigned this Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new functionality
Development

Successfully merging this pull request may close these issues.

1 participant