change module name
Marco Andronaco andronacomarco@gmail.com
Sat, 26 Aug 2023 11:28:27 +0200
11 files changed,
17 insertions(+),
16 deletions(-)
M
.vscode/launch.json
→
.vscode/launch.json
@@ -10,7 +10,7 @@ "type": "python",
"request": "launch", "module": "flask", "env": { - "FLASK_APP": "fxyoutube", + "FLASK_APP": "fixyoutube", "FLASK_DEBUG": "1" }, "args": [
M
Dockerfile
→
Dockerfile
@@ -6,5 +6,5 @@ RUN pip install --upgrade pip
COPY ./requirements.txt . RUN pip install -r requirements.txt -COPY ./fxyoutube ./fxyoutube -ENV APP_MODULE=fxyoutube:app +COPY ./fixyoutube ./fixyoutube +ENV APP_MODULE=fixyoutube:app
M
README.md
→
README.md
@@ -1,5 +1,5 @@
# FixYouTube -Embed YouTube videos on Telegram! +Embed YouTube videos on Telegram, Discord and more! ## Docker ```@@ -9,11 +9,11 @@
### Debug ``` poetry install -poetry run flask --app fxyoutube run --port 1111 --debug +poetry run flask --app fixyoutube run --port 1111 --debug ``` ### Production ``` poetry install --with prod -poetry run waitress-serve --port 1111 fxyoutube:app +poetry run waitress-serve --port 1111 fixyoutube:app ```
M
fxyoutube/__init__.py
→
fixyoutube/__init__.py
@@ -2,4 +2,4 @@ from flask import Flask
app = Flask(__name__) -import fxyoutube.views +import fixyoutube.views
M
fxyoutube/__main__.py
→
fixyoutube/__main__.py
@@ -1,4 +1,4 @@
from waitress import serve -from fxyoutube import app +from fixyoutube import app serve(app, listen='*:1111')
M
fxyoutube/db.py
→
fixyoutube/db.py
@@ -1,8 +1,8 @@
from peewee import Model, CharField, TextField, IntegerField, DateTimeField, DoesNotExist from playhouse.sqliteq import SqliteQueueDatabase from datetime import datetime, timedelta -from fxyoutube.yt_info import get_info_ytdl -import fxyoutube.constants as c +from fixyoutube.yt_info import get_info_ytdl +import fixyoutube.constants as c db = SqliteQueueDatabase(c.DB_URL)
M
fxyoutube/views.py
→
fixyoutube/views.py
@@ -1,6 +1,6 @@
-from fxyoutube import app -from fxyoutube.db import get_video_from_cache, get_info, clear_cache -import fxyoutube.constants as c +from fixyoutube import app +from fixyoutube.db import get_video_from_cache, get_info, clear_cache +import fixyoutube.constants as c from flask import request, redirect, abort, render_template, Response from requests import get
M
fxyoutube/yt_info.py
→
fixyoutube/yt_info.py
@@ -1,5 +1,5 @@
from yt_dlp import YoutubeDL, DownloadError -import fxyoutube.constants as c +import fixyoutube.constants as c def truncate_lines(input_str: str, max: int = 4): return "\n".join(input_str.splitlines()[:max])
M
pyproject.toml
→
pyproject.toml
@@ -1,9 +1,10 @@
[tool.poetry] -name = "fxyoutube" +name = "fixyoutube" version = "0.1.0" -description = "Embed YouTube videos on Telegram!" +description = "Embed YouTube videos on Telegram, Discord and more!" authors = ["Marco Andronaco <birabittoh@duck.com>"] readme = "README.md" +packages = [{include = "fixyoutube"}] [tool.poetry.dependencies] python = "^3.11"