Contributions are very much welcome!!
fspx
is a Sphinx extension that provides automatic documentation for Modern Fortran code, including docstrings and procedure argument descriptions.
- Parses Fortran modules, subroutines, functions, and types.
- Supports docstrings using Fortran comments (
!>
). - Automatically generates documentation with Sphinx.
You can install the package using pip
:
pip install fspx
If you want to install in developer mode for contributing, from the root folder:
pip install -e .
To use the extension, add it to your Sphinx configuration (conf.py
):
extensions = [
'fspx'
]
You can then use the autofortran
directive as follows:
in your .rst
files:
.. autofortran:: path/to/your/fortran/file.f90
in your .md
files:
```{eval-rst}
.. autofortran:: path/to/your/fortran/file.f90
```