Replace autodoc in Sphinx

With manually-written reference text. Autodoc won't work on Read The
Docs because it relies on the wrapper binary to be present, and it's too
complicated to build one that will work on Read The Docs and get it
there.
This commit is contained in:
Oliver Hamlet
2016-08-19 19:46:19 +01:00
parent da7b959fbb
commit fc30a3f0bb
3 changed files with 174 additions and 50 deletions
-1
View File
@@ -34,7 +34,6 @@ sys.path.insert(0, os.path.abspath('../build/Release'))
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
]
+154 -29
View File
@@ -9,55 +9,180 @@ Enumerations
============
The wrapped enumeration types below are classes in Python, but the distinction
makes no difference in practice, so they're grouped here for semantics.
makes no difference in practice, so they're grouped here for semantics. All
values are unsigned integer constants.
.. autoclass:: loot_api.GameType
:members:
:undoc-members:
.. py:class:: loot_api.GameType
.. autoclass:: loot_api.LanguageCode
:members:
:undoc-members:
Wraps :cpp:type:`loot::GameType` to expose the LOOT API's game
codes.
.. autoclass:: loot_api.MessageType
:members:
:undoc-members:
.. py:attribute:: fo3
.. py:attribute:: fo4
.. py:attribute:: fonv
.. py:attribute:: tes4
.. py:attribute:: tes5
.. autoclass:: loot_api.PluginCleanliness
:members:
:undoc-members:
.. py:class:: loot_api.LanguageCode
Wraps :cpp:type:`loot::LanguageCode` to expose the LOOT API's
language codes.
.. py:attribute:: english
.. py:attribute:: spanish
.. py:attribute:: russian
.. py:attribute:: french
.. py:attribute:: chinese
.. py:attribute:: polish
.. py:attribute:: brazilian_portuguese
.. py:attribute:: finnish
.. py:attribute:: german
.. py:attribute:: danish
.. py:attribute:: korean
.. py:class:: loot_api.MessageType
Wraps :cpp:type:`loot::MessageType` to expose the LOOT API's
message type codes.
.. py:attribute:: error
.. py:attribute:: say
.. py:attribute:: warn
.. py:class:: loot_api.PluginCleanliness
Wraps :cpp:type:`loot::PluginCleanliness` to expose the LOOT API's plugin cleanliness state codes.
.. py:attribute:: clean
.. py:attribute:: dirty
.. py:attribute:: do_not_clean
.. py:attribute:: unknown
Public-Field Data Structures
============================
Classes with public fields and no member functions.
.. autoclass:: loot_api.MasterlistInfo
:members:
:undoc-members:
.. py:class:: loot_api.MasterlistInfo
.. autoclass:: loot_api.Message
:members:
:undoc-members:
Wraps :cpp:class:`loot::MasterlistInfo`.
.. autoclass:: loot_api.PluginTags
:members:
:undoc-members:
.. py:attribute:: revision_id
A Unicode string containing a Git commit's SHA-1 checksum.
.. py:attribute:: revision_date
A Unicode string containing the date of the commit given by :py:attr:`revision_id`, in ISO 8601 format (YYYY-MM-DD).
.. py:attribute:: is_modified
A boolean that is true if the masterlist has been modified from its state
at the commit given by :py:attr:`revision_id`.
.. py:class:: loot_api.Message
Wraps :cpp:class:`loot::PluginMessage`.
.. py:attribute:: type
A :py:class:`loot_api.MessageType` giving the message type.
.. py:attribute:: text
A Unicode string containing the message text.
.. py:class:: loot_api.PluginTags
Wraps :cpp:class:`loot::PluginTags`.
.. py:attribute:: added
A set of Unicode strings giving Bash Tags suggested for addition.
.. py:attribute:: removed
A set of Unicode strings giving Bash Tags suggested for removal.
.. py:attribute:: is_modified
A boolean that is true if the suggestions contain metadata obtained from a loaded userlist.
Functions
=========
.. autofunction:: loot_api.is_compatible
.. py:function:: loot_api.is_compatible(int, int, int) -> bool
.. autofunction:: loot_api.create_database
Checks for API compatibility. Wraps :cpp:func:`loot::IsCompatible`.
.. py:function:: loot_api.create_database(game : loot_api.GameType, [game_path : unicode = u'', [game_local_path : unicode = u'']]) -> loot_api.DatabaseInterface
Initialise a new database handle. Wraps :cpp:func:`loot::IsCompatible`.
Classes
=======
.. autoclass:: loot_api.DatabaseInterface
:members:
.. py:class:: loot_api.DatabaseInterface
.. autoclass:: loot_api.Version
:members:
:undoc-members:
Wraps :cpp:class:`loot::DatabaseInterface`.
.. py:method:: eval_lists(loot_api.DatabaseInterface, loot_api.LanguageCode) -> NoneType
Evaluates all conditions and regular expression metadata entries in the loaded metadata lists. Wraps :cpp:func:`EvalLists`.
.. py:method:: get_masterlist_revision(loot_api.DatabaseInterface, unicode, bool) -> loot_api.MasterlistInfo
Gets the give masterlists source control revision. Wraps :cpp:func:`GetMasterlistRevision`.
.. py:method:: get_plugin_cleanliness(loot_api.DatabaseInterface, unicode) -> loot_api.PluginCleanliness
Determines the databases knowledge of a plugins cleanliness. Wraps :cpp:func:`GetPluginCleanliness`.
.. py:method:: get_plugin_messages(loot_api.DatabaseInterface, unicode) -> list<loot_api.Message>
Outputs the messages associated with the given plugin in the database. Wraps :cpp:func:`GetPluginMessages`.
.. py:method:: get_plugin_tags(loot_api.DatabaseInterface, unicode) -> loot_api.PluginTags
Outputs the Bash Tags suggested for addition and removal by the database for the given plugin. Wraps :cpp:func:`GetPluginTags`.
.. py:method:: load_lists(loot_api.DatabaseInterface, masterlist_path : unicode, [userlist_path : unicode = u'']) -> NoneType
Loads the masterlist and userlist from the paths specified. Wraps :cpp:func:`LoadLists`.
.. py:method:: sort_plugins(loot_api.DatabaseInterface, list<unicode>) -> list<unicode>
Calculates a new load order for all a games installed plugins and outputs the sorted order. Wraps :cpp:func:`SortPlugins`.
.. py:method:: update_masterlist(loot_api.DatabaseInterface, unicode, unicode, unicode) -> bool
Updates the given masterlist using the given Git repository details. Wraps :cpp:func:`UpdateMasterlist`.
.. py:method:: write_minimal_list(loot_api.DatabaseInterface, unicode, bool) -> NoneType
Writes a minimal metadata file containing only Bash Tag suggestions and/or cleanliness info from the loaded metadata. Wraps :cpp:func:`WriteMinimalList`.
.. py:class:: loot_api.Version
Wraps :cpp:class:`loot::LootVersion`.
.. py:attribute:: major
An unsigned integer giving the major version number.
.. py:attribute:: minor
An unsigned integer giving the minor version number.
.. py:attribute:: patch
An unsigned integer giving the patch version number.
.. py:attribute:: revision
A Unicode string containing the SHA-1 of the Git revision that the wrapped C++ API was built from.
.. py:staticmethod:: string() -> unicode
Returns the API version as a string of the form ``major.minor.patch``