From a865cb4ca2b0c54d6674c866dfd2b0e84c861d93 Mon Sep 17 00:00:00 2001 From: VineFeeder Date: Mon, 22 Jun 2026 15:05:37 +0100 Subject: [PATCH] edits --- README.md | 267 +++++++++++++++++---------------- WINDOWS_INSTALL_CHECKLIST.txt | 57 +++++++ packages/envied/pyproject.toml | 2 +- 3 files changed, 193 insertions(+), 133 deletions(-) create mode 100644 WINDOWS_INSTALL_CHECKLIST.txt diff --git a/README.md b/README.md index 4852331..8b22492 100644 --- a/README.md +++ b/README.md @@ -1,180 +1,189 @@ -**TwinVine** - +# TwinVine ![TwinVine GUI](https://github.com/vinefeeder/TwinVine/blob/main/images/vinefeederA.png) +TwinVine combines two Python packages: -TwinVine is the home of TWO packages [Vinefeeder](https://github.com/vinefeeder/TwinVine/blob/main/packages/vinefeeder/src/vinefeeder/README.md) -and [Envied](https://github.com/vinefeeder/TwinVine/blob/main/packages/envied/README.md) +- [Vinefeeder](https://github.com/vinefeeder/TwinVine/blob/main/packages/vinefeeder/src/vinefeeder/README.md) +- [Envied](https://github.com/vinefeeder/TwinVine/blob/main/packages/envied/README.md) -TwinVine is the easy way to handle your download tasks. -* When you have an exact program url - just use envied as a command line call. -* When you only have the program name - just start with a search in vinefeeder. -* When you dont know what you want; use the browse function. -* Browse media categories like Film, Drama or Sport, for a selected service. -* Batch Mode: select multiple downloads from various services and download all together. - +TwinVine helps you find, select, and download media. Use the graphical front end when you want search and selection assistance, and use the command-line downloader for exact URLs. +## Key workflows -**usage** +- Use `envied` when you already have an exact program URL. +- Use `vinefeeder` search when you only know a program name. +- Use the browse feature when you want to explore categories like Film, Drama, or Sport. +- Use Batch Mode to select and download multiple items from several services. -TwinVine is a sophisticated piece of software engineering, (if I am allowed to say that) , handling two Python packages at once, each inter-playing with the other. It needs treating differently from anything you will have used before. +## Usage -All access must be done via the package manager - uv. You have two ways in +TwinVine runs through the Python package manager `uv`. -``` - uv run vinefeeder - uv run envied dl --select-titles - +### Run the main tools - To go to the command line use of 'envied', on Linix you may select 'run envied' after clicking the GUI envied button. On Windows, close the GUI directly, or ctrl+c to end the program and return to the terminal. +```bash +uv run vinefeeder +uv run envied dl --select-titles ``` - -**Installation** - with binaries and python already installed +### Access envied from the GUI -uv is the package manager and loads both VineFeeder and Envied together. Envied runs independenly or may be called by Vinefeeder. +- On Linux: choose **run envied** after clicking the GUI `envied` button. +- On Windows: close the GUI or press `Ctrl+C` to return to the terminal. -If you do not alrealy have uv as a python package try to install it first, using pip - +## Installation -``` +### Prerequisites + +Install `uv` if needed: + +```bash pip install uv -or python3 -m pip install uv -or use your system's package manager to install python-uv ``` -Install TwinVine; +Or install `python-uv` through your system package manager. -the following installs the latest version directly from the GitHub repository: +### Install TwinVine -```shell +```bash git clone https://github.com/vinefeeder/TwinVine.git cd TwinVine uv clean uv lock uv sync -uv run vinefeeder --help or +uv run vinefeeder --help uv run envied --help ``` -**Installation for Windows** with a bare machine and novice user. (Why not print out these instructions so you can tick them off as you work through them?) - -You are going to install all the required binary files and automatically add then to system variable - Path. The Python interpreter will be installed automatically too. +## Windows installation +This section is aimed at novice Windows users. +A printer-friendly checklist is available here: - - download git from https://github.com/git-for-windows/git/releases/download/v2.52.0.windows.1/Git-2.52.0-64-bit.exe and run the installer - - re-start your machine - - Open Start - - Type PowerShell and select open PowerShell - - Within PowerShell change directory, chdir, or cd, to your chosen location, where TwinVine is to be installed, and type the following command followed by enter, - - -``` -git clone https://github.com/vinefeeder/TwinVine.git -``` +[WINDOWS_INSTALL_CHECKLIST.txt](WINDOWS_INSTALL_CHECKLIST.txt) - - - Files will be downloaded, a folder called TwinVine will be created. - - Close PowerShell and re-open with admininstrator privileges. Do... - - Open Start - - Type PowerShell - - Right-click Windows PowerShell → Run as administrator - - Inside PowerShell, change directory to TwinVine (cd TwinVine) and run the following command by copying or typing the line, followed by pressing enter. - - -``` - powershell -ExecutionPolicy Bypass -File .\Install-media-tools.ps1 -``` +### Windows quick overview - - - Watch the installation, a number of binary files will be downloaded and installed to C:\Tool\bin. Installation will take a while. After finishing, close PowerShell and restart your machine. - - Open Start - - Type PowerShell - - Type uv [return]. Expect to see a screen of help. If uv did not install from the Install-media-tools.ps1 script you will not see any response. Uv is a python package manager. - - If uv is not installed close PowerShell and re-open as administrator, so - - Open Start - - Type PowerShell - - Right-click Windows PowerShell → Run as administrator - - Type powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/uv/releases/download/0.9.18/uv-installer.ps1 | iex" [return] +1. Install Git for Windows. +2. Clone the TwinVine repository. +3. Run the Windows installer script. +4. Verify that `uv` is installed. +5. Initialize TwinVine and verify the commands. - - Close PowerShell and re-start your machine. - - Type [WindowsKey]+R to open PowerShell, - - cd to TwinVine and type each line below followed by return. Some commands will take a while to finish. - -``` - uv lock - uv sync - cp .\packages\envied\src\envied\envied-working-example.yaml .\packages\envied\src\envied\envied.yaml - uv run vinefeeder --help - uv run envied --help - uv run envied dl -? - -``` -That's it for Windows; uv run vinefeeder OR uv run envied dl -? to get started! -Vinefeeder offers a graphical interace for some services; envied is a command-line tool for all services offered. +## Linux installation +On Linux, use the bundled shell script to install required binaries. -**Installation for Linux** with a bare machine. +1. Open `Install-media-tools.sh` in a text editor. +2. Change the package manager command on lines 6 and 7 from `apt-get` to your distro's package manager (`dnf`, `pacman`, `zypper`, etc.). +3. Save the file. +4. Run: -There is an installation file to install binaries. Install-media-tools.sh. Open it in a text editor and edit lines 6 and 7. Change the Debian/Ubuntu package-manager command 'apt-get' to whatever your package manager uses (dnf, pacman, yast, etc) -Then save and close and run the script with -``` +```bash sudo bash ./Install-media-tools.sh ``` -The script will take some time to install. Check uv is installed. -If not, you can install uv with the following command in a terminal window -``` +5. If `uv` is still not installed, run: + +```bash wget -qO- https://astral.sh/uv/install.sh | sh ``` -Finally, cd to TwinVine and run each command in order, -``` - uv lock - uv sync - cp ./packages/envied/src/envied/envied-working-example.yaml ./packages/envied/src/envied/envied.yaml - uv run vinefeeder --help - uv run envied --help - uv run envied dl -? - +6. Then initialize TwinVine: + +```bash +cd TwinVine +uv lock +uv sync +cp ./packages/envied/src/envied/envied-working-example.yaml ./packages/envied/src/envied/envied.yaml +uv run vinefeeder --help +uv run envied --help +uv run envied dl -? ``` - -That's it for Linux; uv run vinefeeder OR uv run envied dl -? to get started! -Vinefeeder offers a graphical interace for some services; envied is a command-line tool for all services offered. +## Locations +By default, downloaded files are saved to: -**Locations** +- `TwinVine/packages/envied/src/downloads/` -As configured your files will be downloaded to TwinVine/packages/envied/src/downloads/ -The envied.yaml can be edited for the download location - use a full path, on windows with forward slashes C:/Users/Downloads and Linux /home/user/Downloads, for example. -Cookies: As configured the Cookies folder is in packages/envied/src/. Each cookie file - type .txt should be names exactly as the service eg DNSP.txt and you personal login cookie placed inside. -WVDs: A CDM - called device.wvd is located at TwinVine/WVDs -Vaults: No local vaults are configured but a remote vault is used for caching and fetching. Often times you will see DRMLab s the source of the license key -saving unnecessary requests to a license server. +Edit `packages/envied/src/envied/envied.yaml` to change the media-download location and other values like email:password for a service. -**Linux** +- Use a full path. +- On Windows, use forward slashes: `C:/Users/Downloads`. +- On Linux, use `/home/user/Downloads`. -Linux systems are known to screen freeze after envied has finished a download. -The top level vinefeeder config file at TwinVine/packages/vinefeeder/src/vinefeeder/config.yaml should have TERMINAL_RESET: True set. +Cookies live in `packages/envied/src/`. Each cookie file should be named exactly for the service, for example `DNSP.txt`, and contain the service login cookie. -**Services** +WVD files are stored in `TwinVine/WVDs/`, such as `device.wvd`. -Vinefeeder currently has 10 services for which search, browse and list-select are available - - ALL4 BBC ITVX MY5 PLEX RTE STV TPTV TVNZ U - -Envied has +Vaults are not configured locally by default. TwinVine uses a remote vault for caching and license retrieval and may display `DRMLab` as the license source. -ALL4 AUBC CBS CWTV DSCP iP MAX MY5 NF PCOK PLEX RTE ROKU SPOT TPTV TVNZ YTBE -ARD CBC CTV DSNP ITV MTSP NBLA NRK PLUTO RTE STV TUBI UKTV ZDF -These services have web-origins and not all have been tested by me. +## Linux note -**Use AI to create your own Vinefeeder service** +Linux terminals can sometimes freeze after `envied` completes a download. If that happens, ensure `TERMINAL_RESET: True` is set in: -Here is a prompt that chatGPT generated itself after rewriting an existing service that had addopted an new API. -I finally realised that there ws much code duplication between vinfeeder and envied and I might as well import -and use envied code in vinefeeder to make service creation easier and faster. +- `TwinVine/packages/vinefeeder/src/vinefeeder/config.yaml` + +## Services + +### Vinefeeder services + +Vinefeeder currently supports search, browse, and list-select for these services: + +- ALL4 +- BBC +- ITVX +- MY5 +- PLEX +- RTE +- STV +- TPTV +- TVNZ +- U + +### Envied services + +Envied supports a broader set of direct-download services: + +- ALL4 +- AUBC +- CBS +- CWTV +- DSCP +- iP +- MAX +- MY5 +- NF +- PCOK +- PLEX +- RTE +- ROKU +- SPOT +- TPTV +- TVNZ +- YTBE +- ARD +- CBC +- CTV +- DSNP +- ITV +- MTSP +- NBLA +- NRK +- PLUTO +- STV +- TUBI +- UKTV +- ZDF + +These services have web origins and not all have been tested. + +## You can use AI to create your own Vinefeeder service!! + +The prompt below was written by ChatGPT after refactoring a Vinefeeder service to reuse Envied service logic. ``` I am working on the TwinVine project: @@ -257,14 +266,11 @@ The Vinefeeder service should: * how I should test the rewritten service Please do not merely describe the approach. Provide the actual rewritten Vinefeeder service code. + ``` -So with that you may write your own vinefeeder service and place the folder in packages/vinefeeder/src/vinefeeder/services/ +## Linux users only: Adding a little automation -**Servies Note** -Some services may be found in an options folder (packages/envied/src/envied/options/). They may have constraints on the python version they run under. Only copy a service into the packages/envied/src/envied/services folder if the version matches yours. - -**Linux users only: Adding a little automation** -in .bashrc in your home directory you can add useful aliases and scripts to speed the start-up of TwinVine. +In .bashrc in your home directory you can add useful aliases and scripts to speed the start-up of TwinVine. Add the following lines at the end of your .bashrc, (or your system's equivalent), to start Vinefeeder by typing 'v' into a terminal window; and 'e' to start envied with a pre-filled command. BE SURE TO EDIT your/path/to/Twinvine to reflect your needs. @@ -283,7 +289,7 @@ e() { } ``` -**Other README's** +## Other README's TwinVine/packages/vinefeeder/src/vinefeeder/README.md for details for confuring Envied download options on a service by service basis. TwinVine/packages/envied/README.md links to wiki (envied - envied's parent) @@ -304,7 +310,4 @@ Images ![TwinVine GUI](https://github.com/vinefeeder/TwinVine/blob/main/images/vinefeeder11.png) ![TwinVine GUI](https://github.com/vinefeeder/TwinVine/blob/main/images/vinefeederB.png) ![TwinVine GUI](https://github.com/vinefeeder/TwinVine/blob/main/images/hellyes.png) - - - - + \ No newline at end of file diff --git a/WINDOWS_INSTALL_CHECKLIST.txt b/WINDOWS_INSTALL_CHECKLIST.txt new file mode 100644 index 0000000..2d56b44 --- /dev/null +++ b/WINDOWS_INSTALL_CHECKLIST.txt @@ -0,0 +1,57 @@ +TwinVine Windows Installation Checklist + +1. Install Git for Windows: + - Download from https://github.com/git-for-windows/git/releases/download/v2.52.0.windows.1/Git-2.52.0-64-bit.exe + - Run the installer. + +2. Restart your computer. + +3. Open PowerShell. + +4. Change directory to your chosen install location. + +5. Clone TwinVine: + ```powershell +git clone https://github.com/vinefeeder/TwinVine.git + ``` + +6. Close PowerShell. + +7. Open PowerShell as Administrator: + - Right-click Windows PowerShell → Run as administrator. + +8. Change directory to TwinVine: + ```powershell +cd TwinVine + ``` + +9. Run the Windows installer script: + ```powershell +powershell -ExecutionPolicy Bypass -File .\Install-media-tools.ps1 + ``` + +10. After installation completes, close PowerShell and restart your computer. + +11. Open PowerShell and verify uv is installed: + ```powershell +uv + ``` + +12. If uv is missing, install it as Administrator: + ```powershell +powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/uv/releases/download/0.9.18/uv-installer.ps1 | iex" + ``` + +13. Close PowerShell and restart your computer. + +14. Open PowerShell, go to TwinVine, and run: + ```powershell +uv lock +uv sync +cp .\packages\envied\src\envied\envied-working-example.yaml .\packages\envied\src\envied\envied.yaml +uv run vinefeeder --help +uv run envied --help +uv run envied dl -? + ``` + +15. You are ready to use TwinVine on Windows. diff --git a/packages/envied/pyproject.toml b/packages/envied/pyproject.toml index c64e262..4539a24 100644 --- a/packages/envied/pyproject.toml +++ b/packages/envied/pyproject.toml @@ -27,7 +27,7 @@ classifiers = [ ] dependencies = [ "appdirs>=1.4.4,<2", - "Brotli>=1.1.0,<2", + "Brotli>=1.2.0,<2", "click>=8.1.8,<9", "construct>=2.8.8,<3", "crccheck>=1.3.0,<2",