From 1fb139214379cd8ec08e41d2c8f63924aba0b522 Mon Sep 17 00:00:00 2001 From: Deathemonic Date: Fri, 8 Nov 2024 17:24:49 +0800 Subject: [PATCH] feat: project version bump, moved from pip to uv - moved from pip to uv for more faster packaging installation - bump baad version from 1.0.0 to 2.1.0 - remove unnessary files - updated readme --- .gitignore | 7 +- README.md | 26 +++++- baad/__init__.py | 2 +- .../excel/MissionEmergencyCompleteExcel.json | 1 - baad/utils/excel/VoiceTimelineExcel.json | 1 - pyproject.toml | 43 ++++------ ruff.toml | 83 ------------------- 7 files changed, 48 insertions(+), 115 deletions(-) delete mode 100644 baad/utils/excel/MissionEmergencyCompleteExcel.json delete mode 100644 baad/utils/excel/VoiceTimelineExcel.json delete mode 100644 ruff.toml diff --git a/.gitignore b/.gitignore index 5cb952e0..f7ff2c8e 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ update_master.py # Distribution / packaging .Python build/ +*.py[oc] develop-eggs/ dist/ downloads/ @@ -113,4 +114,8 @@ ruff.toml jp/ gl/ bin/ -output/ \ No newline at end of file +jp/ +output/ + +# uv +uv.lock \ No newline at end of file diff --git a/README.md b/README.md index 39241421..66dbff6f 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ It downloads them directly from the **Yostar Servers**. ## Installation -Download and install [`python`](https://www.python.org/downloads/). After that clone this repository +Download and install [`python`](https://www.python.org/downloads/) and [`uv`](https://docs.astral.sh/uv/getting-started/installation/). After that clone this repository ``` git clone https://github.com/Deathemonic/BA-AD @@ -37,11 +37,31 @@ git clone https://github.com/Deathemonic/BA-AD or just download as a zip by clicking `Code` > `Download Zip`. Then open `BA-AD` folder in your `Terminal` or `CMD` -Then install it using pip + +Then install using `uv` +``` +uv tool install . +``` + +you can now run it using the `uvx` command + +``` +uvx --from ba-ad baad +``` + +or if you don't want to type the `uvx` command all the time, you can your local bin directory to your [`PATH`](https://docs.astral.sh/uv/concepts/tools/#the-bin-directory) environment. Usually it's located at `{User Folder}/.local/bin`. Once you added it to your `PATH` environment you can now run it just by typing `baad` command. + + +
+ Install using pip (Click to expand) +
``` pip install . ``` +
+ +
Tutorial with Screenshots (Click to expand) @@ -317,4 +337,4 @@ Don't like my [shitty code](https://shitcode.net/latest/language/python) and wha ### Copyright -**Blue Archive** is a registered trademark of NAT GAMES Co., Ltd., NEXON Korea Corp., and Yostar, Inc. This project is not affiliated with, endorsed by, or connected to NAT GAMES Co., Ltd., NEXON Korea Corp., NEXON GAMES Co., Ltd., Yostar, Inc., or any of their subsidiaries or affiliates. All game assets, content, and materials are copyrighted by their respective owners and are used for informational and educational purposes only. +**Blue Archive** is a registered trademark of NAT GAMES Co., Ltd., NEXON Korea Corp., and Yostar, Inc. This project is not affiliated with, endorsed by, or connected to NAT GAMES Co., Ltd., NEXON Korea Corp., NEXON GAMES Co., Ltd., Yostar, Inc., or any of their subsidiaries or affiliates. All game assets, content, and materials are copyrighted by their respective owners and are used for informational and educational purposes only. \ No newline at end of file diff --git a/baad/__init__.py b/baad/__init__.py index 1f356cc5..a33997dd 100644 --- a/baad/__init__.py +++ b/baad/__init__.py @@ -1 +1 @@ -__version__ = '1.0.0' +__version__ = '2.1.0' diff --git a/baad/utils/excel/MissionEmergencyCompleteExcel.json b/baad/utils/excel/MissionEmergencyCompleteExcel.json deleted file mode 100644 index 0637a088..00000000 --- a/baad/utils/excel/MissionEmergencyCompleteExcel.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/baad/utils/excel/VoiceTimelineExcel.json b/baad/utils/excel/VoiceTimelineExcel.json deleted file mode 100644 index 0637a088..00000000 --- a/baad/utils/excel/VoiceTimelineExcel.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 14386f9a..391deacc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,35 +1,28 @@ -[build-system] -requires = ["setuptools", "setuptools-scm"] -build-backend = "setuptools.build_meta" - [project] name = "BA-AD" +version = "2.1.0" description = "Blue Archive Asset Downloader" -authors = [{name = "Deathemonic", email = "zinth.others@skiff.com"},] -maintainers = [{name = "Deathemonic", email = "zinth.others@skiff.com"}] -version = "1.0.0" readme = "README.md" requires-python = ">=3.10" -license = {text = "MIT"} -keywords = ["unity", "asset", "downloader", "bluearchive"] -classifiers = [ - "Environment :: X11 Applications", - "License :: OSI Approved :: MIT License", - "Operating System :: POSIX :: Linux", - "Programming Language :: Python :: 3.10" -] dependencies = [ - 'aiohttp>=3.9.5', - 'aiofiles>=24.1.0', - 'requests>=2.32.3', - 'requests-cache>=1.2.1', - 'cloudscraper', - 'flatbuffers', - 'pycryptodome', - 'UnityPy', - 'rich', - 'xxhash' + "aiofiles>=24.1.0", + "aiohttp>=3.10.10", + "cloudscraper>=1.2.71", + "flatbuffers>=24.3.25", + "pycryptodome>=3.21.0", + "requests-cache>=1.2.1", + "requests>=2.32.3", + "rich>=13.9.4", + "unitypy>=1.20.12", + "xxhash>=3.5.0", ] +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["baad"] + [project.scripts] baad = "baad.__main__:main" \ No newline at end of file diff --git a/ruff.toml b/ruff.toml deleted file mode 100644 index 5ea908dd..00000000 --- a/ruff.toml +++ /dev/null @@ -1,83 +0,0 @@ -# Exclude a variety of commonly ignored directories. -exclude = [ - ".bzr", - ".direnv", - ".eggs", - ".git", - ".git-rewrite", - ".hg", - ".ipynb_checkpoints", - ".mypy_cache", - ".nox", - ".pants.d", - ".pyenv", - ".pytest_cache", - ".pytype", - ".ruff_cache", - ".svn", - ".tox", - ".venv", - ".vscode", - "__pypackages__", - "_build", - "buck-out", - "build", - "dist", - "node_modules", - "site-packages", - "venv", -] - -# Same as Black. -line-length = 120 -indent-width = 4 - -[lint] -preview = true - -# 1. Enable flake8-bugbear (`B`) rules, in addition to the defaults. -select = ["E4", "E7", "E9", "F", "B"] - -# 2. Avoid enforcing line-length violations (`E501`) -ignore = ["E501"] - -# 3. Avoid trying to fix flake8-bugbear (`B`) violations. -unfixable = ["B"] - - -# Allow unused variables when underscore-prefixed. -dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" - -# 4. Ignore `E402` (import violations) in all `__init__.py` files, and in select subdirectories. -[lint.per-file-ignores] -"__init__.py" = ["E402"] -"**/{tests,docs,tools}/*" = ["E402"] - -[format] -preview = true - -# 5. Use single quotes for non-triple-quoted strings. -quote-style = "single" - -# Like Black, indent with spaces, rather than tabs. -indent-style = "space" - -# Like Black, respect magic trailing commas. -skip-magic-trailing-comma = false - -# Like Black, automatically detect the appropriate line ending. -line-ending = "auto" - -# Enable auto-formatting of code examples in docstrings. Markdown, -# reStructuredText code/literal blocks and doctests are all supported. -# -# This is currently disabled by default, but it is planned for this -# to be opt-out in the future. -docstring-code-format = false - -# Set the line length limit used when formatting code snippets in -# docstrings. -# -# This only has an effect when the `docstring-code-format` setting is -# enabled. -docstring-code-line-length = "dynamic"