romaniukvadim / backup-my-github Goto Github PK
View Code? Open in Web Editor NEWClones all your repository to your local machine
License: Do What The F*ck You Want To Public License
Clones all your repository to your local machine
License: Do What The F*ck You Want To Public License
function cloneStars() {
green_color
echo
read -r -p "What is your username on GitHub: " username
read -r -p "What is your personal access token: " token
echo
blue_color
mkdir -p stars
pushd stars
repository_pages=$(curl -XGET -s https://"${username}":"${token}"@api.github.com/user/starred?per_page=100 -D - -o /dev/null | sed -nEe 's/^Link.+page=([[:digit:]]+)>; rel="last"/\1/p' | tr -d '[:space:]')
green_color
echo "Cloning ${repository_pages} pages of 100 repositories"
blue_color
count=1
for page in `seq 1 $repository_pages`; do
echo "Getting page ${page}..."
repo_pairs=$(curl -XGET -s https://"${username}":"${token}"@api.github.com/user/starred?per_page=100\&page="${page}" | jq -c --raw-output ".[]|{url:.ssh_url,name:.full_name}")
for repo in ${repo_pairs}; do
url=$(echo $repo | jq -c --raw-output ".url")
name=$(echo $repo | jq -c --raw-output ".name")
echo "$count. Cloning ${name} from ${url}..."
mkdir -p $(dirname $name)
git clone --quiet "${url}" "${name}"
let count+=1
done
done
popd
green_color
echo "All ${count} starred repositories are successfully cloned in ./stars directory"
}
Then just replace cloneRepositories
with cloneStars
below.
Does this repo has any relation to https://github.com/ghaiklor/backup-my-github ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.