forked from kuaizi/telegram_channel_downloader
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathinstall.sh
78 lines (72 loc) · 2.18 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env bash
#=============================================================
# https://github.com/roshanconnor123/telegram_channel_downloader
# File Name: install.sh
# Author: roshanconnor
# Description:一Installation of Telegram Channel Export bot
# System Required: Debian/Ubuntu
#=============================================================
COLOR="\033["
NORMAL="${COLOR}0m"
YELLOW="${COLOR}1;33m"
RED="${COLOR}1;31m"
CYAN="${COLOR}1;36m"
BLUE="${COLOR}1;34m"
GREEN="${COLOR}1;32m"
PURPLE="${COLOR}1;35m"
# ★★★Installation of Dependancies and Channel Downloader Bot★★★
bot() {
cd ~
sudo apt update
sudo apt -y upgrade
sudo apt install -y python3-pip
sudo apt install unzip wget
wget https://github.com/mawaya/rclone/releases/download/fclone-v0.4.1/fclone-v0.4.1-linux-amd64.zip
unzip fclone-v0.4.1-linux-amd64.zip
sudo mv fclone-v0.4.1-linux-amd64/fclone /usr/bin
sudo chmod 777 /usr/bin/fclone
cd ~/telegram_channel_downloader
pip3 install -r requirements.txt
python3 gc.py
nano tg_channel_downloader.py
echo "${BLUE}Bot dependancies have been set${NORMAL}"
}
# ★★★Downloading Service Accounts from github★★★
sa() {
echo "Downloading Service accounts from your private repo"
echo "Please Provide Your github username"
read username
echo "Please Provide Your github password"
read Password
git clone https://"$username":"$Password"@github.com/"$username"/accounts
echo "${BLUE}Service accounts are downloaded${NORMAL}"
}
# ★★★Installation★★★
echo && echo " ${BLUE}Telegram Channel Downloader${NORMAL} Telegram Bot by ${RED}snow922841${NORMAL} - Polished by ${RED}Roshanconnor${NORMAL}
1.${CYAN}Complete Installation${NORMAL}
=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=
${YELLOW}Individual Installation${NORMAL}
2.${GREEN}Installation Of Bot dependancies${NORMAL}
3.${GREEN}Downloading Service Accounts From Github${NORMAL}
=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=
69.${PURPLE}Exit${NORMAL}" && echo
read -p " Choose any Number [1-6]:" option
case "$option" in
1)
bot
sa
;;
2)
bot
;;
3)
sa
;;
69)
exit
;;
*)
echo
echo " ${RED}Choose Correct Number from the Options${NORMAL}"
;;
esac