2020-11-17 18:18:20 +00:00
|
|
|
#!/usr/bin/env python3
|
2021-01-02 10:04:50 +00:00
|
|
|
import glob
|
2020-11-17 18:18:20 +00:00
|
|
|
import subprocess
|
|
|
|
|
|
|
|
def countTpl(path):
|
2021-01-02 10:04:50 +00:00
|
|
|
return len(glob.glob(path + "/*.*"))
|
2020-11-17 18:18:20 +00:00
|
|
|
|
|
|
|
def command(args, start=None, end=None):
|
|
|
|
return "\n".join(subprocess.run(args, text=True, capture_output=True).stdout.split("\n")[start:end])[:-1]
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
version = command(["git", "describe", "--tags", "--abbrev=0"])
|
2020-11-17 18:55:17 +00:00
|
|
|
template = eval(open(".github/scripts/README.tmpl", "r").read())
|
2020-11-17 18:18:20 +00:00
|
|
|
|
|
|
|
print(template)
|
|
|
|
f = open("README.md", "w")
|
2020-11-17 18:26:27 +00:00
|
|
|
f.write(template)
|
2020-11-17 18:55:17 +00:00
|
|
|
f.close()
|