From 5f0805bdbb6d1fa8e5fbeca336c67d3a27accd33 Mon Sep 17 00:00:00 2001 From: lzzy12 Date: Sun, 13 Sep 2020 22:28:06 +0530 Subject: [PATCH] Added separate requirements list for setup scripts --- README.md | 14 ++++++++++---- requirements-cli.txt | 7 +++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 requirements-cli.txt diff --git a/README.md b/README.md index 98e6547..bba3745 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,11 @@ Install Docker by following the [official docker docs](https://docs.docker.com/e sudo pacman -S docker python ``` +- Install dependencies for running setup scripts: +```shell script +pip3 install -r requirements-cli.txt +``` + ## Setting up config file ``` cp config_sample.env config.env @@ -100,26 +105,27 @@ sudo docker run mirror-bot # Using service accounts for uploading to avoid user rate limit For Service Account to work, you must set USE_SERVICE_ACCOUNTS="True" in config file or environment variables Many thanks to [AutoRClone](https://github.com/xyou365/AutoRclone) for the scripts +**NOTE:** Using service accounts is only recommended while uploading to a team drive. ## Generating service accounts Step 1. Generate service accounts [What is service account](https://cloud.google.com/iam/docs/service-accounts) --------------------------------- Let us create only the service accounts that we need. -**Warning:** abuse of this feature is not the aim of autorclone and we do **NOT** recommend that you make a lot of projects, just one project and 100 sa allow you plenty of use, its also possible that overabuse might get your projects banned by google. +**Warning:** abuse of this feature is not the aim of this project and we do **NOT** recommend that you make a lot of projects, just one project and 100 sa allow you plenty of use, its also possible that over abuse might get your projects banned by google. ``` -Note: 1 service account can copy around 750gb a day, 1 project makes 100 service accounts so thats 75tb a day, for most users this should easily suffice. +Note: 1 service account can copy around 750gb a day, 1 project can make 100 service accounts so that's 75tb a day, for most users this should easily suffice. ``` `python3 gen_sa_accounts.py --quick-setup 1 --new-only` -A folder named accounts will be created which will contain keys for the service accounts created +A folder named accounts will be created which will contain keys for the service accounts NOTE: If you have created SAs in past from this script, you can also just re download the keys by running: ``` python3 gen_sa_accounts.py --download-keys project_id ``` -### Add all the service accounts to the Team Drive or folder +### Add all the service accounts to the Team Drive - Run: ``` python3 add_to_team_drive.py -d SharedTeamDriveSrcID diff --git a/requirements-cli.txt b/requirements-cli.txt new file mode 100644 index 0000000..1841d06 --- /dev/null +++ b/requirements-cli.txt @@ -0,0 +1,7 @@ +oauth2client +google-api-python-client +progress +progressbar2 +httplib2shim +google_auth_oauthlib +pyrogram