{"id":13658510,"url":"https://github.com/nodiscc/github-stars-backup","last_synced_at":"2025-05-15T07:34:12.118Z","repository":{"id":41332154,"uuid":"83040518","full_name":"nodiscc/github-stars-backup","owner":"nodiscc","description":"[mirror] Backup a list of github starred repositories for the specified user.","archived":false,"fork":false,"pushed_at":"2023-05-06T12:23:34.000Z","size":63,"stargazers_count":137,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-03T05:41:29.418Z","etag":null,"topics":["backup","export","github","stars"],"latest_commit_sha":null,"homepage":"https://gitlab.com/nodiscc/github-stars-backup","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodiscc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-24T12:45:09.000Z","updated_at":"2025-02-13T08:22:44.000Z","dependencies_parsed_at":"2024-11-10T12:42:07.429Z","dependency_job_id":null,"html_url":"https://github.com/nodiscc/github-stars-backup","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodiscc%2Fgithub-stars-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodiscc%2Fgithub-stars-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodiscc%2Fgithub-stars-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodiscc%2Fgithub-stars-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodiscc","download_url":"https://codeload.github.com/nodiscc/github-stars-backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254297364,"owners_count":22047480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","export","github","stars"],"created_at":"2024-08-02T05:01:00.186Z","updated_at":"2025-05-15T07:34:11.864Z","avatar_url":"https://github.com/nodiscc.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# github-stars-backup\n\nBackup a list of github starred repositories for the specified user.\n\n### Python version\n\n- The python version requires that you generate a [Personal Access Token](https://github.com/settings/tokens) using one of the following methods:\n  - Create a \"classic\" token with the scope `read:user`.\n  - Or, use a new \"fine-grained token\" with the `Account Permissions` -\u003e `Starring` -\u003e `read-only` permission.\n- The token must be exported to the `GITHUB_ACCESS_TOKEN` environment variable\n- It outputs a JSON file containing the name, description, url, homepage, language number of open issues/stars of each starred repository\n- The rate limit for authenticated API requests is 5000 requests/hour.\n\n#### Installation\n\n```bash\n# install requirements in a virtualenv\npython3 -m venv ~/.local/venv\nsource ~/.local/venv/bin/activate\npip3 install PyGithub\n\n# clone the repository\ngit clone https://gitlab.com/nodiscc/github-stars-backup\ncd github-stars-backup\n```\n\n#### Usage\n\n```bash\n# all commands must be run from the virtualenv\nsource ~/.local/venv/bin/activate\n\n./github-stars-backup.py --help\n  USAGE: ./github-stars-backup.py USERNAME OUTPUT_FILE\n  GITHUB_ACCESS_TOKEN must be declared in the environment, see https://github.com/settings/tokens\n\nexport GITHUB_ACCESS_TOKEN=aaaabbbbccccddddeeefffggghhhiijjj\n./github-stars-backup.py nodiscc github-stars-backup.json\n```\n\n```json\n$ cat github-stars-backup.json\n{\n  \"ayyi/samplecat\": {\n    \"name\": \"ayyi/samplecat\",\n    \"description\": \"SampleCat is a a program for cataloguing and auditioning audio samples.\",\n    \"url\": \"https://github.com/ayyi/samplecat\",\n    \"homepage\": \"http://ayyi.github.io/samplecat/\",\n    \"language\": \"C\",\n    \"open_issues\": 15,\n    \"stars\": 33\n  },\n  ...\n}\n```\n\n\n### Bash version (legacy)\n\n- The (unmaintained) bash version does not require API authentication.\n- It doesn't handle errors well, output will be wrong when the API rate limit is exceeded. The [rate limit](https://developer.github.com/v3/#rate-limiting) for unauthenticated requests is only 60 requests/hour.\n- An intermediary JSON file containing the full API request results will be stored at `github-stars.json`\n- The final output is a plain text list of starred repositories\n\n```bash\nUSAGE: ./github-stars-backup.sh USERNAME OUTPUT_FILE\n\n$ ./github-stars-backup.sh nodiscc github-stars.txt\n$ cat github-stars.txt\n```\n```\nhttps://github.com/eliasgranderubio/dagda\nhttps://github.com/banyanops/collector\nhttps://github.com/building5/ansible-vault-tools\n...\n```\n\n### License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodiscc%2Fgithub-stars-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodiscc%2Fgithub-stars-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodiscc%2Fgithub-stars-backup/lists"}