diff --git a/export_stars/export_stars.py b/export_stars/export_stars.py index 6a93a32..66e2377 100755 --- a/export_stars/export_stars.py +++ b/export_stars/export_stars.py @@ -31,7 +31,8 @@ def config_retry(backoff_factor=1.0, total=8): def parse_args(): parser = ArgumentParser(description="export a GitHub user's starred repositorys to CSV") parser.add_argument("--user") - parser.add_argument("--github-token") + parser.add_argument("--token") + parser.add_argument("--dest") return parser.parse_args() diff --git a/readme.md b/readme.md index 110f72c..3d037be 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,7 @@ This script exports a GitHub user's starred repositories (URL & description) to a CSV file. -Usage: `GH_USER=defunkt python3 export_stars.py > stars.csv` +Usage: `python export_stars.py --user=GH_USER --token=TOKEN > stars.csv` + +To generate the token, go to Settings > Advanced Settings > Personal access tokens (classic). Limit its scope to `public_repo`. Thanks to the authors of [PyGitHub](https://github.com/PyGithub/PyGithub) for the slick client library.