authors package¶
authors.lib module¶
This module contains functions used by authors.
Reads a configuration file, usually .authors.yml.
Parameters: file (str) – The name of a file with user-defined configuration settings.
The default value is .authors.yml.
Returns: The contents of a configuration file or an empty str. Return type: str
Parses YAML to a dict.
Parameters: contents (str) – The contents of a file with user-defined configuration settings. Returns: Configuration settings (one key-value pair per setting) or an empty dict. Return type: dict
Validates configuration settings.
Parameters: configuration (dict) – The unvalidated configuration settings. Returns: configuration – The validated configuration settings, using default values in the case of missing or invalid values. Return type: dict
Reads from standard input.
Returns: authors – A unique, sorted list of authors. Return type: list
Renders a template in adoc, html, md, rst, or txt format.
Parameters: - authors (list) – The authors to include in the rendered template.
- configuration (dict) – Configuration settings relevant to the rendered template (heading, opening, and closing).
Returns: The rendered template.
Return type: str
Writes the rendered template to a file, usually AUTHORS.
Parameters: - contents (str) – The rendered template.
- configuration (dict) – Configuration settings relevant to the AUTHORS file (name).
Generates an AUTHORS file.
Parameters: file (str) – The name of a file with user-defined configuration settings.
The default value is .authors.yml.
Module contents¶
Thank the people who contribute to your Git/GitHub project by creating an AUTHORS file.
Generates an AUTHORS file.
Parameters: file (str) – The name of a file with user-defined configuration settings.
The default value is .authors.yml.