Skip to content

Commit

Permalink
file
Browse files Browse the repository at this point in the history
add via file
  • Loading branch information
alreadydea committed Dec 17, 2023
1 parent 14bc062 commit 0468d87
Show file tree
Hide file tree
Showing 253 changed files with 136,528 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.heroku
29 changes: 29 additions & 0 deletions .profile.d/WEB_CONCURRENCY.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
case $(ulimit -u) in

# Automatic configuration for Gunicorn's Workers setting.

# Standard-1X (+Free, +Hobby) Dyno
256)
export DYNO_RAM=512
export WEB_CONCURRENCY=${WEB_CONCURRENCY:-2}
;;

# Standard-2X Dyno
512)
export DYNO_RAM=1024
export WEB_CONCURRENCY=${WEB_CONCURRENCY:-4}
;;

# Performance-M Dyno
16384)
export DYNO_RAM=2560
export WEB_CONCURRENCY=${WEB_CONCURRENCY:-8}
;;

# Performance-L Dyno
32768)
export DYNO_RAM=14336
export WEB_CONCURRENCY=${WEB_CONCURRENCY:-11}
;;

esac
1 change: 1 addition & 0 deletions .profile.d/aria2c.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export PATH="$PATH:${HOME}/vendor/aria2c"
1 change: 1 addition & 0 deletions .profile.d/ffmpeg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export PATH="$PATH:${HOME}/vendor/ffmpeg"
5 changes: 5 additions & 0 deletions .profile.d/python.gunicorn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Automatic configuration for Gunicorn's ForwardedAllowIPS setting.
export FORWARDED_ALLOW_IPS='*'

# Automatic configuration for Gunicorn's stdout access log setting.
export GUNICORN_CMD_ARGS=${GUNICORN_CMD_ARGS:-"--access-logfile -"}
28 changes: 28 additions & 0 deletions .profile.d/python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export PATH=$HOME/.heroku/python/bin:$PATH
export PYTHONUNBUFFERED=true
export PYTHONHOME=$HOME/.heroku/python
export LIBRARY_PATH=$HOME/.heroku/vendor/lib:$HOME/.heroku/python/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$HOME/.heroku/vendor/lib:$HOME/.heroku/python/lib:$LD_LIBRARY_PATH
export LANG=${LANG:-en_US.UTF-8}
export PYTHONHASHSEED=${PYTHONHASHSEED:-random}
export PYTHONPATH=${PYTHONPATH:-$HOME}
if [[ $HOME != "/app" ]]; then
mkdir -p /app/.heroku
ln -nsf "$HOME/.heroku/python" /app/.heroku/python
ln -nsf "$HOME/.heroku/vendor" /app/.heroku/vendor
fi
find .heroku/python/lib*/*/site-packages/ -type f -and \( -name '*.egg-link' -or -name '*.pth' \) -exec sed -i -e 's#/tmp/build_43bf6a00#/app#' {} \+
export PATH=$HOME/.heroku/python/bin:$PATH
export PYTHONUNBUFFERED=true
export PYTHONHOME=$HOME/.heroku/python
export LIBRARY_PATH=$HOME/.heroku/vendor/lib:$HOME/.heroku/python/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$HOME/.heroku/vendor/lib:$HOME/.heroku/python/lib:$LD_LIBRARY_PATH
export LANG=${LANG:-en_US.UTF-8}
export PYTHONHASHSEED=${PYTHONHASHSEED:-random}
export PYTHONPATH=${PYTHONPATH:-$HOME}
if [[ $HOME != "/app" ]]; then
mkdir -p /app/.heroku
ln -nsf "$HOME/.heroku/python" /app/.heroku/python
ln -nsf "$HOME/.heroku/vendor" /app/.heroku/vendor
fi
find .heroku/python/lib*/*/site-packages/ -type f -and \( -name '*.egg-link' -or -name '*.pth' \) -exec sed -i -e 's#/tmp/build_73668aef#/app#' {} \+
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM python:3.9.7-slim-buster


WORKDIR .
RUN apt -qq update && apt -qq install -y git wget pv jq python3-dev ffmpeg mediainfo
COPY . .
RUN pip3 install -r requirements.txt
RUN apt install ffmpeg

CMD ["python3", "main.py"]
45 changes: 45 additions & 0 deletions Easy_F.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from datetime import datetime,timedelta

def hrb(value, digits= 2, delim= "", postfix=""):
"""Return a human-readable file size.
"""
if value is None:
return None
chosen_unit = "B"
for unit in ("KiB", "MiB", "GiB", "TiB"):
if value > 1000:
value /= 1024
chosen_unit = unit
else:
break
return f"{value:.{digits}f}" + delim + chosen_unit + postfix

def hrt(seconds, precision = 0):
"""Return a human-readable time delta as a string.
"""
pieces = []
value = timedelta(seconds=seconds)


if value.days:
pieces.append(f"{value.days}d")

seconds = value.seconds

if seconds >= 3600:
hours = int(seconds / 3600)
pieces.append(f"{hours}h")
seconds -= hours * 3600

if seconds >= 60:
minutes = int(seconds / 60)
pieces.append(f"{minutes}m")
seconds -= minutes * 60

if seconds > 0 or not pieces:
pieces.append(f"{seconds}s")

if not precision:
return "".join(pieces)

return "".join(pieces[:precision])
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
worker: python main.py
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# BOT
# Join Me...
<a href="https://t.me/TIGER0054">
<img height="225px" src="https://telegra.ph/file/3b6ddd8f2f12ca4728d7e.jpg">
</a>

## Colab
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tiger7815/tecttoovvvv/blob/main/tecttoovvvv.ipynb)

#
#
## Deploy To Heroku

<a href="https://heroku.com/deploy?template=https://github.com/tiger7815/tecttoovvvv">
<img height="30px" src="https://img.shields.io/badge/Deploy%20To%20Heroku-blueviolet?style=for-the-badge&logo=heroku">
</a>

### .env
```sh
API_ID=12345 # Get from https://my.telegram.org/apps
API_HASH=abcdef # Get from https://my.telegram.org/apps
BOT_TOKEN=123:abc # Get from https://t.me/BotFather
AUTH_USERS=123,456 # User ids of those who can use bot anywhere without limit
GROUPS=123,456 # Chat ids where you wan't many to use the bot
35 changes: 35 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name":"tiger7815",
"description":"Download videos from various websites using this telegram bot",
"repository":"https://github.com/tiger7815/tecttoovvvv",
"buildpacks":[
{
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git"
},
{
"url": "https://github.com/amivin/aria2-heroku.git"
},
{
"url": "heroku/python"
}
],
"env": {
"API_ID":{
"description": "Get your telegram API ID from https://my.telegram.org",
"value":"22609670"
},
"API_HASH":{
"description":"Get your telegram API HASH from https://my.telegram.org",
"value":"3506d8474ad1f4f5e79b7c52a5c3e88d"
},
"BOT_TOKEN":{
"description":"Get from BotFather",
"value":"6889588657:AAEEed-lKwyG1Ltb05IDFZhP2RZp5ejIWog"
},
"AUTH_USERS":{
"description":"Admin/Owner/Friends ID Seperate by ',' Ex: 44578878,8878899",
"value":"6981453498"

}
}
}
4 changes: 4 additions & 0 deletions details.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
api_id = 22539447
api_hash = "de7fc74fdcad8cb0a621fffcc346fba4"
bot_token = "6156767032:AAHMZDXJ_BkxEW8U0clm3VjkPv5lOWdCCGc"

Loading

0 comments on commit 0468d87

Please sign in to comment.