mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-01 07:25:55 -08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
343fe977ad | ||
|
|
4caafda123 | ||
|
|
9ef834c94c | ||
|
|
5e9255b3d5 | ||
|
|
fd535ad3e3 | ||
|
|
121e02a7e2 | ||
|
|
2bb62fd0af | ||
|
|
a752a9efdd | ||
|
|
ac490d9a4b |
35
README.md
35
README.md
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Viu runs on any platform with Python 3.10+, including Windows, macOS, Linux, and Android (via Termux, see other installation methods).
|
Viu runs on Windows, macOS, Linux, and Android (via Termux). Pre-built binaries are available for quick installation without Python, or you can install via Python 3.10+ package managers.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
@@ -64,6 +64,39 @@ For the best experience, please install these external tools:
|
|||||||
* [**ffmpeg**](https://www.ffmpeg.org/) - Required for downloading HLS streams and merging subtitles.
|
* [**ffmpeg**](https://www.ffmpeg.org/) - Required for downloading HLS streams and merging subtitles.
|
||||||
* [**webtorrent-cli**](https://github.com/webtorrent/webtorrent-cli) - For streaming torrents directly.
|
* [**webtorrent-cli**](https://github.com/webtorrent/webtorrent-cli) - For streaming torrents directly.
|
||||||
|
|
||||||
|
### Pre-built Binaries (Recommended for Quick Start)
|
||||||
|
|
||||||
|
The easiest way to get started is to download a pre-built, self-contained binary from the [**releases page**](https://github.com/viu-media/viu/releases/latest). These binaries include all dependencies and **do not require Python** to be installed.
|
||||||
|
|
||||||
|
**Available for:**
|
||||||
|
* **Linux** (x86_64): `viu-linux-x86_64`
|
||||||
|
* **Windows** (x86_64): `viu-windows-x86_64.exe`
|
||||||
|
* **macOS** (Intel x86_64): `viu-macos-x86_64`
|
||||||
|
* **macOS** (Apple Silicon ARM64): `viu-macos-arm64`
|
||||||
|
|
||||||
|
**Installation Steps:**
|
||||||
|
1. Download the appropriate binary for your platform from the [**releases page**](https://github.com/viu-media/viu/releases/latest).
|
||||||
|
2. **Linux/macOS:** Make it executable:
|
||||||
|
```bash
|
||||||
|
# Replace with the actual binary name you downloaded
|
||||||
|
chmod +x viu-linux-x86_64
|
||||||
|
```
|
||||||
|
Then move it to a directory in your PATH:
|
||||||
|
```bash
|
||||||
|
# Option 1: System-wide installation (requires sudo)
|
||||||
|
sudo mv viu-linux-x86_64 /usr/local/bin/viu
|
||||||
|
|
||||||
|
# Option 2: User directory installation
|
||||||
|
mkdir -p ~/.local/bin
|
||||||
|
mv viu-linux-x86_64 ~/.local/bin/viu
|
||||||
|
# Make sure ~/.local/bin is in your PATH
|
||||||
|
```
|
||||||
|
**Windows:** Simply rename `viu-windows-x86_64.exe` to `viu.exe` and place it in a directory in your PATH, or run it directly.
|
||||||
|
3. Verify the installation:
|
||||||
|
```bash
|
||||||
|
viu --version
|
||||||
|
```
|
||||||
|
|
||||||
### Recommended Installation (uv)
|
### Recommended Installation (uv)
|
||||||
|
|
||||||
The best way to install Viu is with [**uv**](https://github.com/astral-sh/uv), a lightning-fast Python package manager.
|
The best way to install Viu is with [**uv**](https://github.com/astral-sh/uv), a lightning-fast Python package manager.
|
||||||
|
|||||||
@@ -186,19 +186,19 @@ def shell_safe(text: Optional[str]) -> str:
|
|||||||
"""
|
"""
|
||||||
Escapes a string for safe inclusion in a Python script string literal.
|
Escapes a string for safe inclusion in a Python script string literal.
|
||||||
This is used when generating Python cache scripts with embedded text content.
|
This is used when generating Python cache scripts with embedded text content.
|
||||||
|
|
||||||
For Python triple-quoted strings, we need to:
|
For Python string literals, we need to:
|
||||||
- Escape backslashes first (so existing backslashes don't interfere)
|
- Escape backslashes first (so existing backslashes don't interfere)
|
||||||
- Escape triple quotes (to not break the string literal)
|
- Escape double quotes (to not break double-quoted string literals)
|
||||||
- Remove or replace problematic characters
|
- Escape single quotes (to not break single-quoted string literals)
|
||||||
"""
|
"""
|
||||||
if not text:
|
if not text:
|
||||||
return ""
|
return ""
|
||||||
# Escape backslashes first
|
# Escape backslashes first
|
||||||
result = text.replace("\\", "\\\\")
|
result = text.replace("\\", "\\\\")
|
||||||
# Escape triple quotes (both types) for Python triple-quoted string literals
|
# Escape both quote types for safe inclusion in any string literal
|
||||||
result = result.replace('"""', r'\"\"\"')
|
result = result.replace('"', r"\"")
|
||||||
result = result.replace("'''", r"\'\'\'")
|
result = result.replace("'", r"\'")
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user