A python script fetches all your starred repositories from your GitHub account and clones them to your server so you will never lose important resources

Overview


This little python script fetches all your starred repositories from your GitHub account and clones them to your server so you will never lose important resources!

Usage

This script is designed to be used with cron. So, first of all, please install cron if it is not already installed.

You can configure the script either via environment variables (keys uppercase with SG_ as prefix) or via a configuration file located in the current work directory, in your home directory at .stargrab/config.* or at /etc/stargrab/config.*. Both yaml and json files are accepted as config file formats.

These are the available configurations.

Key Type Required Description
github_token string Yes The GitHub API token to authenticate you against the API. It can be obtained from here.
target string No (default: repositories) The target location where repository mirros should be stored.
user string No (default: viewer) The user to grab starred repositories from. Defaultly, this will be the user authenticated with the GitHub token.
ignore string No A regular expression applied on the lowercased username/reponame of each repository. When it matches, the repository is ignored.
depth number No Specify a maximum commit depth for repositories on initial clone.

Run barely

Of course, you need python3 and git to be installed on your system.

Now, clone the repository into your home directory.

git clone https://github.com/zekrotja/stargrab ~/stargrab

Then, you want to install the required dependencies of the script.

python3 -m pip install -r ~/stargrab/requirements.txt

After that, create a location to store the repository mirrors to.

mkdir ~/stargrab_repos

Following, create the config in your home directory and enter your configuration.

mkdir ~/.stargrab
vim ~/.stargrab/config.yml

Next, create a crontab entry to execute the script periodically.

crontab -e

The entry could look like following. This will execute the mirroring every day at 3am.

0 3 * * * python3 /home/
   
    /stargrab/stargrab/main.py >> /home/
    
     /stargrab/log 2>&1

    
   

Run with Docker

Therefore, you need Docker to be installed on your system, of course.

First, pull the image from GHCR.

docker pull ghcr.io/zekrotja/stargrab:latest

Optionally, you can now tag the image for simplicity.

docker tag ghcr.io/zekrotja/stargrab:latest stargrab:latest

Next, create a crontab entry to execute the Docker image periodically.

crontab -e

The entry could look like following. This will execute the mirroring every day at 3am.

-v /home/ /stargrab_repos:/var/repos stargrab">
0 3 * * * docker run --rm --env SG_GITHUB_TOKEN="
     
       -v /home/
      
       /stargrab_repos:/var/repos stargrab

      
     
Owner
Ringo Hoffmann
Full stack developer. SysAdmin / DevOps Enthusiast. I ♥ Go, React, C# and Docker. | he/him
Ringo Hoffmann
Script Crack Facebook, and Instagram 🚶‍♂

in-mbf Script Crack Facebook, and Instagram 🚶‍♂ Bukti Install Script $ pkg update && pkg upgrade $ pkg install git $ pkg install python2 $ pip2 insta

Yumasaa 5 Dec 27, 2021
A telegram bot to read RSS feeds

Telegram bot to fetch RSS feeds This is a telegram bot that fetches RSS feeds in regular intervals and send it to you. The feed sources can be added o

Santhosh Thottingal 14 Dec 15, 2022
Python + AWS Lambda Hands OnPython + AWS Lambda Hands On

Python + AWS Lambda Hands On Python Criada em 1990, por Guido Van Rossum. "Bala de prata" (quase). Muito utilizado em: Automatizações - Selenium, Beau

Marcelo Ortiz de Santana 8 Sep 09, 2022
Scheduled Block Checker for Cardano Stakepool Operators

ScheduledBlocks Scheduled Block Checker for Cardano Stakepool Operators Lightweight and Portable Scheduled Blocks Checker for Current Epoch. No cardan

SNAKE (Cardano Stakepool) 4 Oct 18, 2022
Orca is an extensive and extendable Python 3.x library for the Discord API.

Orca is an extensive and extendable Python 3.x library for the Discord API.

RPS 4 Apr 03, 2022
Discord group chat leaver.

Discord group chat leaver I know many people who have fallen victim to these weird group chat spammers including me. I made this script to help those

cliphd 3 Feb 27, 2022
API RestFull de uma clinica, onde vai efetuar os agendamentos dos pacientes e mostrar o historicos de cada agendamentos

API REstFull O que tem na API Usado para clinicas. Cadastro de pacientes. Agendamentos de pacientes. Históricos dos agendamentos vinculados com a tabe

Lucas Silva 3 Aug 29, 2022
The Research PACS on AWS solution facilitates researchers' access medical images stored in the clinical PACS in a secure and seamless manner

Research PACS on AWS Challenge to solve Solution presentation Deploy the solution Further reading Releases License Challenge to solve The rise of new

AWS Samples 23 Sep 09, 2022
A pypi packages finder telegram bot.

PyPi-Bot A pypi packages information finder telegram bot. Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https:

Fayas Noushad 17 Oct 21, 2022
Hasan Can Kaya - Konusanlar Ticket Notifier

Hasan Can Kaya - Konusanlar Ticket Notifier This script sends a notification to any telegram chat/group/channel when added a new available ticket to b

omer citak 3 Jan 31, 2022
Trading strategy for the Freqtrade crypto bot

NostalgiaForInfinity Trading strategy for the Freqtrade crypto bot Change strategy Add strategies to the user_data/strategies folder and also in the d

iterativ 1.5k Jan 01, 2023
Python On WhatsApp - Run your python codes on whatsapp along with talking to a chatbot

Python On WhatsApp Run your python codes on whatsapp along with talking to a chatbot This is a small python project to run python on whatsapp. and i c

Prajjwal Pathak 32 Dec 30, 2022
A github actions + python code to extract URLs to code repositories to put into standard form, starting with github

A github actions + python code to extract URLs to code repositories to put into standard form, starting with github ---- NOTE: JUS

Justin Gosses 2 Nov 15, 2021
YouTube-Discord-Bot - Discord Bot to Search YouTube

YouTube Bot Info YouTube Bot is a discord bot where you can search for anything

Riceblades11 10 Mar 05, 2022
ELiza music is a telegram music bot project, allow you to play music on voice chat group telegram.

❤️ 𝗘𝗹𝗶𝘇𝗮 𝗠𝘂𝘀𝗶𝗰 ❤️ Unmaintained. The new repo of @MrsElizaRobot is private. (It is no longer based on this source code. The completely rewrit

Team Eliza 2 Dec 08, 2022
A Telegram Most Powerful Media Info Bot.

Media Info Bot Support 🚑 Demo For The Bot -Test Our Bot By Clicking The Button Below Deploy To Heroku 🗳 Press the Deploy Button to Get Your Own Bot.

Anonymous 5 May 16, 2022
A Telegram bot that add a dynamic caption to musics

Music Channel Manager A Telegram bot that add a dynamic caption to musics Deploy to Heroku What is it ? It manage your music channel. With just adding

13 Oct 18, 2022
Python version of PlaceNL's headless bot with automatic access token refresh

Reddit /r/place 2022 headless bot This headless Python bot will automatically login to reddit, obtain access tokens (and refreshes them when they expi

19 May 21, 2022
Personal Discord Python Bot based on Discord.py

Personal Discord bot using the discord.py library by Rapptz

2 Dec 14, 2022
Tools to help record data from Qiskit jobs

archiver4qiskit Tools to help record data from Qiskit jobs. Install with pip install git+https://github.com/NCCR-SPIN/archiver4qiskit.git Import the

0 Dec 10, 2021