mirror of
https://github.com/CompeyDev/lune-packaging.git
synced 2025-01-06 02:49:10 +00:00
feat(utils): readme updater tool
This commit is contained in:
parent
e623832879
commit
55ac5dec0c
2 changed files with 34 additions and 10 deletions
10
README.md
10
README.md
|
@ -1,10 +0,0 @@
|
|||
This repository houses the require manifests and build scripts for lune packaging. For more information on lune,
|
||||
see [filiptibell/lune](https://github.com/filiptibell/lune).
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
Packaging Status
|
||||
</summary>
|
||||
|
||||
|
||||
</details>
|
34
utils/readme_update.py
Normal file
34
utils/readme_update.py
Normal file
|
@ -0,0 +1,34 @@
|
|||
from platform import platform
|
||||
import tomllib as toml
|
||||
|
||||
README_HEADER = """This repository houses the require manifests and build scripts for lune packaging. For more information on lune, see [filiptibell/lune](https://github.com/filiptibell/lune).
|
||||
"""
|
||||
MARKDOWN_TABLE_HEADER = """| Package Registry | Status |
|
||||
|------|------|
|
||||
"""
|
||||
|
||||
__VERSION__ = f"v0.1.0-{platform()}"
|
||||
|
||||
def main():
|
||||
print('running readme_updater ', __VERSION__)
|
||||
with open("status.toml", 'rb') as status_file:
|
||||
packaging_statuses = toml.load(status_file)
|
||||
|
||||
generated_md_table = MARKDOWN_TABLE_HEADER + ""
|
||||
|
||||
for package, status in packaging_statuses.items():
|
||||
generated_md_table += f"{package} | {status}"
|
||||
|
||||
updated_readme = """<details>
|
||||
<summary>
|
||||
Packaging Status
|
||||
</summary>
|
||||
{}
|
||||
</details>
|
||||
""".format(generated_md_table)
|
||||
|
||||
print(generated_md_table)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in a new issue