diff --git a/fastanime/Controller/__init__.py b/fastanime/Controller/__init__.py index 1563d9e..c02ce2b 100644 --- a/fastanime/Controller/__init__.py +++ b/fastanime/Controller/__init__.py @@ -1,7 +1,5 @@ from .anime_screen import AnimeScreenController -from .crashlog_screen import CrashLogScreenController from .downloads_screen import DownloadsScreenController -from .help_screen import HelpScreenController from .home_screen import HomeScreenController from .my_list_screen import MyListScreenController from .search_screen import SearchScreenController diff --git a/fastanime/Controller/crashlog_screen.py b/fastanime/Controller/crashlog_screen.py deleted file mode 100644 index e99dbce..0000000 --- a/fastanime/Controller/crashlog_screen.py +++ /dev/null @@ -1,14 +0,0 @@ -from ..View import CrashLogScreenView -from ..Model import CrashLogScreenModel - - -class CrashLogScreenController: - """The crash log screen controller""" - - def __init__(self, model: CrashLogScreenModel): - self.model = model - self.view = CrashLogScreenView(controller=self, model=self.model) - # self.update_anime_view() - - def get_view(self) -> CrashLogScreenView: - return self.view diff --git a/fastanime/Controller/help_screen.py b/fastanime/Controller/help_screen.py deleted file mode 100644 index 165fa6c..0000000 --- a/fastanime/Controller/help_screen.py +++ /dev/null @@ -1,13 +0,0 @@ -from ..Model import HelpScreenModel -from ..View import HelpScreenView - - -class HelpScreenController: - """The help screen controller""" - - def __init__(self, model: HelpScreenModel): - self.model = model - self.view = HelpScreenView(controller=self, model=self.model) - - def get_view(self) -> HelpScreenView: - return self.view diff --git a/fastanime/Model/__init__.py b/fastanime/Model/__init__.py index bfaf615..b22905b 100644 --- a/fastanime/Model/__init__.py +++ b/fastanime/Model/__init__.py @@ -1,7 +1,5 @@ from .anime_screen import AnimeScreenModel -from .crashlog_screen import CrashLogScreenModel from .download_screen import DownloadsScreenModel -from .help_screen import HelpScreenModel from .home_screen import HomeScreenModel from .my_list_screen import MyListScreenModel from .search_screen import SearchScreenModel diff --git a/fastanime/Model/crashlog_screen.py b/fastanime/Model/crashlog_screen.py deleted file mode 100644 index 88e9b27..0000000 --- a/fastanime/Model/crashlog_screen.py +++ /dev/null @@ -1,7 +0,0 @@ -from .base_model import BaseScreenModel - - -class CrashLogScreenModel(BaseScreenModel): - """ - Handles the crashlog screen logic - """ diff --git a/fastanime/Model/help_screen.py b/fastanime/Model/help_screen.py deleted file mode 100644 index 8a87e28..0000000 --- a/fastanime/Model/help_screen.py +++ /dev/null @@ -1,7 +0,0 @@ -from .base_model import BaseScreenModel - - -class HelpScreenModel(BaseScreenModel): - """ - Handles the help screen logic - """ diff --git a/fastanime/View/CrashLogScreen/crashlog_screen.kv b/fastanime/View/CrashLogScreen/crashlog_screen.kv deleted file mode 100644 index 49374f8..0000000 --- a/fastanime/View/CrashLogScreen/crashlog_screen.kv +++ /dev/null @@ -1,21 +0,0 @@ -#:import get_color_from_hex kivy.utils.get_color_from_hex -#:import StringProperty kivy.properties.StringProperty - - - md_bg_color: self.theme_cls.backgroundColor - # main_container:main_container - MDBoxLayout: - NavRail: - screen:root - MDAnchorLayout: - anchor_y: 'top' - padding:"10dp" - MDBoxLayout: - orientation: 'vertical' - SearchBar: - MDScrollView: - MDLabel: - text:root.crash_text - adaptive_height:True - markup:True - padding:"10dp" \ No newline at end of file diff --git a/fastanime/View/CrashLogScreen/crashlog_screen.py b/fastanime/View/CrashLogScreen/crashlog_screen.py deleted file mode 100644 index 8e19a2b..0000000 --- a/fastanime/View/CrashLogScreen/crashlog_screen.py +++ /dev/null @@ -1,21 +0,0 @@ -from kivy.properties import StringProperty - -from ...Utility.kivy_markup_helper import bolden, color_text -from ...Utility.utils import read_crash_file -from ...View.base_screen import BaseScreenView - - -class CrashLogScreenView(BaseScreenView): - """The crash log screen""" - - crash_text = StringProperty() - - def __init__(self, **kw): - super().__init__(**kw) - if crashes := read_crash_file(): - self.crash_text = crashes - else: - self.crash_text = color_text( - f"No Crashes so far :) and if there are any in the future {bolden('please report! Okay?')}", - self.theme_cls.primaryColor, - ) diff --git a/fastanime/View/HelpScreen/help_screen.kv b/fastanime/View/HelpScreen/help_screen.kv deleted file mode 100644 index 33baaa3..0000000 --- a/fastanime/View/HelpScreen/help_screen.kv +++ /dev/null @@ -1,60 +0,0 @@ -#:import get_color_from_hex kivy.utils.get_color_from_hex -#:import StringProperty kivy.properties.StringProperty - - - spacing:"10dp" - orientation:"vertical" - adaptive_height:True - md_bg_color:self.theme_cls.surfaceContainerLowColor - theme_text_color:"Secondary" - - - halign:"left" - -: - adaptive_height:True - max_lines:0 - shorten:False - markup:True - font_style: "Body" - padding:"10dp" - role: "large" - - - md_bg_color: self.theme_cls.backgroundColor - # main_container:main_container - MDBoxLayout: - NavRail: - screen:root - MDAnchorLayout: - anchor_y: 'top' - padding:"10dp" - MDBoxLayout: - orientation: 'vertical' - SearchBar: - MDScrollView: - size_hint_x:.95 - MDBoxLayout: - adaptive_height:True - padding:"10dp" - orientation:"vertical" - HelpCard: - HelpHeaderLabel: - text:"Animdl Commands" - HelpDescription: - text:root.animdl_help - HelpCard: - HelpHeaderLabel: - text:"Installing Animdl" - HelpDescription: - text:root.installing_animdl_help - HelpCard: - HelpHeaderLabel: - text:"Available Themes" - HelpDescription: - text:root.available_themes - HelpCard: - HelpHeaderLabel: - text:"About" - HelpDescription: - text:"This app was made to be a gui wrapper for any and all anime cli tools. Inoder to solve the age old problem of getting the same experience from the cli as you would in a website" \ No newline at end of file diff --git a/fastanime/View/HelpScreen/help_screen.py b/fastanime/View/HelpScreen/help_screen.py deleted file mode 100644 index 5bcf949..0000000 --- a/fastanime/View/HelpScreen/help_screen.py +++ /dev/null @@ -1,72 +0,0 @@ -from kivy.properties import ObjectProperty, StringProperty - -from ...Utility.data import themes_available -from ...Utility.kivy_markup_helper import bolden, color_text, underline -from ...View.base_screen import BaseScreenView - - -class HelpScreenView(BaseScreenView): - main_container = ObjectProperty() - animdl_help = StringProperty() - installing_animdl_help = StringProperty() - available_themes = StringProperty() - - def __init__(self, **kw): - super(HelpScreenView, self).__init__(**kw) - self.animdl_help = f""" -{underline(color_text(bolden('Streaming Commands'),self.theme_cls.surfaceBrightColor))} - {color_text(bolden('-r:'),self.theme_cls.primaryFixedDimColor)} specifies the range of episodes - example: {color_text(('animdl stream -r 1-4'),self.theme_cls.tertiaryColor)} - explanation:in this case gets 4 episodes 1 to 4 - {color_text(('-s:'),self.theme_cls.primaryFixedDimColor)} special selector for the most recent episodes or basically selects from the end - example: {color_text(('animdl stream -s 4'),self.theme_cls.tertiaryColor)} - explanation: in this case gets the latest 4 episodes - {color_text(('-q:'),self.theme_cls.primaryFixedDimColor)} sets the quality of the stream - example: {color_text(('animdl stream -q best'),self.theme_cls.tertiaryColor)} - explanation: The quality of the anime stream should be the best possible others include 1080,720... plus worst -{underline(color_text(bolden('Downloading Commands'),self.theme_cls.surfaceBrightColor))} - {color_text(bolden('-r:'),self.theme_cls.primaryFixedDimColor)} specifies the range of episodes - example: {color_text(('animdl download -r 1-4'),self.theme_cls.tertiaryColor)} - explanation:in this case gets 4 episodes 1 to 4 - {color_text(('-s:'),self.theme_cls.primaryFixedDimColor)} special selector for the most recent episodes or basically selects from the end - example: {color_text(('animdl download -s 4'),self.theme_cls.tertiaryColor)} - explanation: in this case gets the latest 4 episodes - {color_text(('-q:'),self.theme_cls.primaryFixedDimColor)} sets the quality of the download - example: {color_text(('animdl download -q best'),self.theme_cls.tertiaryColor)} - explanation: The quality of the anime download should be the best possible others include 1080,720... plus worst - """ - self.installing_animdl_help = f""" -This works on windows only and should be done in powershell -1. First install pyenv with the following command: -{color_text(('Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"'),self.theme_cls.tertiaryColor)} -2. run the following command to check if successsful: -{color_text(('pyenv --version '),self.theme_cls.tertiaryColor)} -3. run the following command to install python 3.10 -{color_text(('pyenv install 3.10'),self.theme_cls.tertiaryColor)} -4. To confirm successful install of python 3.10 run the following command and check if 3.10 is listed: -{color_text(('pyenv -l'),self.theme_cls.tertiaryColor)} -5. Next run: -{color_text(('pyenv local 3.10'),self.theme_cls.tertiaryColor)} (if in anixstream directory to set python 3.10 as local interpreter) -or run: -{color_text(('pyenv global 3.10'),self.theme_cls.tertiaryColor)} (if in another directory to set python version 3.10 as global interpreter) -6. Check if success by running and checking if output is 3.10: -{color_text(('python --version'),self.theme_cls.tertiaryColor)} -7. Run: -{color_text(('python -m pip install animdl'),self.theme_cls.tertiaryColor)} -8. Check if success by running: -{color_text(('python -m animdl'),self.theme_cls.tertiaryColor)} -{color_text(('Note:'),self.theme_cls.secondaryColor)} -All this instructions should be done from the folder you choose to install -aniXstream but incase you have never installed python should work any where -{bolden('-----------------------------')} -Now enjoy :) -{bolden('-----------------------------')} - """ - self.available_themes = "\n".join(themes_available) - - def model_is_changed(self) -> None: - """ - Called whenever any change has occurred in the data model. - The view in this method tracks these changes and updates the UI - according to these changes. - """ diff --git a/fastanime/View/__init__.py b/fastanime/View/__init__.py index 7bcbea3..2fb097f 100644 --- a/fastanime/View/__init__.py +++ b/fastanime/View/__init__.py @@ -1,8 +1,6 @@ # screens from .AnimeScreen.anime_screen import AnimeScreenView -from .CrashLogScreen.crashlog_screen import CrashLogScreenView from .DownloadsScreen.download_screen import DownloadsScreenView -from .HelpScreen.help_screen import HelpScreenView from .HomeScreen.home_screen import HomeScreenView from .MylistScreen.my_list_screen import MyListScreenView from .SearchScreen.search_screen import SearchScreenView diff --git a/fastanime/View/components/navrail.kv b/fastanime/View/components/navrail.kv index b099387..cc5ae43 100644 --- a/fastanime/View/components/navrail.kv +++ b/fastanime/View/components/navrail.kv @@ -33,13 +33,3 @@ icon: "cog" text: "settings" on_press:app.open_settings() - CommonNavigationRailItem: - icon: "help-circle" - text: "Help" - on_press: - root.screen.manager_screens.current = "help screen" - CommonNavigationRailItem: - icon: "bug" - text: "debug" - on_press: - root.screen.manager_screens.current = "crashlog screen" diff --git a/fastanime/View/screens.py b/fastanime/View/screens.py index 709dfcc..c75195a 100644 --- a/fastanime/View/screens.py +++ b/fastanime/View/screens.py @@ -1,17 +1,13 @@ from ..Controller import ( AnimeScreenController, - CrashLogScreenController, DownloadsScreenController, - HelpScreenController, HomeScreenController, MyListScreenController, SearchScreenController, ) from ..Model import ( AnimeScreenModel, - CrashLogScreenModel, DownloadsScreenModel, - HelpScreenModel, HomeScreenModel, MyListScreenModel, SearchScreenModel, @@ -34,16 +30,8 @@ screens = { "model": MyListScreenModel, "controller": MyListScreenController, }, - "crashlog screen": { - "model": CrashLogScreenModel, - "controller": CrashLogScreenController, - }, "downloads screen": { "model": DownloadsScreenModel, "controller": DownloadsScreenController, }, - "help screen": { - "model": HelpScreenModel, - "controller": HelpScreenController, - }, }