From 5c7facef0a87ff52292fbe1f289f1574f93328f5 Mon Sep 17 00:00:00 2001 From: micmalti <31540652+micmalti@users.noreply.github.com> Date: Fri, 15 Mar 2024 04:42:29 +0100 Subject: [PATCH 1/2] Update readme.md Add more detailed usage instructions --- readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. From 062edd75169f0ab3f9738c7ad16512e5a1642c8e Mon Sep 17 00:00:00 2001 From: micmalti <31540652+micmalti@users.noreply.github.com> Date: Fri, 15 Mar 2024 04:45:47 +0100 Subject: [PATCH 2/2] Update export_stars.py Fix errors --- export_stars/export_stars.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()