feat(cli):add quality and translation type selection

This commit is contained in:
Benex254
2024-08-05 09:47:00 +03:00
parent 7fdfc1606c
commit f377711c4a
4 changed files with 78 additions and 66 deletions

73
poetry.lock generated
View File

@@ -594,6 +594,24 @@ files = [
{file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"},
]
[[package]]
name = "inquirerpy"
version = "0.3.4"
description = "Python port of Inquirer.js (A collection of common interactive command-line user interfaces)"
optional = false
python-versions = ">=3.7,<4.0"
files = [
{file = "InquirerPy-0.3.4-py3-none-any.whl", hash = "sha256:c65fdfbac1fa00e3ee4fb10679f4d3ed7a012abf4833910e63c295827fe2a7d4"},
{file = "InquirerPy-0.3.4.tar.gz", hash = "sha256:89d2ada0111f337483cb41ae31073108b2ec1e618a49d7110b0d7ade89fc197e"},
]
[package.dependencies]
pfzy = ">=0.3.1,<0.4.0"
prompt-toolkit = ">=3.0.1,<4.0.0"
[package.extras]
docs = ["Sphinx (>=4.1.2,<5.0.0)", "furo (>=2021.8.17-beta.43,<2022.0.0)", "myst-parser (>=0.15.1,<0.16.0)", "sphinx-autobuild (>=2021.3.14,<2022.0.0)", "sphinx-copybutton (>=0.4.0,<0.5.0)"]
[[package]]
name = "isort"
version = "5.13.2"
@@ -995,6 +1013,20 @@ files = [
{file = "pbr-6.0.0.tar.gz", hash = "sha256:d1377122a5a00e2f940ee482999518efe16d745d423a670c27773dfbc3c9a7d9"},
]
[[package]]
name = "pfzy"
version = "0.3.4"
description = "Python port of the fzy fuzzy string matching algorithm"
optional = false
python-versions = ">=3.7,<4.0"
files = [
{file = "pfzy-0.3.4-py3-none-any.whl", hash = "sha256:5f50d5b2b3207fa72e7ec0ef08372ef652685470974a107d0d4999fc5a903a96"},
{file = "pfzy-0.3.4.tar.gz", hash = "sha256:717ea765dd10b63618e7298b2d98efd819e0b30cd5905c9707223dceeb94b3f1"},
]
[package.extras]
docs = ["Sphinx (>=4.1.2,<5.0.0)", "furo (>=2021.8.17-beta.43,<2022.0.0)", "myst-parser (>=0.15.1,<0.16.0)", "sphinx-autobuild (>=2021.3.14,<2022.0.0)", "sphinx-copybutton (>=0.4.0,<0.5.0)"]
[[package]]
name = "pillow"
version = "10.3.0"
@@ -1147,6 +1179,20 @@ nodeenv = ">=0.11.1"
pyyaml = ">=5.1"
virtualenv = ">=20.10.0"
[[package]]
name = "prompt-toolkit"
version = "3.0.47"
description = "Library for building powerful interactive command lines in Python"
optional = false
python-versions = ">=3.7.0"
files = [
{file = "prompt_toolkit-3.0.47-py3-none-any.whl", hash = "sha256:0d7bfa67001d5e39d02c224b663abc33687405033a8c422d0d675a5a13361d10"},
{file = "prompt_toolkit-3.0.47.tar.gz", hash = "sha256:1e1b29cb58080b1e69f207c893a1a7bf16d127a5c30c9d17a25a5d77792e5360"},
]
[package.dependencies]
wcwidth = "*"
[[package]]
name = "pycparser"
version = "2.22"
@@ -1238,6 +1284,20 @@ files = [
[package.dependencies]
pywin32 = ">=223"
[[package]]
name = "pyshortcuts"
version = "1.9.0"
description = "Create desktop and Start Menu shortcuts for python scripts"
optional = false
python-versions = ">=3.8"
files = [
{file = "pyshortcuts-1.9.0-py3-none-any.whl", hash = "sha256:54d12ed8cd29bf83ac15153ce882a77072f2032b5f979474c519a2bac5af849d"},
{file = "pyshortcuts-1.9.0.tar.gz", hash = "sha256:016e89111337f74ce1ba3f4b79b295a643bc70b3e63ce4600247aa4bafa06877"},
]
[package.dependencies]
pywin32 = {version = "*", markers = "platform_system == \"Windows\""}
[[package]]
name = "pytest"
version = "8.2.2"
@@ -1600,6 +1660,17 @@ platformdirs = ">=3.9.1,<5"
docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2,!=7.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"]
test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"]
[[package]]
name = "wcwidth"
version = "0.2.13"
description = "Measures the displayed width of unicode strings in a terminal"
optional = false
python-versions = "*"
files = [
{file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"},
{file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"},
]
[[package]]
name = "websockets"
version = "12.0"
@@ -1715,4 +1786,4 @@ test = ["pytest (>=8.1,<9.0)"]
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
content-hash = "1db22635ebd39a11729509f8b761d0223ed222c5785afc68fc3425088206234c"
content-hash = "51811bf7a41344b911fbf883ede9fab2b0a93dc68c59ad90d2aab5ccd0339a51"

View File

@@ -16,17 +16,19 @@ fuzzywuzzy = "^0.18.0"
rich = "^13.7.1"
click = "^8.1.7"
python-levenshtein = "^0.25.1"
kivymd = {url = "https://github.com/kivymd/KivyMD/archive/master.zip"}
kivymd = [{url = "https://github.com/kivymd/KivyMD/archive/master.zip"}]
pyshortcuts = "^1.9.0"
inquirerpy = "^0.3.4"
[tool.poetry.group.dev.dependencies]
black = "^24.4.2"
isort = "^5.13.2"
pytest = "^8.2.2"
ruff = "^0.4.10"
pre-commit = "^3.7.1"
autoflake = "^2.3.1"
bandit = "^1.7.9"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

View File

@@ -1,3 +1,4 @@
{
"typeCheckingMode": "standard"
"typeCheckingMode": "standard",
"reportPrivateImportUsage": false
}

View File

@@ -1,62 +0,0 @@
import os
import sys
from setuptools import find_packages, setup
assert sys.version_info >= (3, 10, 0), "FastAnime requires python 3.10+"
path = os.path.abspath(".")
kv_file_paths = []
app_dir = os.path.join(path, "fastanime")
print(app_dir)
views_folder = os.path.join(app_dir, "View")
for dirpath, dirnames, filenames in os.walk(views_folder):
for filename in filenames:
if os.path.splitext(filename)[1] == ".kv":
kv_file = os.path.join(dirpath, filename)
kv_file_paths.append(kv_file)
if __name__ == "__main__":
setup(
version="0.2.1",
packages=[
*find_packages(
include=[
"fastanime",
"fastanime.*",
"fastanime.Utility.*",
"fastanime.libs.*",
]
),
],
package_dir={"fastanime": "fastanime"},
package_data={
"fastanime": [
"assets/*",
"configs/*",
*kv_file_paths,
]
},
install_requires=[
"kivy",
"plyer",
"fuzzywuzzy",
"python-Levenshtein",
"kivymd @ https://github.com/kivymd/KivyMD/archive/master.zip",
"ffpyplayer",
"yt-dlp",
"pyshortcuts",
],
setup_requires=[],
python_requires=">=3.10",
entry_points={
"gui_scripts": [
"fastanime = fastanime:main",
],
},
)