From 2803ef43c5aacc409b22f2fb0a16a5686d6abe20 Mon Sep 17 00:00:00 2001 From: Jeremiah K <17190268+jeremiah-k@users.noreply.github.com> Date: Tue, 19 Nov 2024 20:40:58 -0600 Subject: [PATCH 1/2] Remove Windows specific code --- README.md | 26 ++++++++------------------ app/cli.py | 13 ------------- app/setup_config.py | 15 --------------- 3 files changed, 8 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 7916ad7..2d6b6b8 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Fetchtastic is a utility for downloading and managing the latest Meshtastic Andr - [Installation](#installation) - [Termux Installation (Android)](#termux-installation-android) - - [Windows/Mac/Linux Installation](#windowsmaclinux-installation) + - [Linux/Mac Installation](#linuxmac-installation) - [Usage](#usage) - [Setup Process](#setup-process) - [Command List](#command-list) @@ -42,21 +42,21 @@ pkg install python python-pip openssl -y pip install fetchtastic ``` -### Windows/Mac/Linux Installation +### Linux/Mac Installation -Fetchtastic can also be installed on Windows, macOS, or Linux systems. +Fetchtastic can also be installed on Linux or macOS systems. #### Install with pipx (Recommended) -It's recommended to use `pipx` to install Fetchtastic in an isolated environment. +It's recommended to use `pipx` to install Fetchtastic in an isolated environment. (If you prefer, you can use `pip` too.) 1. **Install pipx**: Follow the installation instructions for your platform on the [pipx documentation page](https://pypa.github.io/pipx/installation/). - Restart your terminal or command prompt after installing pipx. + Restart your terminal after installing pipx. -3. **Install Fetchtastic with pipx**: +2. **Install Fetchtastic with pipx**: ```bash pipx install fetchtastic @@ -82,7 +82,7 @@ During setup, you will be able to: - Choose to receive notifications only when new files are downloaded. (Optional) - Add a cron job to run Fetchtastic regularly. (Optional) - On Termux, Fetchtastic can be scheduled to run daily at 3 AM using Termux's cron. - - On Windows/Mac/Linux, Fetchtastic can be scheduled using the system's cron scheduler. + - On Linux/Mac, Fetchtastic can be scheduled using the system's cron scheduler. ### Command List @@ -108,9 +108,7 @@ You can manually edit the configuration file to change the settings. During setup, you have the option to add a cron job that runs Fetchtastic daily at 3 AM. -#### Termux/Linux/Mac OS - -The setup process will configure the cron job using the system's cron implementation. +The setup process will configure the cron job using Termux's cron implementation. To modify the cron job, you can run: @@ -118,14 +116,6 @@ To modify the cron job, you can run: crontab -e ``` -#### Windows - -You can schedule Fetchtastic to run automatically using the Task Scheduler. - -1. Open **Task Scheduler**. -2. Create a new **Basic Task**. -3. Set the action to **Start a program** and enter `fetchtastic download`. - ### Notifications via NTFY If you choose to set up notifications, Fetchtastic will send updates to your specified NTFY topic. diff --git a/app/cli.py b/app/cli.py index 43577fd..1800d54 100644 --- a/app/cli.py +++ b/app/cli.py @@ -135,19 +135,6 @@ def copy_to_clipboard_func(text): "xclip or xsel not found. Install xclip or xsel to use clipboard functionality." ) return False - elif system == "Windows": - # Windows - try: - import win32clipboard - - win32clipboard.OpenClipboard() - win32clipboard.EmptyClipboard() - win32clipboard.SetClipboardText(text) - win32clipboard.CloseClipboard() - return True - except Exception as e: - print(f"An error occurred while copying to clipboard: {e}") - return False else: print("Clipboard functionality is not supported on this platform.") return False diff --git a/app/setup_config.py b/app/setup_config.py index 24e8fd5..1637ee2 100644 --- a/app/setup_config.py +++ b/app/setup_config.py @@ -20,8 +20,6 @@ def is_termux(): def get_platform(): if is_termux(): return "termux" - elif platform.system() == "Windows": - return "windows" elif platform.system() == "Darwin": return "mac" elif platform.system() == "Linux": @@ -469,19 +467,6 @@ def copy_to_clipboard_func(text): "xclip or xsel not found. Install xclip or xsel to use clipboard functionality." ) return False - elif system == "Windows": - # Windows - try: - import win32clipboard - - win32clipboard.OpenClipboard() - win32clipboard.EmptyClipboard() - win32clipboard.SetClipboardText(text) - win32clipboard.CloseClipboard() - return True - except Exception as e: - print(f"An error occurred while copying to clipboard: {e}") - return False else: print("Clipboard functionality is not supported on this platform.") return False From 64474423891be2738cd8a979ea2e4f919f2e9af2 Mon Sep 17 00:00:00 2001 From: Jeremiah K <17190268+jeremiah-k@users.noreply.github.com> Date: Tue, 19 Nov 2024 20:42:40 -0600 Subject: [PATCH 2/2] Bump version --- setup.cfg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index ae34139..df18219 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = fetchtastic -version = 0.2.0 +version = 0.2.1 author = Jeremiah K author_email = jeremiahk@gmx.com description = Meshtastic Firmware and APK Downloader @@ -14,7 +14,6 @@ classifiers = Operating System :: Android Operating System :: POSIX :: Linux Operating System :: MacOS - Operating System :: Microsoft :: Windows [options] packages = find: @@ -23,7 +22,6 @@ install_requires = pick PyYAML urllib3 - pywin32; platform_system == "Windows" [options.packages.find] where = .