Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- import yaml
- from pathlib import Path
- USERNAME = input('Enter your GitHub username:\n')
- REPO_DIR = input('Enter the repo location:\n')
- EXCEPT = ['.gitignore']
- p = Path(REPO_DIR)
- l = [x for x in p.iterdir() if x.is_dir()]
- count = 0
- for x in range(len(l)):
- try:
- config = l[x] / "lilac.yaml"
- with config.open() as f:
- maintainers = yaml.load(f)['maintainers']
- for y in range(len(maintainers)):
- m = maintainers[y]['github']
- if m == USERNAME:
- print('Package: ' + l[x].name)
- count += 1
- except FileNotFoundError:
- continue
- print('Maintaining Packages: %d' % count)
Add Comment
Please, Sign In to add comment