-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reformat reference documentation layout
- Loading branch information
1 parent
f19215c
commit ef14979
Showing
13 changed files
with
322 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.wy-nav-content { | ||
max-width: 1200px !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{ fullname | escape | underline}} | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. auto{{ objtype }}:: {{ objname }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{%- set is_root = basename == project -%} | ||
{%- set module_footer = ["base", "exception"] -%} | ||
{%- set module_caps = ["api", "m3u", "xautopf", "flac", "mp3", "m4a", "wma"] -%} | ||
|
||
{%- macro formatname(name) -%} | ||
{%- if name.endswith(".exception") -%} | ||
{%- set name = "exceptions"-%} | ||
{%- else -%} | ||
{%- set name = name.replace("syncify.", "").split(".") | last -%} | ||
{%- endif -%} | ||
|
||
{%- if name | lower in module_caps -%} | ||
{{- name | upper -}} | ||
{%- else -%} | ||
{{- name | title -}} | ||
{%- endif -%} | ||
{%- endmacro -%} | ||
|
||
{{ formatname(fullname) | escape | underline}} | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. autoclass:: {{ objname }} | ||
|
||
{%- block methods -%} | ||
.. automethod:: __init__ | ||
|
||
{%- if methods -%} | ||
.. rubric:: {{ _('Methods') }} | ||
|
||
.. autosummary:: | ||
{%- for item in methods -%} | ||
~{{ name }}.{{ item }} | ||
{%- endfor %} | ||
{%- endif -%} | ||
{%- endblock -%} | ||
|
||
{%- block attributes -%} | ||
{%- if attributes -%} | ||
.. rubric:: {{ _('Attributes') }} | ||
|
||
.. autosummary:: | ||
{%- for item in attributes -%} | ||
~{{ name }}.{{ item }} | ||
{%- endfor %} | ||
{%- endif -%} | ||
{%- endblock -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{%- set is_root = basename == project -%} | ||
{%- set module_footer = ["base", "exception"] -%} | ||
{%- set module_caps = ["api", "m3u", "xautopf", "flac", "mp3", "m4a", "wma"] -%} | ||
|
||
{%- macro formatname(name) -%} | ||
{%- if name.endswith(".exception") -%} | ||
{%- set name = "exceptions"-%} | ||
{%- else -%} | ||
{%- set name = name.replace("syncify.", "").split(".") | last -%} | ||
{%- endif -%} | ||
|
||
{%- if name | lower in module_caps -%} | ||
{{- name | upper -}} | ||
{%- else -%} | ||
{{- name | title -}} | ||
{%- endif -%} | ||
{%- endmacro -%} | ||
|
||
{{ formatname(fullname) | escape | underline}} | ||
|
||
{% if classes -%} | ||
.. inheritance-diagram:: {{ fullname }} | ||
:parts: 1 | ||
{%- endif %} | ||
|
||
.. automodule:: {{ fullname }} | ||
|
||
{%- block attributes -%} | ||
{%- if attributes -%} | ||
.. rubric:: {{ _('Module Attributes') }} | ||
|
||
.. autosummary:: | ||
{% for item in attributes %} | ||
{{ item }} | ||
{%- endfor -%} | ||
{%- endif -%} | ||
{% endblock %} | ||
|
||
{% block functions -%} | ||
{% if functions -%} | ||
.. rubric:: {{ _('Functions') }} | ||
.. autosummary:: | ||
{% for item in functions %} | ||
{{ item }} | ||
{%- endfor -%} | ||
{%- endif -%} | ||
{% endblock %} | ||
|
||
{% block classes -%} | ||
{% if classes -%} | ||
.. rubric:: {{ _('Classes') }} | ||
.. autosummary:: | ||
{% for item in classes %} | ||
{{ item }} | ||
{%- endfor -%} | ||
{%- endif -%} | ||
{% endblock %} | ||
|
||
{% block exceptions -%} | ||
{% if exceptions -%} | ||
.. rubric:: {{ _('Exceptions') }} | ||
.. autosummary:: | ||
{% for item in exceptions %} | ||
{{ item }} | ||
{%- endfor -%} | ||
{%- endif -%} | ||
{%- endblock %} | ||
|
||
{%- block modules -%} | ||
{%- if modules %} | ||
.. rubric:: Modules | ||
|
||
.. autosummary:: | ||
:toctree: | ||
:recursive: | ||
{% for item in modules %} | ||
{{ item }} | ||
{% endfor %} | ||
{% endif %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{%- set is_root = basename == project -%} | ||
{%- set module_footer = ["base", "exception"] -%} | ||
{%- set module_caps = ["api", "m3u", "xautopf", "flac", "mp3", "m4a", "wma"] -%} | ||
|
||
{%- macro formatname(name) -%} | ||
{%- if name.endswith(".exception") -%} | ||
{%- set name = "exceptions"-%} | ||
{%- else -%} | ||
{%- set name = name.replace("syncify.", "").split(".") | last -%} | ||
{%- endif -%} | ||
|
||
{%- if name | lower in module_caps -%} | ||
{{- name | upper -}} | ||
{%- else -%} | ||
{{- name | title -}} | ||
{%- endif -%} | ||
{%- endmacro -%} | ||
|
||
{%- if show_headings -%} | ||
{{- formatname(basename) | e | heading }} | ||
|
||
.. inheritance-diagram:: {{ basename }} | ||
:parts: 1 | ||
{%- endif %} | ||
|
||
.. automodule:: {{ qualname }} | ||
{% for option in automodule_options -%} | ||
:{{ option }}: | ||
{% endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{%- set is_root = pkgname == project -%} | ||
{%- set module_footer = ["base", "exception"] -%} | ||
{%- set module_caps = ["api", "m3u", "xautopf", "flac", "mp3", "m4a", "wma"] -%} | ||
|
||
{%- macro formatname(name) -%} | ||
{%- if name.endswith(".exception") -%} | ||
{%- set name = "exceptions"-%} | ||
{%- else -%} | ||
{%- set name = name.replace("syncify.", "").split(".") | last -%} | ||
{%- endif -%} | ||
|
||
{%- if name | lower in module_caps -%} | ||
{{- name | upper -}} | ||
{%- else -%} | ||
{{- name | title -}} | ||
{%- endif -%} | ||
{%- endmacro -%} | ||
|
||
{%- macro toctree(docnames, caption) %} | ||
.. toctree:: | ||
:maxdepth: {{ maxdepth }} | ||
:caption: {{ caption }}: | ||
|
||
{% for docname in docnames if docname.rstrip("s") not in module_footer -%} | ||
{{ docname }} | ||
{% endfor -%} | ||
|
||
{% for docname in docnames if docname.rstrip("s") in module_footer -%} | ||
{{ docname }} | ||
{% endfor -%} | ||
{%- endmacro -%} | ||
|
||
{%- macro automodule(modname, options) %} | ||
.. automodule:: {{ modname }} | ||
{% for option in automodule_options -%} | ||
:{{ option }}: | ||
{% endfor -%} | ||
{%- endmacro -%} | ||
|
||
{%- macro autosubmodule(modname, options) %} | ||
{%- if show_headings -%} | ||
{{ formatname(modname) | e | heading(1 if is_root else 2) }} | ||
|
||
.. inheritance-diagram:: {{ modname }} | ||
:parts: 1 | ||
{% endif -%} | ||
|
||
{{ automodule(modname, automodule_options) -}} | ||
{%- endmacro -%} | ||
|
||
{%- if not is_root -%} | ||
{%- if is_namespace %} | ||
{{- formatname(pkgname) | e | heading }} | ||
{% else -%} | ||
{{- formatname(pkgname) | e | heading }} | ||
{% endif -%} | ||
|
||
{% if is_namespace -%} | ||
.. py:module:: {{ pkgname }} | ||
{%- endif -%} | ||
|
||
{% if modulefirst and not is_namespace -%} | ||
{{- automodule(pkgname, automodule_options) -}} | ||
{%- endif -%} | ||
|
||
{%- if subpackages -%} | ||
{{- toctree(subpackages, "Subpackages") -}} | ||
{%- endif -%} | ||
{%- endif -%} | ||
|
||
{%- if submodules and (not separatemodules or not is_root) -%} | ||
{%- if not is_root and separatemodules -%} | ||
{{- toctree(submodules, "Submodules") -}} | ||
{% else %} | ||
{% for submodule in submodules if not submodule.split(".")[-1] in module_footer -%} | ||
{{- autosubmodule(submodule, automodule_options) }} | ||
{% endfor %} | ||
{%- for submodule in submodules if submodule.split(".")[-1] in module_footer -%} | ||
{{- autosubmodule(submodule, automodule_options) }} | ||
{% endfor %} | ||
{%- endif -%} | ||
|
||
{%- if not modulefirst and not is_namespace -%} | ||
Module contents | ||
--------------- | ||
|
||
{{- automodule(pkgname, automodule_options) -}} | ||
{%- endif -%} | ||
|
||
{%- endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{ header | heading }} | ||
|
||
.. toctree:: | ||
:maxdepth: {{ maxdepth }} | ||
|
||
{% for docname in docnames %} | ||
{{ docname }} | ||
{%- endfor %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.