1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-27 19:04:15 +01:00
pwncat/docs/apidoc/package.rst_t
Caleb Stewart cd163045be Added a lot of API documentation
Very close to API documentation complete for #95
2021-06-02 18:23:49 -04:00

35 lines
783 B
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+submodules) %}
Modules and Packages
--------------------
{{ toctree(subpackages+submodules) }}
{% endif %}