anipy-cli 3.1.0__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/menus/mal_menu.py +2 -2
- anipy_cli/menus/menu.py +15 -0
- {anipy_cli-3.1.0.dist-info → anipy_cli-3.1.1.dist-info}/METADATA +2 -2
- {anipy_cli-3.1.0.dist-info → anipy_cli-3.1.1.dist-info}/RECORD +11 -11
- {anipy_cli-3.1.0.dist-info → anipy_cli-3.1.1.dist-info}/WHEEL +0 -0
- {anipy_cli-3.1.0.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.1.
|
|
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/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:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: anipy-cli
|
|
3
|
-
Version: 3.1.
|
|
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.1.
|
|
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)
|
|
@@ -1,12 +1,12 @@
|
|
|
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
|
|
@@ -15,12 +15,12 @@ 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
21
|
anipy_cli/prompts.py,sha256=NK8HvbF0WjOr2Ph3OAtBgI6k9kHGbWXiBzVLEcDfEHU,7229
|
|
22
22
|
anipy_cli/util.py,sha256=e9k29kGOi_h4RPrQfKMsg-8xNZHO-fLfBSma6SjGfYg,7684
|
|
23
|
-
anipy_cli-3.1.
|
|
24
|
-
anipy_cli-3.1.
|
|
25
|
-
anipy_cli-3.1.
|
|
26
|
-
anipy_cli-3.1.
|
|
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
|