Added buildscript for authors.
This commit is contained in:
27
AUTHORS.rst
27
AUTHORS.rst
@@ -1,4 +1,3 @@
|
||||
|
||||
================
|
||||
RTV Contributors
|
||||
================
|
||||
@@ -7,22 +6,26 @@ Thanks to the following people for their contributions to this project.
|
||||
|
||||
* `Michael Lazar <https://github.com/michael-lazar>`_
|
||||
* `Tobin Brown <https://github.com/Brobin>`_
|
||||
* `woorst <https://github.com/woorst>`_
|
||||
* `Théo Piboubès <https://github.com/TheoPib>`_
|
||||
* `Yusuke Sakamoto <https://github.com/yskmt>`_
|
||||
* `Johnathan Jenkins <https://github.com/shaggytwodope>`_
|
||||
* `obosob <https://github.com/obosob>`_
|
||||
* `Gustavo Zambonin <https://github.com/zambonin>`_
|
||||
* `mekhami <https://github.com/mekhami>`_
|
||||
* `Noah Morrison <https://github.com/noahmorrison>`_
|
||||
* `obosob <https://github.com/obosob>`_
|
||||
* `Toby Hughes <https://github.com/tobywhughes>`_
|
||||
* `Shawn Hind <https://github.com/shanhind>`_
|
||||
* `Noah Morrison <https://github.com/noahmorrison>`_
|
||||
* `mardiqwop <https://github.com/mardiqwop>`_
|
||||
* `Shawn Hind <https://github.com/shawnhind>`_
|
||||
* `5225225 <https://github.com/5225225>`_
|
||||
* `JuanPablo <https://github.com/juanpabloaj>`_
|
||||
* `Robert Greener <https://github.com/ragreener1>`_
|
||||
* `peterpans01 <https://github.com/peterpans01>`_
|
||||
* `Adam Talsma <https://github.com/a-tal>`_
|
||||
* `afloofloo <https://github.com/afloofloo>`_
|
||||
* `Matthew Smith <https://github.com/msmith491>`_
|
||||
* `Marc Abramowitz <https://github.com/msabramo>`_
|
||||
* `Hans Roman <https://github.com/snahor>`_
|
||||
* `Ram-Z <https://github.com/Ram-Z>`_
|
||||
* `mralext20 <https://github.com/mralext20>`_
|
||||
* `Wieland Hoffmann <http://github.com/mineo>`_
|
||||
* `Marc Abramowitz <http://github.com/msabramo>`_
|
||||
* `Hans Roman <http://github.com/snahor>`_
|
||||
* `Gustavo Zambonin <https://github.com/zambonin>`_
|
||||
|
||||
* `Wieland Hoffmann <https://github.com/mineo>`_
|
||||
* `Adam Talsma <https://github.com/a-tal>`_
|
||||
* `Alexander Terry <https://github.com/mralext20>`_
|
||||
* `peterpans01 <https://github.com/peterpans01>`_
|
||||
57
scripts/build_authors.py
Executable file
57
scripts/build_authors.py
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Scrape the project contributors list from Github and update AUTHORS.rst
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import os
|
||||
import time
|
||||
import logging
|
||||
|
||||
import requests
|
||||
|
||||
_filepath = os.path.dirname(os.path.relpath(__file__))
|
||||
|
||||
FILENAME = os.path.abspath(os.path.join(_filepath, '..', 'AUTHORS.rst'))
|
||||
URL = "https://api.github.com/repos/michael-lazar/rtv/contributors"
|
||||
HEADER = """\
|
||||
================
|
||||
RTV Contributors
|
||||
================
|
||||
|
||||
Thanks to the following people for their contributions to this project.
|
||||
|
||||
"""
|
||||
|
||||
def main():
|
||||
|
||||
logging.captureWarnings(True)
|
||||
|
||||
# Request the list of contributors
|
||||
print('GET {}'.format(URL))
|
||||
resp = requests.get(URL)
|
||||
contributors = resp.json()
|
||||
|
||||
lines = []
|
||||
for contributor in contributors:
|
||||
time.sleep(1.0)
|
||||
|
||||
# Request each contributor individually to get the full name
|
||||
print('GET {}'.format(contributor['url']))
|
||||
resp = requests.get(contributor['url'])
|
||||
user = resp.json()
|
||||
|
||||
name = user.get('name') or user['login']
|
||||
url = user['html_url']
|
||||
lines.append('* `{} <{}>`_'.format(name, url))
|
||||
|
||||
print('Writing to {}'.format(FILENAME))
|
||||
text = HEADER + '\n'.join(lines)
|
||||
text = text.encode('utf-8')
|
||||
with open(FILENAME, 'wb') as fp:
|
||||
fp.write(text)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
3
scripts/build_manpage.py
Normal file → Executable file
3
scripts/build_manpage.py
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Internal tool used to automatically generate an up-to-date version of the rtv
|
||||
man page. Currently this script should be manually ran after each version bump.
|
||||
@@ -6,6 +8,7 @@ In the future, it would be nice to have this functionality built into setup.py.
|
||||
Usage:
|
||||
$ python scripts/build_manpage.py
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
Reference in New Issue
Block a user