mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-18 02:09:21 -08:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54044f9527 | ||
|
|
1e5c039ece | ||
|
|
15555759dc | ||
|
|
0ed51e05cc | ||
|
|
634ef6febf | ||
|
|
bda4b2dbe1 | ||
|
|
f015305e7c |
@@ -6,7 +6,7 @@ if sys.version_info < (3, 10):
|
|||||||
) # noqa: F541
|
) # noqa: F541
|
||||||
|
|
||||||
|
|
||||||
__version__ = "v2.7.5"
|
__version__ = "v2.7.6"
|
||||||
|
|
||||||
APP_NAME = "FastAnime"
|
APP_NAME = "FastAnime"
|
||||||
AUTHOR = "Benex254"
|
AUTHOR = "Benex254"
|
||||||
|
|||||||
@@ -228,14 +228,32 @@ def run_cli(
|
|||||||
ctx.obj = Config()
|
ctx.obj = Config()
|
||||||
if ctx.obj.check_for_updates:
|
if ctx.obj.check_for_updates:
|
||||||
from .app_updater import check_for_updates
|
from .app_updater import check_for_updates
|
||||||
import time
|
|
||||||
|
|
||||||
is_latest = check_for_updates()
|
is_latest, github_release_data = check_for_updates()
|
||||||
if not is_latest:
|
if not is_latest:
|
||||||
print(
|
from rich.console import Console
|
||||||
"You are running an older version of fastanime please update to get the latest features"
|
from rich.markdown import Markdown
|
||||||
)
|
from .app_updater import update_app
|
||||||
time.sleep(10)
|
from rich.prompt import Confirm
|
||||||
|
|
||||||
|
def _print_release(release_data):
|
||||||
|
console = Console()
|
||||||
|
body = Markdown(release_data["body"])
|
||||||
|
tag = github_release_data["tag_name"]
|
||||||
|
tag_title = release_data["name"]
|
||||||
|
github_page_url = release_data["html_url"]
|
||||||
|
console.print(f"Release Page: {github_page_url}")
|
||||||
|
console.print(f"Tag: {tag}")
|
||||||
|
console.print(f"Title: {tag_title}")
|
||||||
|
console.print(body)
|
||||||
|
|
||||||
|
if Confirm.ask(
|
||||||
|
"A new version of fastanime is available, would you like to update?"
|
||||||
|
):
|
||||||
|
_, release_json = update_app()
|
||||||
|
print("Successfully updated")
|
||||||
|
_print_release(release_json)
|
||||||
|
exit(0)
|
||||||
|
|
||||||
ctx.obj.manga = manga
|
ctx.obj.manga = manga
|
||||||
if log:
|
if log:
|
||||||
|
|||||||
49
flake.nix
Normal file
49
flake.nix
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
description = "FastAnime Project Flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
|
||||||
|
python = pkgs.python310;
|
||||||
|
pythonPackages = python.pkgs;
|
||||||
|
fastanimeEnv = pythonPackages.buildPythonApplication {
|
||||||
|
pname = "fastanime";
|
||||||
|
version = "2.7.5";
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
# Add runtime dependencies
|
||||||
|
propagatedBuildInputs = with pythonPackages; [
|
||||||
|
click
|
||||||
|
inquirerpy
|
||||||
|
requests
|
||||||
|
rich
|
||||||
|
thefuzz
|
||||||
|
yt-dlp
|
||||||
|
dbus-python
|
||||||
|
hatchling
|
||||||
|
];
|
||||||
|
|
||||||
|
# Ensure compatibility with the pyproject.toml
|
||||||
|
format = "pyproject";
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages.default = fastanimeEnv;
|
||||||
|
|
||||||
|
# DevShell for development
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
buildInputs = [
|
||||||
|
fastanimeEnv
|
||||||
|
pythonPackages.hatchling
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "fastanime"
|
name = "fastanime"
|
||||||
version = "2.7.5"
|
version = "2.7.6"
|
||||||
description = "A browser anime site experience from the terminal"
|
description = "A browser anime site experience from the terminal"
|
||||||
license = "UNLICENSE"
|
license = "UNLICENSE"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
18
shell.nix
Normal file
18
shell.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
let
|
||||||
|
pkgs = import <nixpkgs> {};
|
||||||
|
in pkgs.mkShell {
|
||||||
|
packages = [
|
||||||
|
(pkgs.python3.withPackages (python-pkgs: [
|
||||||
|
python-pkgs.yt-dlp
|
||||||
|
python-pkgs.dbus-python
|
||||||
|
python-pkgs.requests
|
||||||
|
python-pkgs.rich
|
||||||
|
python-pkgs.click
|
||||||
|
python-pkgs.inquirerpy
|
||||||
|
python-pkgs.mpv
|
||||||
|
python-pkgs.fastapi
|
||||||
|
python-pkgs.thefuzz
|
||||||
|
python-pkgs.plyer
|
||||||
|
]))
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user