From 83a8c739ef0ecd1fbf9bb8950a9f965379cc38c2 Mon Sep 17 00:00:00 2001 From: Benny Date: Sun, 1 Dec 2024 17:53:32 +0100 Subject: [PATCH] pre-commit --- pre-commit.py | 21 +++++++++++++++++++++ requirements.txt | 18 ++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 pre-commit.py create mode 100644 requirements.txt diff --git a/pre-commit.py b/pre-commit.py new file mode 100644 index 00000000..97a57448 --- /dev/null +++ b/pre-commit.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +# ytdlbot - pre-commit.py +# for dependabot +import tomllib +import subprocess + +with open("pyproject.toml", "rb") as file: + config = tomllib.load(file) + + +with open("requirements.txt", "w") as file: + for item in config["project"]["dependencies"]: + if " " in item: + item = item.split()[-1] + file.write(f"{item}\n") + +# commit with ammend +subprocess.run(["git", "add", "requirements.txt"]) +subprocess.run(["git", "commit", "--amend", "--no-edit"]) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..5c5b7146 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,18 @@ +git+https://github.com/KurimuzonAkuma/pyrogram@ba49bbff6e37cca6174d0620ef6813960d9d85b6 +tgcrypto>=1.2.5 +yt-dlp>=2024.11.18 +APScheduler>=3.11.0 +ffmpeg-python>=0.2.0 +PyMySQL>=1.1.1 +filetype>=1.2.0 +beautifulsoup4>=4.12.3 +fakeredis>=2.26.1 +redis>=5.2.0 +requests>=2.32.3 +tqdm>=4.67.1 +token-bucket>=0.3.0 +python-dotenv>=1.0.1 +black>=24.10.0 +sqlalchemy>=2.0.36 +psutil>=6.1.0 +ffpb>=0.4.1