Adding upstream version 1.10.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
4b9b3f51bc
commit
91f63e89fb
7 changed files with 492 additions and 0 deletions
28
generate-readme
Executable file
28
generate-readme
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import yaml
|
||||
|
||||
Loader = getattr(yaml, 'CSafeLoader', yaml.SafeLoader)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
with open('.pre-commit-hooks.yaml') as f:
|
||||
hooks = yaml.load(f, Loader=Loader)
|
||||
|
||||
with open('README.md') as f:
|
||||
contents = f.read()
|
||||
before, delim, _ = contents.partition('[generated]: # (generated)\n')
|
||||
|
||||
rest = '\n'.join(
|
||||
f'- **`{hook["id"]}`**: {hook["description"]}' for hook in hooks
|
||||
)
|
||||
|
||||
with open('README.md', 'w') as f:
|
||||
f.write(before + delim + rest + '\n')
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
raise SystemExit(main())
|
Loading…
Add table
Add a link
Reference in a new issue