• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[mirror] Backup a list of github starred repositories for the specified user.

github-stars-backup

Backup a list of github starred repositories for the specified user.

Python version

  • The python version requires that you generate a Personal Access Token using one of the following methods:
    • Create a "classic" token with the scope read:user.
    • Or, use a new "fine-grained token" with the Account Permissions -> Starring -> read-only permission.
  • The token must be exported to the GITHUB_ACCESS_TOKEN environment variable
  • It outputs a JSON file containing the name, description, url, homepage, language number of open issues/stars of each starred repository
  • The rate limit for authenticated API requests is 5000 requests/hour.

Installation

# install requirements in a virtualenv
python3 -m venv ~/.local/venv
source ~/.local/venv/bin/activate
pip3 install PyGithub

# clone the repository
git clone https://gitlab.com/nodiscc/github-stars-backup
cd github-stars-backup

Usage

# all commands must be run from the virtualenv
source ~/.local/venv/bin/activate

./github-stars-backup.py --help
  USAGE: ./github-stars-backup.py USERNAME OUTPUT_FILE
  GITHUB_ACCESS_TOKEN must be declared in the environment, see https://github.com/settings/tokens

export GITHUB_ACCESS_TOKEN=aaaabbbbccccddddeeefffggghhhiijjj
./github-stars-backup.py nodiscc github-stars-backup.json
$ cat github-stars-backup.json
{
  "ayyi/samplecat": {
    "name": "ayyi/samplecat",
    "description": "SampleCat is a a program for cataloguing and auditioning audio samples.",
    "url": "https://github.com/ayyi/samplecat",
    "homepage": "http://ayyi.github.io/samplecat/",
    "language": "C",
    "open_issues": 15,
    "stars": 33
  },
  ...
}

Bash version (legacy)

  • The (unmaintained) bash version does not require API authentication.
  • It doesn't handle errors well, output will be wrong when the API rate limit is exceeded. The rate limit for unauthenticated requests is only 60 requests/hour.
  • An intermediary JSON file containing the full API request results will be stored at github-stars.json
  • The final output is a plain text list of starred repositories
USAGE: ./github-stars-backup.sh USERNAME OUTPUT_FILE

$ ./github-stars-backup.sh nodiscc github-stars.txt
$ cat github-stars.txt
https://github.com/eliasgranderubio/dagda
https://github.com/banyanops/collector
https://github.com/building5/ansible-vault-tools
...

License

MIT

More Repositories

1

awesome-linuxaudio

[mirror] A list of software and resources for professional audio/video/live events production on Linux.
Shell
1,169
star
2

xsrv

[mirror] Install and manage self-hosted services/applications, on your own server(s) - ansible collection and utilities
Jinja
239
star
3

debian-live-config

[mirror] Debian GNU/Linux desktop operating system, preconfigured for personal computers/workstations
Makefile
65
star
4

shaarchiver

[archived] Archive your Firefox, Shaarli or delicious bookmarks
54
star
5

distrib-dl

[mirror] Download and verify Linux distribution installers/ISO images
Shell
17
star
6

hecat

Generic automation tool around data stored as plaintext YAML files
Python
16
star
7

toolbox

[mirror] misc. scripts/utilities/examples/ansible roles/archives/personal APT repository
Python
14
star
8

netdata-needrestart

[mirror] Check for processes/services/kernels that need to be restarted - netdata plugin
Python
5
star
9

netdata-logcount

[mirror] Count log messages by level over time - netdata plugin
Python
5
star
10

musical-artifacts-data

json data for musical-artifacts.com
Makefile
4
star
11

wiki.archlinux.org

git-mediawiki mirror of https://wiki.archlinux.org/
4
star
12

netdata-debsecan

[mirror] Check/graph the number of CVEs in currently installed packages - netdata plugin
Python
4
star
13

netdata-apt

[mirror] Check/graph number of upgradable packages - netdata plugin
Python
3
star
14

cc0-wallpapers

[mirror] Basic desktop wallpaper set under public domain license
2
star
15

fonts

2
star
16

awesome-sysadmin-data

[WIP] This repository will hold machine-readable data for awesome-sysadmin
Makefile
2
star
17

awesome-sysadmin-html

[WIP] HTML source for https://sysadmin.awesome-selfhosted.net/
1
star
18

plymouth-theme-debian-logo

A simple Debian theme for the plymouth boot screen [mirror]
1
star