sphinx_licenseinfo
¶
Sphinx directives for showing license information.
Classes:
Sphinx role for referencing a license on choosealicense.com. |
|
|
Directive for showing a license. |
|
Directive for showing information about a license. |
Functions:
|
Setup |
-
class
ChooseALicenseRole
[source]¶ Bases:
ReferenceRole
Sphinx role for referencing a license on choosealicense.com.
Methods:
run
()Process the role.
-
class
LicenseDirective
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
SphinxDirective
Directive for showing a license.
The license can be taken from a Python package’s metadata, or from a filename relative to the Sphinx source directory.
Methods:
problematic
(message)Reports an error while processing the directive.
run
()Process the content of the directive.
-
class
LicenseInfoDirective
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
SphinxDirective
Directive for showing information about a license.
The license information is obtained from choosealicense.com.
Methods:
add_rules_list
(category, rules)Add a heading for a rule category, followed by a bullet-point list of the rules in that category.
run
()Process the content of the directive.