No More GitHub Abuse

This commit is contained in:
Nikhil Badyal
2022-10-25 22:24:51 +05:30
parent 4f50d9d40d
commit 1417fc7da4
3 changed files with 82 additions and 77 deletions
+79 -68
View File
@@ -7,6 +7,7 @@ Note - I prefer [Revanced Extended](https://github.com/inotia00/revanced-patches
Revanced Extended. Revanced Extended.
## Pre-Built APKs ## Pre-Built APKs
You can get pre-built apks [here](https://t.me/revanced_apkss) You can get pre-built apks [here](https://t.me/revanced_apkss)
## Build Yourself ## Build Yourself
@@ -14,33 +15,32 @@ You can get pre-built apks [here](https://t.me/revanced_apkss)
You can use any of the following methods to build. You can use any of the following methods to build.
- 🚀In GitHub (**_`Recommended`_**) - 🚀In GitHub (**_`Recommended`_**)
1. Fork the project. 1. Fork the project.
![fork] ![fork]
2. Add `ENVS` (**optional**) secret to the repo. Required only if you want to cook specific apps/versions. 2. Add `ENVS` (**optional**) secret to the repo. Required only if you want to cook specific apps/versions.
<details> <details>
<summary>🚶Detailed step by step guide</summary> <summary>🚶Detailed step by step guide</summary>
- Go to the repo settings and then to actions->secret - Go to the repo settings and then to actions->secret
![step_1] ![step_1]
- Add Repository secret - Add Repository secret
![step_2] ![step_2]
</details>
3. Go to actions tab. Select `Build & Release`.Click on `Run Workflow`.
<details>
<summary>🚶Detailed step by step guide</summary>
- Go to actions tab
![action_0]
- Check the status of build, It should look green.
![build_wait]
</details> </details>
4. If the building process is successful, youll get your APKs in the ![apks] 3. Go to actions tab. Select `Build & Release`.Click on `Run Workflow`.
<details>
<summary>🚶Detailed step by step guide</summary>
- Go to actions tab
![action_0]
- Check the status of build, It should look green.
![build_wait]
</details>
4. If the building process is successful, youll get your APKs in the ![apks]
<details> <details>
<summary>🐳With Docker Compose</summary> <summary>🐳With Docker Compose</summary>
@@ -85,11 +85,11 @@ You can use any of the following methods to build.
curl -fsSL https://get.docker.com -o get-docker.sh curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh sh get-docker.sh
``` ```
2. Run script with 2. Run script with
```shell ```shell
docker run -v "$(pwd)"/apks:/app/apks/ nikhilbadyal/docker-py-revanced docker run -v "$(pwd)"/apks:/app/apks/ nikhilbadyal/docker-py-revanced
``` ```
You can pass below envs with `-e` flag. You can pass below envs with `-e` flag.
</details> </details>
@@ -97,44 +97,44 @@ You can use any of the following methods to build.
<details> <details>
<summary>🫠Without Docker</summary> <summary>🫠Without Docker</summary>
1. Install Java17 (zulu preferred) 1. Install Java17 (zulu preferred)
2. Install Python 2. Install Python
3. Create virtual environment 3. Create virtual environment
``` ```
python3 -m venv venv python3 -m venv venv
``` ```
4. Activate virtual environment 4. Activate virtual environment
``` ```
source venv/bin/activate source venv/bin/activate
``` ```
5. Install Dependencies with 5. Install Dependencies with
``` ```
pip install -r requirements.txt pip install -r requirements.txt
``` ```
6. Run the script with 6. Run the script with
``` ```
python python main.py python python main.py
``` ```
</details> </details>
### Note ### Note
(Pay attention to 3,4)<br> (Pay attention to 3,4)<br>
By default, script build the version as recommended by Revanced team. By default, script build the version as recommended by Revanced team.
1. Supported values for **_<REVANCED_APPS_NAME>_** are : 1. Supported values for **_<REVANCED_APPS_NAME>_** are :
1. youtube 1. youtube
2. youtube_music 2. youtube_music
3. twitter 3. twitter
4. reddit 4. reddit
5. tiktok 5. tiktok
6. warnwetter 6. warnwetter
7. spotify 7. spotify
2. Remember to download the **_Microg_**. Otherwise, you will not be able to open YouTube. 2. Remember to download the **_Microg_**. Otherwise, you will not be able to open YouTube.
3. By default, it will build [all](#note) build app supported by Revanced team. If you 3. By default, it will build only `youtube`. To build other apps supported by revanced team.
don't Add the apps you want to build in `.env` file or in `ENVS` in
want to waste time and build only few apps. Add the apps you want to build in `.env` file or in `ENVS` in
`GitHub secrets` in the format `GitHub secrets` in the format
```ini ```ini
PATCH_APPS=<REVANCED_APPS_NAME> PATCH_APPS=<REVANCED_APPS_NAME>
@@ -208,19 +208,19 @@ By default, script build the version as recommended by Revanced team.
BUILD_EXTENDED=False BUILD_EXTENDED=False
``` ```
9. For Telegram Upload. 9. For Telegram Upload.
1. Set up a telegram channel, send a message to it and forward the message to 1. Set up a telegram channel, send a message to it and forward the message to
this telegram [bot](https://t.me/username_to_id_bot) this telegram [bot](https://t.me/username_to_id_bot)
2. Copy `id` and save it to `TELEGRAM_CHAT_ID`<br> 2. Copy `id` and save it to `TELEGRAM_CHAT_ID`<br>
![chat id] ![chat id]
3. `TELEGRAM_BOT_TOKEN` - Telegram provides BOT_TOKEN. It works as sender. Open [bot](https://t.me/BotFather) and 3. `TELEGRAM_BOT_TOKEN` - Telegram provides BOT_TOKEN. It works as sender. Open [bot](https://t.me/BotFather) and
create one copy api key<br> create one copy api key<br>
![bot api] ![bot api]
4. `TELEGRAM_API_ID` - Telegram API_ID is provided by telegram [here](https://my.telegram.org/apps)<br> 4. `TELEGRAM_API_ID` - Telegram API_ID is provided by telegram [here](https://my.telegram.org/apps)<br>
![tg api] ![tg api]
5. `TELEGRAM_API_HASH` - Telegram API_HASH is provided by telegram [here](https://my.telegram.org/apps)<br> 5. `TELEGRAM_API_HASH` - Telegram API_HASH is provided by telegram [here](https://my.telegram.org/apps)<br>
![tg api hash] ![tg api hash]
6. After Everything done successfully the actions secrets of the repository will look something like<br> 6. After Everything done successfully the actions secrets of the repository will look something like<br>
<img src="https://i.imgur.com/dzC1KFa.png" width="400"> <img src="https://i.imgur.com/dzC1KFa.png" width="400">
10. Configuration defined in `ENVS` in `GitHub secrets` will override the configuration in `.env` file. You can use this 10. Configuration defined in `ENVS` in `GitHub secrets` will override the configuration in `.env` file. You can use this
fact to define your normal configurations in `.env` file and sometimes if you want to build something different just fact to define your normal configurations in `.env` file and sometimes if you want to build something different just
once. Add it in `GitHub secrets` or you can ignore `.env` file and always use `GitHub secrets` because to modify once. Add it in `GitHub secrets` or you can ignore `.env` file and always use `GitHub secrets` because to modify
@@ -247,16 +247,27 @@ By default, script build the version as recommended by Revanced team.
14. Sample Envs ![envs] 14. Sample Envs ![envs]
[fork]: https://i.imgur.com/R5HdByI.png [fork]: https://i.imgur.com/R5HdByI.png
[secrets]: https://i.imgur.com/083Bjpg.png [secrets]: https://i.imgur.com/083Bjpg.png
[step_1]: https://i.imgur.com/Inj82KK.png [step_1]: https://i.imgur.com/Inj82KK.png
[step_2]: https://i.imgur.com/V2Wfx3J.png [step_2]: https://i.imgur.com/V2Wfx3J.png
[action_0]: https://i.imgur.com/XSCvzav.png [action_0]: https://i.imgur.com/XSCvzav.png
[build_wait]: https://i.imgur.com/CsJt9W1.png [build_wait]: https://i.imgur.com/CsJt9W1.png
[apks]: https://i.imgur.com/S5d7qAO.png [apks]: https://i.imgur.com/S5d7qAO.png
[chat id]: https://i.imgur.com/22UiaWs.png [chat id]: https://i.imgur.com/22UiaWs.png
[bot api]: https://i.imgur.com/A6JCyK2.png [bot api]: https://i.imgur.com/A6JCyK2.png
[tg api]: https://i.imgur.com/eha3nnb.png [tg api]: https://i.imgur.com/eha3nnb.png
[tg api hash]: https://i.imgur.com/7n5k1mp.png [tg api hash]: https://i.imgur.com/7n5k1mp.png
[envs]: https://i.imgur.com/ajSE5nA.png [envs]: https://i.imgur.com/ajSE5nA.png
Thanks to [@aliharslan0](https://github.com/aliharslan0/pyrevanced) for his work. Thanks to [@aliharslan0](https://github.com/aliharslan0/pyrevanced) for his work.
+2 -2
View File
@@ -5,7 +5,7 @@ from typing import List
from environs import Env from environs import Env
from requests import Session from requests import Session
from src.utils import supported_apps from src.utils import default_build
class RevancedConfig: class RevancedConfig:
@@ -20,7 +20,7 @@ class RevancedConfig:
self.apk_mirror = "https://www.apkmirror.com" self.apk_mirror = "https://www.apkmirror.com"
self.upto_down = ["spotify"] self.upto_down = ["spotify"]
self.keystore_name = env.str("KEYSTORE_FILE_NAME", "revanced.keystore") self.keystore_name = env.str("KEYSTORE_FILE_NAME", "revanced.keystore")
self.apps = env.list("PATCH_APPS", supported_apps) self.apps = env.list("PATCH_APPS", default_build)
self.extended_apps: List[str] = ["youtube", "youtube_music"] self.extended_apps: List[str] = ["youtube", "youtube_music"]
self.rip_libs_apps: List[str] = ["youtube"] self.rip_libs_apps: List[str] = ["youtube"]
self.normal_cli_jar = "revanced-cli.jar" self.normal_cli_jar = "revanced-cli.jar"
+1 -7
View File
@@ -1,14 +1,8 @@
"""Utilities.""" """Utilities."""
from typing import Dict from typing import Dict
supported_apps = [ default_build = [
"youtube", "youtube",
"youtube_music",
"twitter",
"reddit",
"tiktok",
"warnwetter",
"spotify",
] ]
possible_archs = ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] possible_archs = ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]