Guest User

Untitled

a guest
Feb 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #!/usr/bin/python3
  2.  
  3. import yaml
  4. from pathlib import Path
  5.  
  6. USERNAME = input('Enter your GitHub username:\n')
  7. REPO_DIR = input('Enter the repo location:\n')
  8. EXCEPT = ['.gitignore']
  9.  
  10. p = Path(REPO_DIR)
  11. l = [x for x in p.iterdir() if x.is_dir()]
  12. count = 0
  13.  
  14. for x in range(len(l)):
  15. try:
  16. config = l[x] / "lilac.yaml"
  17. with config.open() as f:
  18. maintainers = yaml.load(f)['maintainers']
  19. for y in range(len(maintainers)):
  20. m = maintainers[y]['github']
  21. if m == USERNAME:
  22. print('Package: ' + l[x].name)
  23. count += 1
  24. except FileNotFoundError:
  25. continue
  26.  
  27. print('Maintaining Packages: %d' % count)
Add Comment
Please, Sign In to add comment