mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-26 06:14:35 +08:00
36 lines
774 B
Python
Executable file
36 lines
774 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
# Copyright © Michal Čihař <michal@weblate.org>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import re
|
|
import tomllib
|
|
|
|
print(
|
|
"""
|
|
.. Table is generated using scripts/show-extras
|
|
|
|
.. list-table:: Optional dependencies
|
|
:header-rows: 1
|
|
|
|
* - pip extra
|
|
- Python Package
|
|
- Weblate feature
|
|
"""
|
|
)
|
|
|
|
with open("pyproject.toml", "rb") as handle:
|
|
toml_dict = tomllib.load(handle)
|
|
|
|
for section, data in toml_dict["project"]["optional-dependencies"].items():
|
|
if section in {"all", "ci", "dev", "lint", "mypy", "test"}:
|
|
continue
|
|
dependency = re.split("[;<>=[]", data[0])[0].strip()
|
|
print(
|
|
f"""
|
|
* - ``{section}``
|
|
- `{dependency} <https://pypi.org/project/{dependency}>`_
|
|
-
|
|
"""
|
|
)
|