anipy-cli 3.0.5__py3-none-any.whl → 3.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of anipy-cli might be problematic. Click here for more details.
- anipy_cli/__init__.py +1 -1
- anipy_cli/clis/base_cli.py +13 -11
- anipy_cli/clis/default_cli.py +2 -3
- anipy_cli/clis/download_cli.py +1 -2
- anipy_cli/clis/history_cli.py +2 -3
- anipy_cli/config.py +7 -7
- anipy_cli/menus/mal_menu.py +2 -2
- anipy_cli/menus/menu.py +15 -0
- anipy_cli/prompts.py +6 -1
- {anipy_cli-3.0.5.dist-info → anipy_cli-3.1.1.dist-info}/METADATA +8 -5
- {anipy_cli-3.0.5.dist-info → anipy_cli-3.1.1.dist-info}/RECORD +13 -13
- {anipy_cli-3.0.5.dist-info → anipy_cli-3.1.1.dist-info}/WHEEL +0 -0
- {anipy_cli-3.0.5.dist-info → anipy_cli-3.1.1.dist-info}/entry_points.txt +0 -0
anipy_cli/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__appname__ = "anipy-cli"
|
|
2
|
-
__version__ = "3.
|
|
2
|
+
__version__ = "3.1.1"
|
anipy_cli/clis/base_cli.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
|
-
from typing import TYPE_CHECKING
|
|
2
|
+
from typing import TYPE_CHECKING, Optional
|
|
3
3
|
|
|
4
4
|
if TYPE_CHECKING:
|
|
5
5
|
from anipy_cli.arg_parser import CliArgs
|
|
@@ -10,23 +10,25 @@ class CliBase(ABC):
|
|
|
10
10
|
self.options = options
|
|
11
11
|
|
|
12
12
|
@abstractmethod
|
|
13
|
-
def print_header(self): ...
|
|
13
|
+
def print_header(self) -> Optional[bool]: ...
|
|
14
14
|
|
|
15
15
|
@abstractmethod
|
|
16
|
-
def take_input(self): ...
|
|
16
|
+
def take_input(self) -> Optional[bool]: ...
|
|
17
17
|
|
|
18
18
|
@abstractmethod
|
|
19
|
-
def process(self): ...
|
|
19
|
+
def process(self) -> Optional[bool]: ...
|
|
20
20
|
|
|
21
21
|
@abstractmethod
|
|
22
|
-
def show(self): ...
|
|
22
|
+
def show(self) -> Optional[bool]: ...
|
|
23
23
|
|
|
24
24
|
@abstractmethod
|
|
25
|
-
def post(self): ...
|
|
25
|
+
def post(self) -> Optional[bool]: ...
|
|
26
26
|
|
|
27
27
|
def run(self):
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
funcs = ["print_header", "take_input", "process", "show", "post"]
|
|
29
|
+
for f in funcs:
|
|
30
|
+
func = getattr(self, f)
|
|
31
|
+
ret = func()
|
|
32
|
+
|
|
33
|
+
if ret == False: # noqa: E712
|
|
34
|
+
break
|
anipy_cli/clis/default_cli.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import sys
|
|
2
1
|
from typing import TYPE_CHECKING, Optional
|
|
3
2
|
|
|
4
3
|
from anipy_api.locallist import LocalList
|
|
@@ -54,14 +53,14 @@ class DefaultCli(CliBase):
|
|
|
54
53
|
anime = search_show_prompt("default")
|
|
55
54
|
|
|
56
55
|
if anime is None:
|
|
57
|
-
|
|
56
|
+
return False
|
|
58
57
|
|
|
59
58
|
self.lang = lang_prompt(anime)
|
|
60
59
|
|
|
61
60
|
episode = pick_episode_prompt(anime, self.lang)
|
|
62
61
|
|
|
63
62
|
if episode is None:
|
|
64
|
-
|
|
63
|
+
return False
|
|
65
64
|
|
|
66
65
|
self.anime = anime
|
|
67
66
|
self.epsiode = episode
|
anipy_cli/clis/download_cli.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import sys
|
|
2
1
|
from typing import TYPE_CHECKING, Optional, List
|
|
3
2
|
|
|
4
3
|
from anipy_api.download import Downloader
|
|
@@ -50,7 +49,7 @@ class DownloadCli(CliBase):
|
|
|
50
49
|
anime = search_show_prompt("download")
|
|
51
50
|
|
|
52
51
|
if anime is None:
|
|
53
|
-
|
|
52
|
+
return False
|
|
54
53
|
|
|
55
54
|
self.lang = lang_prompt(anime)
|
|
56
55
|
|
anipy_cli/clis/history_cli.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import sys
|
|
2
1
|
from typing import TYPE_CHECKING, Optional
|
|
3
2
|
|
|
4
3
|
from anipy_api.anime import Anime
|
|
@@ -39,7 +38,7 @@ class HistoryCli(CliBase):
|
|
|
39
38
|
|
|
40
39
|
if not history:
|
|
41
40
|
print("You have no History, exiting")
|
|
42
|
-
|
|
41
|
+
return False
|
|
43
42
|
|
|
44
43
|
entry = inquirer.fuzzy( # type: ignore
|
|
45
44
|
message="Select History Entry:",
|
|
@@ -49,7 +48,7 @@ class HistoryCli(CliBase):
|
|
|
49
48
|
).execute()
|
|
50
49
|
|
|
51
50
|
if entry is None:
|
|
52
|
-
|
|
51
|
+
return False
|
|
53
52
|
|
|
54
53
|
self.history_entry = entry
|
|
55
54
|
self.anime = Anime.from_local_list_entry(entry)
|
anipy_cli/config.py
CHANGED
|
@@ -72,7 +72,7 @@ class Config:
|
|
|
72
72
|
|
|
73
73
|
For an updated list of providers look here: https://sdaqo.github.io/anipy-cli/availabilty
|
|
74
74
|
|
|
75
|
-
Supported providers (as of $version): gogoanime
|
|
75
|
+
Supported providers (as of $version): gogoanime, yugenanime
|
|
76
76
|
|
|
77
77
|
Examples:
|
|
78
78
|
providers:
|
|
@@ -83,12 +83,12 @@ class Config:
|
|
|
83
83
|
mal: ["provider2", "provider3"]
|
|
84
84
|
"""
|
|
85
85
|
defaults = {
|
|
86
|
-
"default": ["
|
|
87
|
-
"download": ["
|
|
88
|
-
"history": ["
|
|
89
|
-
"seasonal": ["
|
|
90
|
-
"binge": ["
|
|
91
|
-
"mal": ["
|
|
86
|
+
"default": ["yugenanime"],
|
|
87
|
+
"download": ["yugenanime"],
|
|
88
|
+
"history": ["yugenanime"],
|
|
89
|
+
"seasonal": ["yugenanime"],
|
|
90
|
+
"binge": ["yugenanime"],
|
|
91
|
+
"mal": ["yugenanime"],
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
value = self._get_value("providers", defaults, dict)
|
anipy_cli/menus/mal_menu.py
CHANGED
|
@@ -528,7 +528,7 @@ class MALMenu(MenuBase):
|
|
|
528
528
|
|
|
529
529
|
counter += 1
|
|
530
530
|
s.set_text(f"Progress: {counter / to_map_length * 100:.1f}%")
|
|
531
|
-
except:
|
|
531
|
+
except: # noqa: E722
|
|
532
532
|
failed.append(anime)
|
|
533
533
|
|
|
534
534
|
with ThreadPoolExecutor(max_workers=5) as pool:
|
|
@@ -582,7 +582,7 @@ class MALMenu(MenuBase):
|
|
|
582
582
|
|
|
583
583
|
counter += 1
|
|
584
584
|
s.set_text(f"Progress: {counter / to_map_length * 100}%")
|
|
585
|
-
except:
|
|
585
|
+
except: # noqa: E722
|
|
586
586
|
failed.append(entry)
|
|
587
587
|
|
|
588
588
|
with ThreadPoolExecutor(max_workers=5) as pool:
|
anipy_cli/menus/menu.py
CHANGED
|
@@ -36,6 +36,7 @@ class Menu(MenuBase):
|
|
|
36
36
|
self.history_list = LocalList(
|
|
37
37
|
Config()._history_file_path, migrate_cb=migrate_locallist
|
|
38
38
|
)
|
|
39
|
+
self.seasonal_list = LocalList(Config()._seasonal_file_path, migrate_locallist)
|
|
39
40
|
|
|
40
41
|
@property
|
|
41
42
|
def menu_options(self) -> List["MenuOption"]:
|
|
@@ -49,7 +50,9 @@ class Menu(MenuBase):
|
|
|
49
50
|
"c",
|
|
50
51
|
),
|
|
51
52
|
MenuOption("Select episode", self.selec_ep, "s"),
|
|
53
|
+
MenuOption("Select from history", self.selec_hist, "h"),
|
|
52
54
|
MenuOption("Search for Anime", self.search, "a"),
|
|
55
|
+
MenuOption("Add to seasonals", self.add_seasonal, "t"),
|
|
53
56
|
MenuOption("Print Video Info", self.video_info, "i"),
|
|
54
57
|
MenuOption("Download Episode", self.download_video, "d"),
|
|
55
58
|
MenuOption("Quit", self.quit, "q"),
|
|
@@ -136,6 +139,12 @@ class Menu(MenuBase):
|
|
|
136
139
|
self._start_episode(episode)
|
|
137
140
|
self.print_options()
|
|
138
141
|
|
|
142
|
+
def selec_hist(self):
|
|
143
|
+
from anipy_cli.clis.history_cli import HistoryCli
|
|
144
|
+
|
|
145
|
+
hist_cli = HistoryCli(self.options)
|
|
146
|
+
hist_cli.run()
|
|
147
|
+
|
|
139
148
|
def search(self):
|
|
140
149
|
search_result = search_show_prompt("default")
|
|
141
150
|
if search_result is None:
|
|
@@ -153,6 +162,12 @@ class Menu(MenuBase):
|
|
|
153
162
|
print(f"Stream Url: {self.stream.url}")
|
|
154
163
|
print(f"Quality: {self.stream.resolution}p")
|
|
155
164
|
|
|
165
|
+
def add_seasonal(self):
|
|
166
|
+
self.seasonal_list.update(
|
|
167
|
+
self.anime, episode=self.stream.episode, language=self.stream.language
|
|
168
|
+
)
|
|
169
|
+
cprint(colors.GREEN, "Anime added to seasonals!")
|
|
170
|
+
|
|
156
171
|
def download_video(self):
|
|
157
172
|
config = Config()
|
|
158
173
|
with DotSpinner("Starting Download...") as s:
|
anipy_cli/prompts.py
CHANGED
|
@@ -73,7 +73,12 @@ def search_show_prompt(
|
|
|
73
73
|
anime = inquirer.fuzzy( # type: ignore
|
|
74
74
|
message="Select Show:",
|
|
75
75
|
choices=results,
|
|
76
|
-
long_instruction=
|
|
76
|
+
long_instruction=(
|
|
77
|
+
"\nS = Anime is available in sub\n"
|
|
78
|
+
"D = Anime is available in dub\n"
|
|
79
|
+
"First two letters indicate the provider\n"
|
|
80
|
+
"To skip this prompt press ctrl+z"
|
|
81
|
+
),
|
|
77
82
|
mandatory=False,
|
|
78
83
|
).execute()
|
|
79
84
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: anipy-cli
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.1.1
|
|
4
4
|
Summary: Watch and Download anime from the comfort of your Terminal
|
|
5
5
|
Home-page: https://sdaqo.github.io/anipy-cli
|
|
6
6
|
License: GPL-3.0
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Requires-Dist: anipy-api (>=3.
|
|
17
|
+
Requires-Dist: anipy-api (>=3.1.1,<4.0.0)
|
|
18
18
|
Requires-Dist: appdirs (>=1.4.4,<2.0.0)
|
|
19
19
|
Requires-Dist: inquirerpy (>=0.3.4,<0.4.0)
|
|
20
20
|
Requires-Dist: pypresence (>=4.3.0,<5.0.0)
|
|
@@ -30,9 +30,6 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|
|
|
31
31
|
<p align="center"><img src="https://github.com/sdaqo/anipy-cli/assets/63876564/1dafa5fb-4273-4dc1-a7ab-2664dd668fc9" /> </p>
|
|
32
32
|
|
|
33
|
-
https://user-images.githubusercontent.com/63876564/162056019-ed0e7a60-78f6-4a2c-bc73-9be5dc2a4f07.mp4
|
|
34
|
-
|
|
35
|
-
|
|
36
33
|
## What even is this?
|
|
37
34
|
A Little tool written in python to watch and download anime from the terminal (the better way to watch anime)
|
|
38
35
|
This project's main aim is to create a enjoyable anime watching and downloading experience, directly in the terminal - your favorite place.
|
|
@@ -40,6 +37,8 @@ This project's main aim is to create a enjoyable anime watching and downloading
|
|
|
40
37
|
Since the version 3 rewrite this project is split into api and frontend this makes it easy to integrate this into your project!
|
|
41
38
|
|
|
42
39
|
## You are just here for the client?
|
|
40
|
+
<a href="https://pypi.org/project/anipy-cli/"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/anipy-cli?style=for-the-badge&logo=pypi&label=anipy-cli"></a>
|
|
41
|
+
|
|
43
42
|
As one wise man once said:
|
|
44
43
|
> I DONT GIVE A FUCK ABOUT THE FUCKING CODE! i just want to download this stupid fucking application and use it.
|
|
45
44
|
>
|
|
@@ -52,6 +51,8 @@ We do not have a .exe but we have pipx: `pipx install anipy-cli`
|
|
|
52
51
|
Check out [Getting Started - CLI](https://sdaqo.github.io/anipy-cli/getting-started-cli) for better instructions and advice!
|
|
53
52
|
|
|
54
53
|
## You want to use the api for your project?
|
|
54
|
+
<a href="https://pypi.org/project/anipy-api/"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/anipy-api?style=for-the-badge&logo=pypi&label=anipy-api"></a>
|
|
55
|
+
|
|
55
56
|
Feel free to - please check out [Getting Started - API](https://sdaqo.github.io/anipy-cli/getting-started-api) for instructions
|
|
56
57
|
|
|
57
58
|
|
|
@@ -65,3 +66,5 @@ Feel free to - please check out [Getting Started - API](https://sdaqo.github.io/
|
|
|
65
66
|
<img src="https://contrib.rocks/image?repo=sdaqo/anipy-cli" alt="anipy-cli contributors" title="anipy-cli contributors" width="800"/>
|
|
66
67
|
</a>
|
|
67
68
|
|
|
69
|
+
If you want to contribute as well check out this: https://sdaqo.github.io/anipy-cli/contributing
|
|
70
|
+
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
anipy_cli/__init__.py,sha256=
|
|
1
|
+
anipy_cli/__init__.py,sha256=B-408YFF0kwtP9-BovstzctP6hecE0JVRzCv29D12es,48
|
|
2
2
|
anipy_cli/arg_parser.py,sha256=r2yxTYqKdhKvbzj8Pg00_4lmhK8mguxAVbg9G2vM-II,5299
|
|
3
3
|
anipy_cli/cli.py,sha256=Ah5BE-u_SjcuzU5dQ5cSHtUloVRApCWwTK5i49yQtH8,1922
|
|
4
4
|
anipy_cli/clis/__init__.py,sha256=Y00uiPWiMvvRImxJMvfLA55BOkMUOrrx5vJUNvquNsY,411
|
|
5
|
-
anipy_cli/clis/base_cli.py,sha256=
|
|
5
|
+
anipy_cli/clis/base_cli.py,sha256=xPr_J8hKs7LkDLvmK6zyL1ZTZRpyC2IuFss8KsaDstU,817
|
|
6
6
|
anipy_cli/clis/binge_cli.py,sha256=eSvdOo_BRSb8-Xp48ZDcelqUBlDPdyQqu8OV0vc4szo,2281
|
|
7
|
-
anipy_cli/clis/default_cli.py,sha256=
|
|
8
|
-
anipy_cli/clis/download_cli.py,sha256=
|
|
9
|
-
anipy_cli/clis/history_cli.py,sha256=
|
|
7
|
+
anipy_cli/clis/default_cli.py,sha256=yuHyDqTgnq84I522mUkY1An5c114qqIYW-Xbm1SsDl4,2806
|
|
8
|
+
anipy_cli/clis/download_cli.py,sha256=y_8Txs6SSi60BvPCUcKDZg6zlN-w-eatM_O5ld0pzcQ,3187
|
|
9
|
+
anipy_cli/clis/history_cli.py,sha256=shaYPzqvXfWlRndHVpz8KwDlKjXXsUXzyZCHwUfrjuQ,2666
|
|
10
10
|
anipy_cli/clis/mal_cli.py,sha256=_tSLgDUOa6GOZNyCncSSzaVj088y5GAKkHVRSndLLxk,2258
|
|
11
11
|
anipy_cli/clis/seasonal_cli.py,sha256=GV2TQNm9UotG1cxfYbrFFgg7Jmy8SFa7w_GlFtPdRVE,616
|
|
12
12
|
anipy_cli/colors.py,sha256=voXC7z1Fs9tHg4zzNTNMIrt9k-EVgJ3_xEf5KiW2xgo,916
|
|
13
|
-
anipy_cli/config.py,sha256=
|
|
13
|
+
anipy_cli/config.py,sha256=vo3y-oPhuucbWo-4KX2hNacUlBP2l-L4wEVr7MHe7N4,15422
|
|
14
14
|
anipy_cli/discord.py,sha256=c6mdqnEdblzZBYs3cGP66oDeS4ySm59OfTRP-R-Duls,1160
|
|
15
15
|
anipy_cli/mal_proxy.py,sha256=wIsku2_dl8vKD2K99L63OlzA3L5fl-VmyeiXC9VrxI4,6981
|
|
16
16
|
anipy_cli/menus/__init__.py,sha256=aIzbphxAW-QGfZwR1DIegFZuTJp1O3tSUnai0f0f4lY,185
|
|
17
17
|
anipy_cli/menus/base_menu.py,sha256=g5b9Z7SpvCxcq_vqObcPzxLwcXeGPltLgSwa0sEzyfk,1140
|
|
18
|
-
anipy_cli/menus/mal_menu.py,sha256=
|
|
19
|
-
anipy_cli/menus/menu.py,sha256=
|
|
18
|
+
anipy_cli/menus/mal_menu.py,sha256=tJYq5J3k89_0BKFiWavn9Gqh5Z7uXtoUFqJaa3fT4o4,24105
|
|
19
|
+
anipy_cli/menus/menu.py,sha256=68n0EQSqxu2mPXiAXiHXmWk6FaJzSfHis2VkDRSRpmQ,6772
|
|
20
20
|
anipy_cli/menus/seasonal_menu.py,sha256=VBmeXanJb-vS5TXiK79KgtJ5vPW87gIOdpN_EijAG_U,9097
|
|
21
|
-
anipy_cli/prompts.py,sha256=
|
|
21
|
+
anipy_cli/prompts.py,sha256=NK8HvbF0WjOr2Ph3OAtBgI6k9kHGbWXiBzVLEcDfEHU,7229
|
|
22
22
|
anipy_cli/util.py,sha256=e9k29kGOi_h4RPrQfKMsg-8xNZHO-fLfBSma6SjGfYg,7684
|
|
23
|
-
anipy_cli-3.
|
|
24
|
-
anipy_cli-3.
|
|
25
|
-
anipy_cli-3.
|
|
26
|
-
anipy_cli-3.
|
|
23
|
+
anipy_cli-3.1.1.dist-info/METADATA,sha256=O6vRYvbjrxwyU0JosslVHlv9BNUQEvmF0DkJmFrW7Aw,3418
|
|
24
|
+
anipy_cli-3.1.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
25
|
+
anipy_cli-3.1.1.dist-info/entry_points.txt,sha256=86iXpcm_ECFndrt0JAI2mqYfXC2Ar7mGi0iOaxCrNP0,51
|
|
26
|
+
anipy_cli-3.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|