mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-24 09:35:39 +01:00
cd163045be
Very close to API documentation complete for #95
58 lines
1.2 KiB
Plaintext
58 lines
1.2 KiB
Plaintext
{%- macro automodule(modname, options) -%}
|
|
.. automodule:: {{ modname }}
|
|
{%- for option in options %}
|
|
:{{ option }}:
|
|
{%- endfor %}
|
|
{%- endmacro %}
|
|
|
|
{%- macro toctree(docnames) -%}
|
|
.. toctree::
|
|
:maxdepth: {{ maxdepth }}
|
|
{% for docname in docnames %}
|
|
{{ docname }}
|
|
{%- endfor %}
|
|
{%- endmacro %}
|
|
|
|
{%- if pkgname == "pwncat" %}
|
|
{{- "API Documentation" | e | heading }}
|
|
{% else %}
|
|
{%- if is_namespace %}
|
|
{{- [pkgname, "namespace"] | join(" ") | e | heading }}
|
|
{% else %}
|
|
{{- [pkgname, "package"] | join(" ") | e | heading }}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{%- if modulefirst and not is_namespace %}
|
|
{{ automodule(pkgname, automodule_options) }}
|
|
{% endif %}
|
|
|
|
{%- if subpackages %}
|
|
Subpackages
|
|
-----------
|
|
|
|
{{ toctree(subpackages) }}
|
|
{% endif %}
|
|
|
|
{%- if submodules %}
|
|
Submodules
|
|
----------
|
|
{% if separatemodules %}
|
|
{{ toctree(submodules) }}
|
|
{% else %}
|
|
{%- for submodule in submodules %}
|
|
{% if show_headings %}
|
|
{{- [submodule, "module"] | join(" ") | e | heading(2) }}
|
|
{% endif %}
|
|
{{ automodule(submodule, automodule_options) }}
|
|
{% endfor %}
|
|
{%- endif %}
|
|
{%- endif %}
|
|
|
|
{%- if not modulefirst and not is_namespace %}
|
|
Module contents
|
|
---------------
|
|
|
|
{{ automodule(pkgname, automodule_options) }}
|
|
{% endif %}
|