Initial commit
This commit is contained in:
commit
0412d8a319
2 changed files with 40 additions and 0 deletions
2
README.md
Normal file
2
README.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
# pcp
|
||||
parch configs pacman repository
|
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 = """# PCP: Parch Config Pacman repository
|
||||
|
||||
"""
|
||||
base_url = "https://parch-os.github.io/pcp/{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