remove auto-gen action
This commit is contained in:
parent
fdbd8a9b97
commit
3eaa8661aa
3 changed files with 19 additions and 51 deletions
38
auto-gen.py
Normal file
38
auto-gen.py
Normal file
|
@ -0,0 +1,38 @@
|
|||
import logging
|
||||
import os
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
|
||||
|
||||
archs = ("x86_64",)
|
||||
archs_text = """[../](..)
|
||||
|
||||
"""
|
||||
README_text = """# PPR: Parch Pacman repository
|
||||
|
||||
"""
|
||||
base_url = "https://parchlinux.github.io/ppr/{arch}/{package}"
|
||||
|
||||
for arch in archs:
|
||||
logging.info("Generating for arch: %s", arch)
|
||||
README_text += f"- [{arch}]({arch})\n"
|
||||
|
||||
packages = os.listdir(arch)
|
||||
packages.sort()
|
||||
|
||||
for package in packages:
|
||||
if not ".zst" in package:
|
||||
continue
|
||||
|
||||
logging.info("Generating for package: %s", package)
|
||||
archs_text += (
|
||||
f"- [{package.split('.')[0]}]"
|
||||
+ "("
|
||||
+ base_url.format(arch=arch, package=package)
|
||||
+ ")\n"
|
||||
)
|
||||
|
||||
with open(f"{arch}/README.md", "w") as f:
|
||||
f.write(archs_text)
|
||||
|
||||
with open("README.md", "w") as f:
|
||||
f.write(README_text)
|
Loading…
Add table
Add a link
Reference in a new issue