- - {{ t('feat1Title') }} -
--
-
- {{ t('feat1Desc1') }} -
- {{ t('feat1Desc2') }} -
- {{ t('feat1Desc3') }} -
- {{ t('feat1Desc4') }} -
diff --git a/.github/PULL_REQUEST_TEMPLATE/plugin_submission.md b/.github/PULL_REQUEST_TEMPLATE/plugin_submission.md new file mode 100644 index 0000000..b16a6d0 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/plugin_submission.md @@ -0,0 +1,26 @@ +# Plugin Submission Template + +## Plugin Information +- **Name**: +- **ID**: (Must be unique, lowercase, no spaces) +- **Version**: +- **Description**: +- **Author**: +- **Language**: + +## Checklist +- [ ] Wtyczka znajduje się w osobnym folderze wewnątrz `data/`. +- [ ] `manifest.json` jest poprawny i zawiera wszystkie wymagane pola (id, name, version, description, author, dependencies). +- [ ] `plugin.weeb` jest obecny i funkcjonalny. +- [ ] `README.md` zawiera szczegółowe instrukcje użytkowania. +- [ ] W folderze `screenshots/` znajduje się co najmniej jedno zdjęcie. +- [ ] W folderze `assets/` znajduje się ikona wtyczki (`icon.png`). +- [ ] Brak złośliwego kodu lub nieautoryzowanego zbierania danych. +- [ ] Wtyczka została przetestowana lokalnie i działa zgodnie z oczekiwaniami. +- [ ] Testy wtyczki przechodzą poprawnie (min. 80% coverage). + +## Screenshots / Demo +(Optional but recommended) + +## Additional Notes +(Any extra information about the plugin) diff --git a/.github/workflows/plugin_validation.yml b/.github/workflows/plugin_validation.yml new file mode 100644 index 0000000..dcb30c7 --- /dev/null +++ b/.github/workflows/plugin_validation.yml @@ -0,0 +1,83 @@ +name: Plugin Validation + +on: + pull_request: + paths: + - 'data/**' + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install jsonschema pyyaml bandit ruff coverage pytest + + - name: Validate Plugin Structure + run: | + for plugin_dir in data/*/; do + if [ -d "$plugin_dir" ]; then + echo "Validating $plugin_dir..." + + # Check manifest.json + if [ ! -f "$plugin_dir/manifest.json" ]; then + echo "Error: manifest.json missing in $plugin_dir" + exit 1 + fi + + # Check required manifest fields + python3 -c "import json, sys; m = json.load(open('$plugin_dir/manifest.json')); req = ['id', 'name', 'version', 'description', 'author', 'dependencies']; missing = [f for f in req if f not in m]; sys.exit(f'Missing {missing}') if missing else sys.exit(0)" || exit 1 + + # Check entry point + ENTRY_POINT=$(python3 -c "import json; print(json.load(open('$plugin_dir/manifest.json')).get('entry_point', 'plugin.weeb'))") + if [ ! -f "$plugin_dir/$ENTRY_POINT" ]; then + echo "Error: Entry point $ENTRY_POINT missing in $plugin_dir" + exit 1 + fi + + # Check README.md + if [ ! -f "$plugin_dir/README.md" ]; then + echo "Error: README.md missing in $plugin_dir" + exit 1 + fi + + # Check screenshots dir + if [ ! -d "$plugin_dir/screenshots" ] || [ -z "$(ls -A $plugin_dir/screenshots)" ]; then + echo "Error: screenshots directory missing or empty in $plugin_dir" + exit 1 + fi + fi + done + + - name: Security Scan (Bandit) + run: | + bandit -r data/ + + - name: Linting (Ruff) + run: | + ruff check data/ + + - name: Run Tests & Check Coverage + run: | + # Bug 0009: Use --append to accumulate coverage data across plugins + for plugin_dir in data/*/; do + if [ -d "$plugin_dir" ] && [ -d "$plugin_dir/tests" ]; then + echo "Running tests for $plugin_dir" + coverage run --append -m pytest $plugin_dir/tests/ + fi + done + # Only fail if total coverage is under 80% (or adjust as needed) + if [ -f .coverage ]; then + coverage report --fail-under=80 + fi + + - name: Validation Successful + run: echo "Plugin validation passed!" diff --git a/README.md b/README.md index a64d5f6..52eb704 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,13 @@ ## Features +### Plugin System +- **Custom .weeb format**: Package and share your own providers +- **Secure Sandbox**: Run plugins safely with restricted permissions +- **Plugin Builder**: Easy-to-use script for packaging plugins +- **Plugin Gallery**: Browse and install community plugins from [Gallery](plugin_gallery/index.html) +- **Automatic Discovery**: Plugins are loaded automatically on startup + ### Multiple Sources - **Turkish**: Animecix, Turkanime, Anizle, Weeb - **English**: HiAnime, AllAnime @@ -278,6 +285,8 @@ All settings can be modified through the interactive Settings menu. - [x] Non-interactive API mode (JSON output) - [x] Torznab server for Sonarr/*arr integration - [x] RESTful API server for web/mobile apps +- [x] Plugin System with Sandbox support +- [x] Plugin Builder & Gallery site ### Planned diff --git a/data/ornek_plugin/README.md b/data/ornek_plugin/README.md new file mode 100644 index 0000000..4c16295 --- /dev/null +++ b/data/ornek_plugin/README.md @@ -0,0 +1,13 @@ +# Örnek Plugin + +Weeb CLI için örnek bir anime sağlayıcısı eklentisi. + +## Özellikler +- Arama simülasyonu +- Sahte bölümler ve video bağlantıları +- Yeni plugin standartlarına uyumlu yapı + +## Geliştirici Bilgileri +- **Yazar**: Geliştirici Adı +- **Versiyon**: 1.0.0 +- **Bağımlılıklar**: Yok diff --git a/data/ornek_plugin/assets/icon.png b/data/ornek_plugin/assets/icon.png new file mode 100644 index 0000000..e69de29 diff --git a/data/ornek_plugin/assets/preview.jpg b/data/ornek_plugin/assets/preview.jpg new file mode 100644 index 0000000..e69de29 diff --git a/data/ornek_plugin/manifest.json b/data/ornek_plugin/manifest.json new file mode 100644 index 0000000..ffcd881 --- /dev/null +++ b/data/ornek_plugin/manifest.json @@ -0,0 +1,16 @@ +{ + "id": "ornek-plugin", + "name": "Örnek Plugin", + "version": "1.0.0", + "description": "Weeb CLI için örnek bir sağlayıcı eklentisi.", + "author": "Geliştirici Adı", + "entry_point": "plugin.weeb", + "min_weeb_version": "1.0.0", + "dependencies": [], + "permissions": ["network"], + "tags": ["anime", "türkçe", "sağlayıcı"], + "icon": "assets/icon.png", + "homepage": "https://github.com/ewgsta/weeb-cli", + "repository_url": "https://github.com/ewgsta/weeb-cli", + "license": "GPL-3.0" +} diff --git a/data/ornek_plugin/plugin.weeb b/data/ornek_plugin/plugin.weeb new file mode 100644 index 0000000..9cb9f8b --- /dev/null +++ b/data/ornek_plugin/plugin.weeb @@ -0,0 +1,24 @@ +def register(): + """Örnek sağlayıcıyı Weeb CLI'ye kaydeder.""" + from weeb_cli.providers.registry import register_provider + from weeb_cli.providers.base import BaseProvider + + @register_provider("ornek_plugin", lang="tr", region="TR") + class OrnekProvider(BaseProvider): + def __init__(self): + super().__init__() + self.name = "ornek_plugin" + + def search(self, query: str): + """Arama işlevi örneği.""" + return [{"title": f"Örnek Sonuç: {query}", "id": "ornek-123"}] + + def get_episodes(self, anime_id: str): + """Bölüm getirme örneği.""" + return [{"id": "bolum-1", "title": "1. Bölüm"}] + + def get_streams(self, ep_id: str): + """Video bağlantısı getirme örneği.""" + return [{"url": "https://ornek.com/video.mp4", "quality": "1080p"}] + + print("[Örnek Plugin] Başarıyla yüklendi ve kaydedildi!") diff --git a/data/ornek_plugin/screenshots/ss1.png b/data/ornek_plugin/screenshots/ss1.png new file mode 100644 index 0000000..e69de29 diff --git a/data/ornek_plugin/screenshots/ss2.png b/data/ornek_plugin/screenshots/ss2.png new file mode 100644 index 0000000..e69de29 diff --git a/docs/development/plugins.de.md b/docs/development/plugins.de.md new file mode 100644 index 0000000..cf18706 --- /dev/null +++ b/docs/development/plugins.de.md @@ -0,0 +1,91 @@ +# Plugin-Entwicklungsleitfaden + +Weeb CLI bietet eine robuste Plugin-Architektur, mit der Sie die Anwendung durch benutzerdefinierte Anbieter, Tracker und Dienste erweitern können. Plugins sind in einer sicheren, portablen Umgebung isoliert und folgen einer standardisierten Verzeichnisstruktur. + +## Plugin-Struktur + +Ein Standard-Plugin-Ordner muss im Verzeichnis `data/` gespeichert sein und die folgende Struktur aufweisen: + +``` +data/ + mein-plugin/ + plugin.weeb (Haupt-Code-Einstiegspunkt) + manifest.json (Metadaten und Konfiguration) + README.md (Detaillierte Dokumentation) + screenshots/ (Mindestens ein Screenshot für die Galerie) + ss1.png + assets/ (Icons und andere Assets) + icon.png +``` + +### manifest.json + +Das Manifest enthält obligatorische und optionale Metadaten über Ihr Plugin: + +```json +{ + "id": "mein-plugin", + "name": "Mein Plugin", + "version": "1.0.0", + "description": "Eine Beschreibung Ihres Plugins.", + "author": "Ihr Name", + "entry_point": "plugin.weeb", + "min_weeb_version": "1.0.0", + "dependencies": [], + "permissions": ["network", "storage"], + "tags": ["anime", "de"], + "icon": "assets/icon.png", + "homepage": "https://example.com", + "repository_url": "https://github.com/user/repo", + "license": "MIT" +} +``` + +### plugin.weeb + +Der Einstiegspunkt ist ein Python-Skript, das eine `register()`-Funktion definieren muss. Es läuft in einer eingeschränkten Sandbox-Umgebung mit Zugriff auf eine sichere Untermenge von Builtins und `weeb_cli`-APIs. + +```python +def register(): + from weeb_cli.providers.registry import register_provider + from weeb_cli.providers.base import BaseProvider + + @register_provider("mein_benutzerdefinierter_anbieter", lang="de", region="DE") + class MyProvider(BaseProvider): + def search(self, query: str): + # Implementierung... + pass +``` + +## Erstellung und Paketierung + +Verwenden Sie das bereitgestellte Builder-Skript, um neue Plugins zu erstellen oder zu paketieren: + +```bash +# Erstellen Sie eine neue Plugin-Vorlage +python3 weeb_cli/utils/plugin_builder.py create mein-neues-plugin --id "neue-id" --name "Neuer Name" + +# Erstellen/Paketieren Sie ein Plugin für die Verteilung (.weeb_pkg) +python3 weeb_cli/utils/plugin_builder.py build data/mein-plugin -o mein-plugin.weeb_pkg +``` + +## Installation + +1. Öffnen Sie Weeb CLI. +2. Gehen Sie zu **Einstellungen** > **Plugins**. +3. Wählen Sie **Plugin laden**. +4. Geben Sie den lokalen Pfad zum Plugin-Ordner oder dessen `.weeb_pkg` an. + +## Testen und Qualität + +Plugins müssen eine **Testabdeckung von mindestens 80 %** aufweisen, um in die offizielle Galerie aufgenommen zu werden. Automatisierte Tests sollten in einem Verzeichnis `tests/` innerhalb des Plugin-Ordners platziert werden. + +Unsere CI/CD-Pipeline validiert: +- **Manifest-Integrität**: Erforderliche Felder (ID, Name, Version usw.) müssen vorhanden sein. +- **Sicherheit**: Überprüfung durch Bandit auf häufige Schwachstellen. +- **Codequalität**: Überprüfung durch Ruff. +- **Funktionalität**: Tests werden ausgeführt und die Abdeckung wird geprüft. + +## Teilen über die Galerie + +Reichen Sie einen Pull Request ein, um Ihren Plugin-Ordner zum Verzeichnis `data/` hinzuzufügen. Sobald er genehmigt wurde, erscheint er automatisch in der [Plugin-Galerie](https://ewgsta.github.io/weeb-cli/plugin_gallery/index.html). diff --git a/docs/development/plugins.md b/docs/development/plugins.md new file mode 100644 index 0000000..ff1567b --- /dev/null +++ b/docs/development/plugins.md @@ -0,0 +1,91 @@ +# Plugin Development Guide + +Weeb CLI provides a robust plugin architecture that allows you to extend the application with custom providers, trackers, and services. Plugins are isolated in a secure, portable environment and follow a standardized directory structure. + +## Plugin Structure + +A standard plugin folder must be stored in the `data/` directory and contain the following structure: + +``` +data/ + my-plugin/ + plugin.weeb (Main code entry point) + manifest.json (Metadata and configuration) + README.md (Detailed documentation) + screenshots/ (At least one screenshot for the gallery) + ss1.png + assets/ (Icons and other assets) + icon.png +``` + +### manifest.json + +The manifest contains mandatory and optional metadata about your plugin: + +```json +{ + "id": "my-plugin", + "name": "My Plugin", + "version": "1.0.0", + "description": "A description of your plugin.", + "author": "Your Name", + "entry_point": "plugin.weeb", + "min_weeb_version": "1.0.0", + "dependencies": [], + "permissions": ["network", "storage"], + "tags": ["anime", "en"], + "icon": "assets/icon.png", + "homepage": "https://example.com", + "repository_url": "https://github.com/user/repo", + "license": "MIT" +} +``` + +### plugin.weeb + +The entry point is a Python script that must define a `register()` function. It runs in a restricted sandbox environment with access to a safe subset of builtins and `weeb_cli` APIs. + +```python +def register(): + from weeb_cli.providers.registry import register_provider + from weeb_cli.providers.base import BaseProvider + + @register_provider("my_custom_provider", lang="en", region="US") + class MyProvider(BaseProvider): + def search(self, query: str): + # Implementation... + pass +``` + +## Building and Packaging + +Use the provided builder script to package or create new plugins: + +```bash +# Create a new plugin template +python3 weeb_cli/utils/plugin_builder.py create my-new-plugin --id "new-id" --name "New Name" + +# Build/Package a plugin for distribution (.weeb_pkg) +python3 weeb_cli/utils/plugin_builder.py build data/my-plugin -o my-plugin.weeb_pkg +``` + +## Installation + +1. Open Weeb CLI. +2. Go to **Settings** > **Plugins**. +3. Select **Load Plugin**. +4. Provide the local path to the plugin folder or its `.weeb_pkg`. + +## Testing and Quality + +Plugins must maintain at least **80% test coverage** to be accepted into the official gallery. Automated tests should be placed in a `tests/` directory within the plugin folder. + +Our CI/CD pipeline validates: +- **Manifest integrity**: Required fields (id, name, version, etc.) must be present. +- **Security**: Scanned via Bandit for common vulnerabilities. +- **Code Quality**: Linted via Ruff. +- **Functionality**: Tests are executed, and coverage is checked. + +## Sharing via Gallery + +Submit a Pull Request adding your plugin folder to the `data/` directory. Once approved, it will automatically appear in the [Plugin Gallery](https://ewgsta.github.io/weeb-cli/plugin_gallery/index.html). diff --git a/docs/development/plugins.pl.md b/docs/development/plugins.pl.md new file mode 100644 index 0000000..d8458f1 --- /dev/null +++ b/docs/development/plugins.pl.md @@ -0,0 +1,91 @@ +# Przewodnik po tworzeniu wtyczek + +Weeb CLI zapewnia solidną architekturę wtyczek, która pozwala na rozszerzenie aplikacji o niestandardowych dostawców, trackery i usługi. Wtyczki są izolowane w bezpiecznym, przenośnym środowisku i postępują zgodnie ze standardową strukturą katalogów. + +## Struktura wtyczki + +Standardowy folder wtyczki musi być przechowywany w katalogu `data/` i zawierać następującą strukturę: + +``` +data/ + moja-wtyczka/ + plugin.weeb (Główny punkt wejścia kodu) + manifest.json (Metadane i konfiguracja) + README.md (Szczegółowa dokumentacja) + screenshots/ (Przynajmniej jeden zrzut ekranu do galerii) + ss1.png + assets/ (Ikony i inne zasoby) + icon.png +``` + +### manifest.json + +Manifest zawiera obowiązkowe i opcjonalne metadane dotyczące Twojej wtyczki: + +```json +{ + "id": "moja-wtyczka", + "name": "Moja Wtyczka", + "version": "1.0.0", + "description": "Opis Twojej wtyczki.", + "author": "Twoje Imię", + "entry_point": "plugin.weeb", + "min_weeb_version": "1.0.0", + "dependencies": [], + "permissions": ["network", "storage"], + "tags": ["anime", "pl"], + "icon": "assets/icon.png", + "homepage": "https://example.com", + "repository_url": "https://github.com/user/repo", + "license": "MIT" +} +``` + +### plugin.weeb + +Punkt wejścia to skrypt w języku Python, który musi definiować funkcję `register()`. Działa on w ograniczonym środowisku piaskownicy z dostępem do bezpiecznego podzbioru wbudowanych funkcji i interfejsów API `weeb_cli`. + +```python +def register(): + from weeb_cli.providers.registry import register_provider + from weeb_cli.providers.base import BaseProvider + + @register_provider("moj_niestandardowy_dostawca", lang="pl", region="PL") + class MojDostawca(BaseProvider): + def search(self, query: str): + # Implementacja... + pass +``` + +## Budowanie i Pakowanie + +Użyj dostarczonego skryptu budującego, aby utworzyć lub spakować nowe wtyczki: + +```bash +# Utwórz nowy szablon wtyczki +python3 weeb_cli/utils/plugin_builder.py create moja-nowa-wtyczka --id "nowe-id" --name "Nowa Nazwa" + +# Zbuduj/Spakuj wtyczkę do dystrybucji (.weeb_pkg) +python3 weeb_cli/utils/plugin_builder.py build data/moja-wtyczka -o moja-wtyczka.weeb_pkg +``` + +## Instalacja + +1. Otwórz Weeb CLI. +2. Przejdź do **Ustawienia** > **Wtyczki**. +3. Wybierz **Załaduj Wtyczkę**. +4. Podaj ścieżkę lokalną do folderu wtyczki lub jej pliku `.weeb_pkg`. + +## Testowanie i Jakość + +Wtyczki muszą utrzymywać co najmniej **80% pokrycia testami**, aby zostały zaakceptowane w oficjalnej galerii. Automatyczne testy powinny być umieszczone w katalogu `tests/` wewnątrz folderu wtyczki. + +Nasz potok CI/CD weryfikuje: +- **Integralność manifestu**: Wymagane pola (id, nazwa, wersja itp.) muszą być obecne. +- **Bezpieczeństwo**: Skanowanie za pomocą Bandit w poszukiwaniu typowych luk. +- **Jakość kodu**: Linting za pomocą Ruff. +- **Funkcjonalność**: Testy są wykonywane i sprawdzane jest pokrycie. + +## Udostępnianie przez Galerię + +Prześlij Pull Request dodający folder Twojej wtyczki do katalogu `data/`. Po zatwierdzeniu automatycznie pojawi się on w [Galerii Wtyczek](https://ewgsta.github.io/weeb-cli/plugin_gallery/index.html). diff --git a/docs/development/plugins.tr.md b/docs/development/plugins.tr.md new file mode 100644 index 0000000..7890110 --- /dev/null +++ b/docs/development/plugins.tr.md @@ -0,0 +1,91 @@ +# Plugin Geliştirme Rehberi + +Weeb CLI, uygulamayı özel sağlayıcılar, takipçiler ve servislerle genişletmenize olanak tanıyan sağlam bir eklenti mimarisi sunar. Eklentiler güvenli, taşınabilir bir ortamda izole edilir ve standartlaştırılmış bir klasör yapısını takip eder. + +## Eklenti Yapısı + +Standart bir eklenti klasörü `data/` dizininde saklanmalı ve şu yapıyı içermelidir: + +``` +data/ + eklentim/ + plugin.weeb (Ana kod giriş noktası) + manifest.json (Metadata ve yapılandırma) + README.md (Detaylı dökümantasyon) + screenshots/ (Galeri için en az bir ekran görüntüsü) + ss1.png + assets/ (İkonlar ve diğer varlıklar) + icon.png +``` + +### manifest.json + +Manifest, eklentiniz hakkında zorunlu ve isteğe bağlı meta verileri içerir: + +```json +{ + "id": "eklentim", + "name": "Eklenti Adı", + "version": "1.0.0", + "description": "Eklentinizin açıklaması.", + "author": "Adınız", + "entry_point": "plugin.weeb", + "min_weeb_version": "1.0.0", + "dependencies": [], + "permissions": ["network", "storage"], + "tags": ["anime", "tr"], + "icon": "assets/icon.png", + "homepage": "https://example.com", + "repository_url": "https://github.com/user/repo", + "license": "MIT" +} +``` + +### plugin.weeb + +Giriş noktası, bir `register()` fonksiyonu tanımlaması gereken bir Python betiğidir. Güvenli bir builtin alt kümesine ve `weeb_cli` API'lerine erişimi olan kısıtlı bir sandbox ortamında çalışır. + +```python +def register(): + from weeb_cli.providers.registry import register_provider + from weeb_cli.providers.base import BaseProvider + + @register_provider("ozel_saglayicim", lang="tr", region="TR") + class MyProvider(BaseProvider): + def search(self, query: str): + # Uygulama... + pass +``` + +## Derleme ve Paketleme + +Yeni eklentiler oluşturmak veya paketlemek için sağlanan builder betiğini kullanın: + +```bash +# Yeni bir eklenti şablonu oluştur +python3 weeb_cli/utils/plugin_builder.py create yeni-eklentim --id "yeni-id" --name "Yeni İsim" + +# Dağıtım için bir eklentiyi paketle (.weeb_pkg) +python3 weeb_cli/utils/plugin_builder.py build data/eklentim -o eklentim.weeb_pkg +``` + +## Kurulum + +1. Weeb CLI'yı açın. +2. **Ayarlar** > **Eklentiler** bölümüne gidin. +3. **Eklenti Yükle** seçeneğini seçin. +4. Eklenti klasörünün yerel yolunu veya `.weeb_pkg` dosyasını belirtin. + +## Test ve Kalite + +Eklentilerin resmi galeriye kabul edilmesi için en az **%80 test kapsamına (coverage)** sahip olması gerekir. Otomatik testler, eklenti klasörü içindeki bir `tests/` dizinine yerleştirilmelidir. + +CI/CD hattımız şunları doğrular: +- **Manifest bütünlüğü**: Zorunlu alanlar (id, isim, versiyon vb.) mevcut olmalıdır. +- **Güvenlik**: Yaygın güvenlik açıkları için Bandit ile taranır. +- **Kod Kalitesi**: Ruff ile kontrol edilir. +- **İşlevsellik**: Testler çalıştırılır ve kapsam kontrol edilir. + +## Galeri Üzerinden Paylaşım + +Eklenti klasörünüzü `data/` dizinine ekleyen bir Pull Request gönderin. Onaylandıktan sonra otomatik olarak [Eklenti Galerisi](https://ewgsta.github.io/weeb-cli/plugin_gallery/index.html) sayfasında görünecektir. diff --git a/docs/index.pl.md b/docs/index.pl.md index 43ab52f..cf0780a 100644 --- a/docs/index.pl.md +++ b/docs/index.pl.md @@ -40,6 +40,9 @@ Weeb CLI to potężna aplikacja terminalowa do streamingu i pobierania anime, kt - Inteligentne dopasowywanie tytułów ### Dodatkowe funkcje +- System wtyczek (Plugin System) z bezpieczną piaskownicą +- Plugin Builder do łatwego pakowania wtyczek +- Strona galerii wtyczek (Plugin Gallery) - Wsparcie wielu języków (TR, EN, DE, PL) - Discord Rich Presence - Powiadomienia systemowe diff --git a/md/de/README.md b/md/de/README.md index d59c163..4d6f2f6 100644 --- a/md/de/README.md +++ b/md/de/README.md @@ -22,15 +22,23 @@
Installation • - Funktionen • + Funktionen • Nutzung • - Quellen + Quellen • + Dokumentation
--- ## Funktionen +### Plugin-System +- **Benutzerdefiniertes .weeb-Format**: Paketieren und Teilen eigener Anbieter +- **Sichere Sandbox**: Plugins sicher mit eingeschränkten Berechtigungen ausführen +- **Plugin Builder**: Einfach zu bedienendes Skript zum Paketieren von Plugins +- **Plugin-Galerie**: Durchsuchen und Installieren von Community-Plugins aus der [Galerie](https://ewgsta.github.io/weeb-cli/plugin_gallery/index.html) +- **Automatische Erkennung**: Plugins werden beim Start automatisch geladen + ### Mehrere Quellen - **Türkisch**: Animecix, Turkanime, Anizle, Weeb - **Englisch**: HiAnime, AllAnime @@ -50,30 +58,30 @@ - Unterbrochene Downloads fortsetzen - Intelligente Dateibenennung (`Anime Name - S1E1.mp4`) -### Nachverfolgung & Synchronisation +### Tracking & Synchronisation - **AniList** Integration mit OAuth - **MyAnimeList** Integration mit OAuth - **Kitsu** Integration mit E-Mail/Passwort -- Automatische Fortschrittssynchronisierung für Online- und Offline-Wiedergabe +- Automatische Fortschrittssynchronisation für Online- und Offline-Wiedergabe - Offline-Warteschlange für ausstehende Updates -- Intelligenter Abgleich von Anime-Titeln anhand von Dateinamen +- Intelligente Anime-Titel-Erkennung aus Dateinamen ### Lokale Bibliothek -- Heruntergeladene Animes automatisch scannen -- Unterstützung externer Laufwerke (USB, HDD) -- Offline-Anime-Indexierung mit automatischer Tracker-Synchronisation +- Automatischer Scan heruntergeladener Animes +- Unterstützung für externe Laufwerke (USB, HDD) +- Offline-Anime-Indizierung mit automatischer Tracker-Synchronisation - Suche über alle Quellen hinweg -- **Empfohlenes Format**: `Anime Name - S1E1.mp4` für beste Tracker-Kompatibilität ### Zusätzliche Funktionen - SQLite-Datenbank (schnell und zuverlässig) - Systembenachrichtigungen bei Abschluss des Downloads -- Discord RPC-Integration (Zeige auf Discord, was du dir gerade anschaust) +- Discord RPC-Integration (zeige auf Discord, was du gerade schaust) - Suchverlauf - Debug-Modus und Protokollierung -- Automatische Update-Prüfungen -- Nicht interaktive JSON-API für Skripte und KI-Agenten +- Automatische Update-Prüfung +- Nicht-interaktive JSON-API für Skripte und KI-Agenten - Torznab-Servermodus für Sonarr/*arr-Integration +- RESTful-API-Server für Web/Mobile-Anwendungen --- @@ -90,14 +98,7 @@ yay -S weeb-cli ``` ### Portable -Lade die entsprechende Datei für deine Plattform unter [Releases](https://github.com/ewgsta/weeb-cli/releases) herunter. - -### Für Entwickler -```bash -git clone https://github.com/ewgsta/weeb-cli.git -cd weeb-cli -pip install -e . -``` +Laden Sie die entsprechende Datei für Ihre Plattform unter [Releases](https://github.com/ewgsta/weeb-cli/releases) herunter. --- @@ -117,109 +118,8 @@ weeb-cli api providers # Nach Animes suchen (gibt IDs zurück) weeb-cli api search "Angel Beats" -# Rückgabe: [{"id": "12345", "title": "Angel Beats!", ...}] - -# Episoden auflisten (ID aus der Suche verwenden) -weeb-cli api episodes 12345 --season 1 - -# Stream-URLs für eine Episode abrufen -weeb-cli api streams 12345 --season 1 --episode 1 - -# Anime-Details abrufen -weeb-cli api details 12345 - -# Eine Episode herunterladen -weeb-cli api download 12345 --season 1 --episode 1 --output ./downloads -``` - -Alle API-Befehle geben JSON über stdout aus. - -### Sonarr/*arr-Integration (Serve-Modus) - -weeb-cli kann als Torznab-kompatibler Server für Sonarr und andere *arr-Anwendungen betrieben werden: - -```bash -pip install weeb-cli[serve] - -weeb-cli serve --port 9876 \ - --watch-dir /downloads/watch \ - --completed-dir /downloads/completed \ - --sonarr-url http://sonarr:8989 \ - --sonarr-api-key DEIN_KEY \ - --providers animecix,anizle,turkanime ``` -Dann `http://weeb-cli-host:9876` als Torznab-Indexer in Sonarr mit der Kategorie 5070 (TV/Anime) hinzufügen. Der Server enthält einen Blackhole-Download-Worker, der heruntergeladene Episoden automatisch verarbeitet. - -### Tastatursteuerung -| Taste | Aktion | -|-------|--------| -| `↑` `↓` | Im Menü navigieren | -| `Enter` | Auswählen | -| `s` | Anime suchen (Hauptmenü) | -| `d` | Downloads (Hauptmenü) | -| `w` | Watchlist (Hauptmenü) | -| `c` | Einstellungen (Hauptmenü) | -| `q` | Beenden (Hauptmenü) | -| `Ctrl+C` | Zurück / Beenden | - -**Hinweis:** Alle Tastenkombinationen können in "Einstellungen > Tastaturkurzbefehle" angepasst werden. - ---- - -## Quellen - -| Quelle | Sprache | -|--------|---------| -| Animecix | Türkisch | -| Turkanime | Türkisch | -| Anizle | Türkisch | -| Weeb | Türkisch | -| HiAnime | Englisch | -| AllAnime | Englisch | -| AniWorld | Deutsch | -| Docchi | Polnisch | - ---- - -## Konfiguration - -Speicherort der Konfiguration: `~/.weeb-cli/weeb.db` (SQLite) - -### Verfügbare Einstellungen - -| Einstellung | Beschreibung | Standard | Typ | -|-------------|--------------|----------|-----| -| `language` | Interface-Sprache (tr/en/de/pl) | `null` (fragt beim ersten Start) | string | -| `scraping_source` | Aktive Anime-Quelle | `animecix` | string | -| `aria2_enabled` | Aria2 für Downloads verwenden | `true` | boolean | -| `aria2_max_connections` | Max. Verbindungen pro Download | `16` | integer | -| `ytdlp_enabled` | yt-dlp für HLS-Streams verwenden | `true` | boolean | -| `ytdlp_format` | yt-dlp Format string | `bestvideo+bestaudio/best` | string | -| `max_concurrent_downloads` | Gleichzeitige Downloads | `3` | integer | -| `download_dir` | Download-Ordnerpfad | `./weeb-downloads` | string | -| `download_max_retries` | Fehlgeschlagene Downloads wiederholen | `3` | integer | -| `download_retry_delay` | Verzögerung zwischen Wiederholungen (Sek.) | `10` | integer | -| `show_description` | Anime-Beschreibungen anzeigen | `true` | boolean | -| `discord_rpc_enabled` | Discord Rich Presence | `false` | boolean | -| `shortcuts_enabled` | Tastaturkurzbefehle | `true` | boolean | -| `debug_mode` | Debug-Protokollierung | `false` | boolean | - -### Tracker-Einstellungen (separat gespeichert) -- `anilist_token` - AniList OAuth-Token -- `anilist_user_id` - AniList-Benutzer-ID -- `mal_token` - MyAnimeList OAuth-Token -- `mal_refresh_token` - MAL Refresh-Token -- `mal_username` - MAL Benutzername - -### Externe Laufwerke -Verwaltet über "Einstellungen > Externe Laufwerke". Jedes Laufwerk speichert: -- Pfad (z.B., `D:\Anime`) -- Benutzerdefinierter Name/Spitzname -- Hinzugefügt-Zeitstempel - -Alle Einstellungen können über das interaktive Einstellungsmenü geändert werden. - --- ## Roadmap @@ -233,31 +133,20 @@ Alle Einstellungen können über das interaktive Einstellungsmenü geändert wer - [x] SQLite-Datenbank - [x] Benachrichtigungssystem - [x] Debug-Modus -- [x] MAL/AniList-Integration -- [x] Datenbanksicherung/-wiederherstellung -- [x] Tastaturkurzbefehle -- [x] Nicht interaktiver API-Modus (JSON-Ausgabe) +- [x] MAL/AniList Integration +- [x] Datenbank-Sicherung/Wiederherstellung +- [x] Tastenkombinationen +- [x] Nicht-interaktiver API-Modus (JSON-Ausgabe) - [x] Torznab-Server für Sonarr/*arr-Integration - -### Geplant -- [ ] Anime-Empfehlungen -- [ ] Stapelverarbeitung -- [ ] Wiedergabestatistiken (Grafiken) -- [ ] Theme-Unterstützung -- [ ] Untertitel-Downloads -- [ ] Torrent-Unterstützung (nyaa.si) -- [ ] Watch Party - ---- - -## Projektstruktur -*Siehe englische oder türkische README für Details zur Projektstruktur.* +- [x] RESTful-API-Server für Web/Mobile-Apps +- [x] Plugin-System mit Sandbox-Unterstützung +- [x] Plugin Builder & Galerie-Seite --- ## Lizenz Dieses Projekt ist unter der **GNU General Public License v3.0** lizenziert. -Die vollständige Lizenzvereinbarung findest du in der Datei [LICENSE](LICENSE). +Die vollständige Lizenzvereinbarung findest du in der Datei [LICENSE](../../LICENSE). Weeb-CLI (C) 2026 diff --git a/md/pl/README.md b/md/pl/README.md index 76a8bd9..d83a9af 100644 --- a/md/pl/README.md +++ b/md/pl/README.md @@ -24,13 +24,21 @@ Instalacja • Funkcje • Użycie • - Źródła + Źródła • + Dokumentacja --- ## Funkcje +### System Wtyczek +- **Niestandardowy format .weeb**: Pakuj i udostępniaj własnych dostawców +- **Bezpieczna Piaskownica**: Uruchamiaj wtyczki bezpiecznie z ograniczonymi uprawnieniami +- **Plugin Builder**: Łatwy w użyciu skrypt do pakowania wtyczek +- **Galeria Wtyczek**: Przeglądaj i instaluj wtyczki społeczności z [Galerii](https://ewgsta.github.io/weeb-cli/plugin_gallery/index.html) +- **Automatyczne Wykrywanie**: Wtyczki są ładowane automatycznie przy starcie + ### Wiele źródeł - **Turecki**: Animecix, Turkanime, Anizle, Weeb - **Angielski**: HiAnime, AllAnime @@ -51,29 +59,29 @@ - Inteligentne nazewnictwo plików (`Anime Name - S1E1.mp4`) ### Śledzenie i synchronizacja -- Integracja z **AniList** za pomocą OAuth -- Integracja z **MyAnimeList** za pomocą OAuth -- Integracja z **Kitsu** (email/hasło) -- Automatyczna synchronizacja postępów oglądania (online i offline) +- Integracja z **AniList** przez OAuth +- Integracja z **MyAnimeList** przez OAuth +- Integracja z **Kitsu** przez e-mail/hasło +- Automatyczna synchronizacja postępów dla oglądania online i offline - Kolejka offline dla oczekujących aktualizacji -- Inteligentne dopasowywanie tytułów anime na podstawie nazw plików +- Inteligentne dopasowywanie tytułów anime z nazw plików ### Biblioteka lokalna - Automatyczne skanowanie pobranych anime - Obsługa dysków zewnętrznych (USB, HDD) -- Indeksowanie anime offline z automatyczną synchronizacją z trackerem -- Szukaj we wszystkich źródłach -- **Zalecany format**: `Anime Name - S1E1.mp4` – zapewnia najlepszą kompatybilność z trackerem +- Indeksowanie anime offline z automatyczną synchronizacją trackerów +- Wyszukiwanie we wszystkich źródłach ### Dodatkowe funkcje - Baza danych SQLite (szybka i niezawodna) -- Powiadomienia systemowe o zakończeniu pobierania -- Integracja z Discord RPC (Pokaż na Discordzie, co teraz oglądasz) +- Powiadomienia systemowe po zakończeniu pobierania +- Integracja Discord RPC (pokaż w co grasz/co oglądasz na Discordzie) - Historia wyszukiwania - Tryb debugowania i logowanie - Automatyczne sprawdzanie aktualizacji -- Nieniektywny tryb API JSON do skryptów i AI -- Tryb serwera Torznab do integracji z Sonarr/*arr +- Nieinteraktywne API JSON dla skryptów i agentów AI +- Tryb serwera Torznab dla integracji z Sonarr/*arr +- Serwer API RESTful dla aplikacji webowych/mobilnych --- @@ -92,13 +100,6 @@ yay -S weeb-cli ### Portable Pobierz odpowiedni plik dla swojej platformy z zakładki [Releases](https://github.com/ewgsta/weeb-cli/releases). -### Dla deweloperów -```bash -git clone https://github.com/ewgsta/weeb-cli.git -cd weeb-cli -pip install -e . -``` - --- ## Użycie @@ -117,147 +118,35 @@ weeb-cli api providers # Wyszukiwanie anime (zwraca ID) weeb-cli api search "Angel Beats" -# Zwraca: [{"id": "12345", "title": "Angel Beats!", ...}] - -# Lista odcinków (użyj ID z wyszukiwarki) -weeb-cli api episodes 12345 --season 1 - -# Pobierz adresy URL streamów dla odcinka -weeb-cli api streams 12345 --season 1 --episode 1 - -# Szczegóły anime -weeb-cli api details 12345 - -# Pobierz odcinek -weeb-cli api download 12345 --season 1 --episode 1 --output ./downloads -``` - -Wszystkie komendy API zwracają JSON na standardowe wyjście (stdout). - -### Integracja z Sonarr/*arr (Tryb Serve) - -weeb-cli może działać jako serwer zgodny z Torznab dla aplikacji Sonarr i podobnych z rodziny *arr: - -```bash -pip install weeb-cli[serve] - -weeb-cli serve --port 9876 \ - --watch-dir /downloads/watch \ - --completed-dir /downloads/completed \ - --sonarr-url http://sonarr:8989 \ - --sonarr-api-key TWÓJ_KLUCZ \ - --providers animecix,anizle,turkanime ``` -Następnie w Sonarr dodaj `http://weeb-cli-host:9876` jako Torznab instancję w kategorii 5070 (TV/Anime). Serwer zawiera komponent `blackhole` pobierający wykryte odcinki automatycznie. - -### Sterowanie klawiaturą -| Klawisz | Akcja | -|---------|-------| -| `↑` `↓` | Nawigacja w menu | -| `Enter` | Wybierz | -| `s` | Wyszukaj Anime (Menu główne) | -| `d` | Pobrane (Menu główne) | -| `w` | Do obejrzenia (Menu główne) | -| `c` | Ustawienia (Menu główne) | -| `q` | Wyjście (Menu główne) | -| `Ctrl+C` | Wróć / Wyjdź | - -**Uwaga:** Wszystkie skróty klawiaturowe można zmienić w sekcji: Ustawienia > Skróty klawiaturowe. - ---- - -## Źródła - -| Źródło | Język | -|--------|-------| -| Animecix | Turecki | -| Turkanime | Turecki | -| Anizle | Turecki | -| Weeb | Turecki | -| HiAnime | Angielski | -| AllAnime | Angielski | -| AniWorld | Niemiecki | -| Docchi | Polski | - --- -## Konfiguracja - -Lokalizacja pliku konfiguracyjnego: `~/.weeb-cli/weeb.db` (SQLite) - -### Dostępne ustawienia - -| Ustawienie | Opis | Domyślne | Typ | -|------------|------|----------|-----| -| `language` | Język interfejsu (tr/en/de/pl) | `null` (pyta przy pierszym uruchomieniu) | string | -| `scraping_source` | Aktywne źródło anime | `animecix` | string | -| `aria2_enabled` | Użyj Aria2 podczas pobierania | `true` | boolean | -| `aria2_max_connections` | Max. połączeń na pobieranie | `16` | integer | -| `ytdlp_enabled` | Użyj yt-dlp dla streamów HLS | `true` | boolean | -| `ytdlp_format` | yt-dlp łańcuch formatujący | `bestvideo+bestaudio/best` | string | -| `max_concurrent_downloads` | Jednoczesne pobierania | `3` | integer | -| `download_dir` | Ścieżka folderu pobierania | `./weeb-downloads` | string | -| `download_max_retries` | Ponowne próby pobierania po błędzie | `3` | integer | -| `download_retry_delay` | Opóźnienie między próbami (sekundy) | `10` | integer | -| `show_description` | Wyświetl zarys fabuły anime | `true` | boolean | -| `discord_rpc_enabled` | Integracja logowania Discord | `false` | boolean | -| `shortcuts_enabled` | Skróty klawiaturowe | `true` | boolean | -| `debug_mode` | Tryb podglądu debugowania | `false` | boolean | - -### Ustawienia Trackerów (zapisywane osobno) -- `anilist_token` - OAuth token do AniList -- `anilist_user_id` - ID użytkownika AniList -- `mal_token` - OAuth token do MyAnimeList -- `mal_refresh_token` - Odświeżający token MAL -- `mal_username` - Nazwa użytkownika MAL - -### Dyski Zewnętrzne -Zarządzane przez menu 'Ustawienia > Dyski Zewnętrzne'. Zapisy dla każdego dysku: -- Ścieżka (np., `D:\Anime`) -- Niestandardowa nazwa/pseudonim -- Godzina dodania - -Wszystkie ustawienia mogą być modyfikowane poprzez interaktywne menu Ustawienia. - ---- - -## Plan rozwoju (Roadmap) +## Roadmap ### Ukończone -- [x] Wsparcie dla wielu źródeł (TR/EN/DE/PL) -- [x] Odtwarzanie MPV -- [x] Historia i śledzenie postępów +- [x] Obsługa wielu źródeł (TR/EN/DE/PL) +- [x] Streaming przez MPV +- [x] Historia oglądania i śledzenie postępów - [x] Integracja pobierania Aria2/yt-dlp -- [x] Lokalne napędy zewnętrzne i biblioteka własna +- [x] Dyski zewnętrzne i biblioteka lokalna - [x] Baza danych SQLite - [x] System powiadomień - [x] Tryb debugowania - [x] Integracja MAL/AniList -- [x] Kopia zapasowa / Przywracanie kopii bazy danych +- [x] Kopia zapasowa/przywracanie bazy danych - [x] Skróty klawiszowe -- [x] Bezobsługowe i nieniektywne JSON API (format wyjściowy) -- [x] Serwer Torznab do integracji Sonarr/*arr - -### Planowane -- [ ] Rekomendacje anime -- [ ] Działania wsadowe -- [ ] Statystyki (wykresy) -- [ ] Obsługa stylów -- [ ] Pobieranie nowych napisów -- [ ] Obsługa torrent (nyaa.si) -- [ ] Wspólne oglądanie - ---- - -## Struktura projektu -*Szczegółowa struktura znajduje się w angielskiej (lub tureckiej) wersji README.* +- [x] Tryb API nieinteraktywnego (wyjście JSON) +- [x] Serwer Torznab dla integracji Sonarr/*arr +- [x] Serwer API RESTful dla aplikacji webowych/mobilnych +- [x] System wtyczek z obsługą piaskownicy +- [x] Plugin Builder i strona galerii --- ## Licencja -Ten projekt jest objęty licencją **Powszechna Licencja Publiczna GNU, wersja 3.0**. -Zajrzyj do pliku [LICENSE](LICENSE) dla wyświetlenia pełnej treści licencji. +Ten projekt jest objęty licencją **GNU General Public License v3.0**. +Pełny tekst licencji znajduje się w pliku [LICENSE](../../LICENSE). Weeb-CLI (C) 2026 diff --git a/md/tr/README.md b/md/tr/README.md index 648e880..50b5664 100644 --- a/md/tr/README.md +++ b/md/tr/README.md @@ -24,13 +24,21 @@ Kurulum • Özellikler • Kullanım • - Kaynaklar + Kaynaklar • + Dokümantasyon --- ## Özellikler +### Eklenti Sistemi +- **Özel .weeb formatı**: Kendi sağlayıcılarınızı paketleyin ve paylaşın +- **Güvenli Sandbox**: Eklentileri kısıtlı izinlerle güvenli bir şekilde çalıştırın +- **Eklenti Oluşturucu**: Eklentileri paketlemek için kullanımı kolay betik +- **Eklenti Galerisi**: Topluluk eklentilerine [Galeri](https://ewgsta.github.io/weeb-cli/plugin_gallery/index.html) üzerinden göz atın ve yükleyin +- **Otomatik Keşif**: Eklentiler başlangıçta otomatik olarak yüklenir + ### Çoklu Kaynak Desteği - **Türkçe**: Animecix, Turkanime, Anizle, Weeb - **İngilizce**: HiAnime, AllAnime @@ -58,24 +66,6 @@ - Bekleyen güncellemeler için çevrimdışı kuyruk - Dosya adlarından akıllı anime başlığı eşleştirme -### Yerel Kütüphane -- İndirilen animeleri otomatik tarama -- Harici disk desteği (USB, HDD) -- Otomatik tracker senkronizasyonu ile çevrimdışı indexleme -- Tüm kaynaklarda arama -- **Önerilen format**: `Anime Adı - S1B1.mp4` (en iyi tracker uyumluluğu için) - -### Ek Özellikler -- SQLite veritabanı (hızlı ve güvenilir) -- İndirme tamamlandığında sistem bildirimi -- Discord RPC entegrasyonu (izlediğiniz anime Discord'da görünsün) -- Arama geçmişi -- Debug modu ve loglama -- Otomatik güncelleme kontrolü -- Scriptler ve yapay zeka ajanları için etkileşimsiz JSON API -- Sonarr/*arr entegrasyonu için Torznab sunucu modu -- Web/mobil uygulamalar için RESTful API sunucusu - --- ## Kurulum @@ -93,13 +83,6 @@ yay -S weeb-cli ### Portable [Releases](https://github.com/ewgsta/weeb-cli/releases) sayfasından platformunuza uygun dosyayı indirin. -### Geliştirici Kurulumu -```bash -git clone https://github.com/ewgsta/weeb-cli.git -cd weeb-cli -pip install -e . -``` - --- ## Kullanım @@ -110,7 +93,7 @@ weeb-cli ### API Modu (Etkileşimsiz) -Scriptler, otomasyon ve yapay zeka ajanları icin weeb-cli, veritabanı veya TUI gerektirmeden headless calisan JSON API komutları sunar: +Scriptler, otomasyon ve yapay zeka ajanları için weeb-cli, veritabanı veya TUI gerektirmeden headless çalışan JSON API komutları sunar: ```bash # Mevcut sağlayıcıları listele @@ -118,302 +101,13 @@ weeb-cli api providers # Anime ara (ID'leri döndürür) weeb-cli api search "Angel Beats" -# Döndürür: [{"id": "12345", "title": "Angel Beats!", ...}] - -# Bölümleri listele (aramadan gelen ID ile) -weeb-cli api episodes 12345 --season 1 - -# Stream URL'lerini al -weeb-cli api streams 12345 --season 1 --episode 1 - -# Anime detaylarını al -weeb-cli api details 12345 - -# Bir bölüm indir -weeb-cli api download 12345 --season 1 --episode 1 --output ./downloads -``` - -Tüm API komutları stdout'a JSON çıktı verir. - -### Sonarr/*arr Entegrasyonu (Serve Modu) - -weeb-cli, Sonarr ve diğer *arr uygulamaları için Torznab uyumlu bir sunucu olarak çalışabilir: - -```bash -pip install weeb-cli[serve] - -weeb-cli serve --port 9876 \ - --watch-dir /downloads/watch \ - --completed-dir /downloads/completed \ - --sonarr-url http://sonarr:8989 \ - --sonarr-api-key ANAHTARINIZ \ - --providers animecix,anizle,turkanime -``` - -Ardından Sonarr'da `http://weeb-cli-host:9876` adresini 5070 (TV/Anime) kategorisiyle Torznab indexer olarak ekleyin. Sunucu, yakalanan bölümleri otomatik olarak işleyen bir blackhole indirme worker'ı içerir. - -### RESTful API Sunucusu - -Web/mobil uygulamalar ve özel entegrasyonlar için weeb-cli bir RESTful API sunucusu sağlar: - -```bash -pip install weeb-cli[serve-restful] - -weeb-cli serve restful --port 8080 --cors -``` - -**API Endpoint'leri:** -- `GET /health` - Sağlık kontrolü -- `GET /api/providers` - Mevcut provider'ları listele -- `GET /api/search?q=naruto&provider=animecix` - Anime ara -- `GET /api/anime/{id}?provider=animecix` - Anime detaylarını al -- `GET /api/anime/{id}/episodes?season=1` - Bölümleri listele -- `GET /api/anime/{id}/episodes/{ep_id}/streams` - Stream URL'lerini al - -Tüm mevcut provider'lar otomatik olarak yüklenir. `provider` sorgu parametresi ile hangi provider'ı kullanacağınızı seçin. - -**Docker Desteği:** -```bash -docker-compose -f docker-compose.restful.yml up -d -``` - -Tüm detaylar için [RESTful API Dokümantasyonu](https://ewgsta.github.io/weeb-cli/cli/restful-api.tr/)'na bakın. - -#### Docker (Torznab) - -Ardından Sonarr'da `http://weeb-cli-host:9876` adresini 5070 (TV/Anime) kategorisiyle Torznab indexer olarak ekleyin. Sunucu, yakalanan bölümleri otomatik olarak işleyen bir blackhole indirme worker'ı içerir. - -#### Docker - -```dockerfile -FROM python:3.13-slim -RUN apt-get update && apt-get install -y --no-install-recommends aria2 ffmpeg && rm -rf /var/lib/apt/lists/* -RUN pip install --no-cache-dir weeb-cli[serve] yt-dlp -EXPOSE 9876 -CMD ["weeb-cli", "serve", "--port", "9876", "--watch-dir", "/downloads/watch", "--completed-dir", "/downloads/completed"] -``` - -### Klavye Kontrolleri -| Tuş | İşlev | -|-----|-------| -| `↑` `↓` | Menüde gezinme | -| `Enter` | Seçim yapma | -| `s` | Anime Ara (Ana menüde) | -| `d` | İndirmeler (Ana menüde) | -| `w` | İzlediklerim (Ana menüde) | -| `c` | Ayarlar (Ana menüde) | -| `q` | Çıkış (Ana menüde) | -| `Ctrl+C` | Geri dön / Çıkış | - -**Not:** Tüm kısayollar Ayarlar > Klavye Kısayolları menüsünden özelleştirilebilir. - ---- - -## Kaynaklar - -| Kaynak | Dil | -|--------|-----| -| Animecix | Türkçe | -| Turkanime | Türkçe | -| Anizle | Türkçe | -| Weeb | Türkçe | -| HiAnime | İngilizce | -| AllAnime | İngilizce | -| AniWorld | Almanca | -| Docchi | Lehçe | - ---- - -## Ayarlar - -Yapılandırma: `~/.weeb-cli/weeb.db` (SQLite) - -### Mevcut Ayarlar - -| Ayar | Açıklama | Varsayılan | Tip | -|------|----------|------------|-----| -| `language` | Arayüz dili (tr/en/de/pl) | `null` (ilk çalıştırmada sorar) | string | -| `scraping_source` | Aktif anime kaynağı | `animecix` | string | -| `aria2_enabled` | İndirmeler için Aria2 kullan | `true` | boolean | -| `aria2_max_connections` | İndirme başına max bağlantı | `16` | integer | -| `ytdlp_enabled` | HLS yayınlar için yt-dlp kullan | `true` | boolean | -| `ytdlp_format` | yt-dlp format string | `bestvideo+bestaudio/best` | string | -| `max_concurrent_downloads` | Eşzamanlı indirme sayısı | `3` | integer | -| `download_dir` | İndirme klasörü yolu | `./weeb-downloads` | string | -| `download_max_retries` | Başarısız indirmeleri yeniden dene | `3` | integer | -| `download_retry_delay` | Denemeler arası bekleme (saniye) | `10` | integer | -| `show_description` | Anime açıklamalarını göster | `true` | boolean | -| `discord_rpc_enabled` | Discord Rich Presence | `false` | boolean | -| `shortcuts_enabled` | Klavye kısayolları | `true` | boolean | -| `debug_mode` | Debug loglama | `false` | boolean | - -### Tracker Ayarları (ayrı saklanır) -- `anilist_token` - AniList OAuth token -- `anilist_user_id` - AniList kullanıcı ID -- `mal_token` - MyAnimeList OAuth token -- `mal_refresh_token` - MAL yenileme token -- `mal_username` - MAL kullanıcı adı - -### Harici Diskler -Ayarlar > Harici Diskler menüsünden yönetilir. Her disk şunları saklar: -- Yol (örn. `D:\Anime`) -- Özel isim/takma ad -- Eklenme zamanı - -Tüm ayarlar interaktif Ayarlar menüsünden değiştirilebilir. - ---- - -## Yol Haritası - -### Tamamlanan -- [x] Çoklu kaynak desteği (TR/EN/DE/PL) -- [x] MPV ile izleme -- [x] İzleme geçmişi ve ilerleme takibi -- [x] Aria2/yt-dlp indirme entegrasyonu -- [x] Harici disk ve yerel kütüphane -- [x] SQLite veritabanı -- [x] Bildirim sistemi -- [x] Debug modu -- [x] MAL/AniList entegrasyonu -- [x] Veritabanı yedekleme/geri yükleme -- [x] Klavye kısayolları -- [x] Etkileşimsiz API modu (JSON çıktı) -- [x] Sonarr/*arr entegrasyonu için Torznab sunucu - -## Gelecek Planlar - -### v2.6.0 (Planlanan) -- [ ] Async/await refactoring -- [ ] Download strategy pattern -- [ ] Token şifreleme -- [ ] Progress bar iyileştirmesi -- [ ] Plugin sistemi - -### v2.7.0 (Planlanan) -- [ ] Anime önerileri -- [ ] Toplu işlemler -- [ ] İzleme istatistikleri (grafik) -- [ ] Tema desteği -- [ ] Altyazı indirme - -### v3.0.0 (Uzun Vadeli) -- [ ] Web UI (opsiyonel) -- [ ] Torrent desteği (nyaa.si) -- [ ] Watch party -- [ ] Mobile app entegrasyonu - ---- - -## Proje Yapısı - -``` -weeb-cli/ -├── weeb_cli/ # Ana uygulama paketi -│ ├── commands/ # CLI komut yöneticileri -│ │ ├── api.py # Etkileşimsiz JSON API komutları -│ │ ├── downloads.py # İndirme yönetimi komutları -│ │ ├── search.py # Anime arama fonksiyonları -│ │ ├── serve.py # *arr entegrasyonu için Torznab sunucu -│ │ ├── settings.py # Ayarlar menüsü ve yapılandırma -│ │ ├── setup.py # İlk kurulum sihirbazı -│ │ └── watchlist.py # İzleme geçmişi ve ilerleme -│ │ -│ ├── providers/ # Anime kaynak entegrasyonları -│ │ ├── extractors/ # Video stream çıkarıcıları -│ │ │ └── megacloud.py # Megacloud çıkarıcı -│ │ ├── allanime.py # AllAnime sağlayıcı (EN) -│ │ ├── animecix.py # Animecix sağlayıcı (TR) -│ │ ├── anizle.py # Anizle sağlayıcı (TR) -│ │ ├── base.py # Temel sağlayıcı arayüzü -│ │ ├── hianime.py # HiAnime sağlayıcı (EN) -│ │ ├── registry.py # Sağlayıcı kayıt sistemi -│ │ └── turkanime.py # Turkanime sağlayıcı (TR) -│ │ -│ ├── services/ # İş mantığı katmanı -│ │ ├── cache.py # Dosya tabanlı önbellekleme -│ │ ├── database.py # SQLite veritabanı yöneticisi -│ │ ├── dependency_manager.py # FFmpeg, MPV otomatik kurulum -│ │ ├── details.py # Anime detay çekici -│ │ ├── discord_rpc.py # Discord Rich Presence -│ │ ├── downloader.py # Kuyruk tabanlı indirme yöneticisi -│ │ ├── error_handler.py # Global hata yönetimi -│ │ ├── headless_downloader.py # Headless indirme (DB/TUI bağımlılığı yok) -│ │ ├── local_library.py # Yerel anime indeksleme -│ │ ├── logger.py # Debug loglama sistemi -│ │ ├── notifier.py # Sistem bildirimleri -│ │ ├── player.py # MPV video oynatıcı entegrasyonu -│ │ ├── progress.py # İzleme ilerleme takibi -│ │ ├── scraper.py # Sağlayıcı facade -│ │ ├── search.py # Arama servisi -│ │ ├── shortcuts.py # Klavye kısayol yöneticisi -│ │ ├── tracker.py # MAL/AniList entegrasyonu -│ │ ├── updater.py # Otomatik güncelleme kontrolü -│ │ ├── watch.py # Yayın servisi -│ │ ├── _base.py # Temel servis sınıfı -│ │ └── _tracker_base.py # Temel tracker arayüzü -│ │ -│ ├── ui/ # Terminal UI bileşenleri -│ │ ├── header.py # Başlık gösterimi -│ │ ├── menu.py # Ana menü -│ │ └── prompt.py # Özel promptlar -│ │ -│ ├── utils/ # Yardımcı fonksiyonlar -│ │ └── sanitizer.py # Dosya adı/yol temizleme -│ │ -│ ├── locales/ # Çoklu dil desteği -│ │ ├── de.json # Almanca çeviriler -│ │ ├── en.json # İngilizce çeviriler -│ │ ├── pl.json # Lehçe çeviriler -│ │ └── tr.json # Türkçe çeviriler -│ │ -│ ├── templates/ # HTML şablonları -│ │ ├── anilist_error.html # AniList OAuth hata sayfası -│ │ ├── anilist_success.html # AniList OAuth başarı sayfası -│ │ ├── mal_error.html # MAL OAuth hata sayfası -│ │ └── mal_success.html # MAL OAuth başarı sayfası -│ │ -│ ├── config.py # Yapılandırma yönetimi -│ ├── exceptions.py # Özel exception hiyerarşisi -│ ├── i18n.py # Çoklu dil sistemi -│ ├── main.py # CLI giriş noktası -│ └── __main__.py # Paket çalıştırma giriş noktası -│ -├── tests/ # Test paketi -│ ├── test_api.py # API komutları ve headless downloader testleri -│ ├── test_cache.py # Önbellek yöneticisi testleri -│ ├── test_exceptions.py # Exception testleri -│ ├── test_sanitizer.py # Sanitizer testleri -│ └── conftest.py # Pytest fixture'ları -│ -├── weeb_landing/ # Landing sayfası varlıkları -│ ├── logo/ # Logo dosyaları (çeşitli boyutlar) -│ └── index.html # Landing sayfası -│ -├── distribution/ # Build ve dağıtım dosyaları -├── pyproject.toml # Proje metadata ve bağımlılıklar -├── requirements.txt # Python bağımlılıkları -├── pytest.ini # Pytest yapılandırması -├── LICENSE # CC BY-NC-ND 4.0 lisansı -└── README.md # Bu dosya ``` --- -[](https://www.star-history.com/?repos=ewgsta%2Fweeb-cli&type=date&legend=top-left) - ---- - ## Lisans Bu proje **GNU Genel Kamu Lisansı v3.0** altında lisanslanmıştır. -Lisansın tam metni için [LICENSE](LICENSE) dosyasına bakın. +Lisansın tam metni için [LICENSE](../../LICENSE) dosyasına bakın. Weeb-CLI (C) 2026 - ---- - -- Website • - Sorun Bildir -
diff --git a/plugin_gallery/css/style.css b/plugin_gallery/css/style.css new file mode 100644 index 0000000..2a165b5 --- /dev/null +++ b/plugin_gallery/css/style.css @@ -0,0 +1,474 @@ +:root { + --bg-color: #0f111a; + --text-color: #ffffff; + --primary-color: #00bcd4; + --card-bg: #1a1c2c; + --header-bg: #161821; + --accent-color: #ff4081; + --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + --border-color: rgba(255, 255, 255, 0.1); + --hover-bg: rgba(255, 255, 255, 0.05); +} + +[data-theme="light"] { + --bg-color: #f5f5f5; + --text-color: #333333; + --primary-color: #00796b; + --card-bg: #ffffff; + --header-bg: #e0e0e0; + --border-color: rgba(0, 0, 0, 0.1); + --hover-bg: rgba(0, 0, 0, 0.05); +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: var(--font-family); + background-color: var(--bg-color); + color: var(--text-color); + transition: background-color 0.3s, color 0.3s; + line-height: 1.6; +} + +.container { + max-width: 1200px; + margin: 0 auto; + padding: 0 20px; +} + +/* Header & Nav */ +.navbar { + background-color: var(--header-bg); + padding: 1rem 0; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); + position: sticky; + top: 0; + z-index: 100; +} + +.nav-content { + display: flex; + justify-content: space-between; + align-items: center; + gap: 20px; +} + +.logo { + font-size: 1.5rem; + font-weight: bold; + color: var(--primary-color); + display: flex; + align-items: center; + gap: 10px; +} + +.search-bar { + flex-grow: 1; + max-width: 500px; + position: relative; +} + +.search-bar input { + width: 100%; + padding: 10px 15px 10px 40px; + border-radius: 20px; + border: 1px solid var(--border-color); + background-color: var(--bg-color); + color: var(--text-color); + font-size: 1rem; + transition: all 0.3s; +} + +.search-bar input:focus { + outline: none; + border-color: var(--primary-color); + box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2); +} + +.search-bar i { + position: absolute; + left: 15px; + top: 50%; + transform: translateY(-50%); + color: var(--text-color); + opacity: 0.5; +} + +.icon-btn { + background: none; + border: none; + color: var(--text-color); + font-size: 1.2rem; + cursor: pointer; + padding: 8px; + border-radius: 50%; + transition: background-color 0.3s; +} + +.icon-btn:hover { + background-color: var(--hover-bg); +} + +/* Hero Section */ +.hero { + text-align: center; + padding: 4rem 0 2rem; +} + +.hero h1 { + font-size: 3rem; + margin-bottom: 1rem; + background: linear-gradient(45deg, var(--primary-color), var(--accent-color)); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} + +.hero p { + font-size: 1.2rem; + opacity: 0.8; + max-width: 600px; + margin: 0 auto; +} + +/* Filters & Sort */ +.filters { + display: flex; + justify-content: space-between; + align-items: center; + margin: 2rem 0; + flex-wrap: wrap; + gap: 1rem; +} + +.filter-group { + display: flex; + gap: 10px; +} + +.filter-btn { + background: transparent; + border: 1px solid var(--border-color); + color: var(--text-color); + padding: 8px 16px; + border-radius: 20px; + cursor: pointer; + transition: all 0.3s; + font-size: 0.9rem; +} + +.filter-btn:hover { + background: var(--hover-bg); +} + +.filter-btn.active { + background: var(--primary-color); + color: white; + border-color: var(--primary-color); +} + +#sort-select { + background: var(--card-bg); + color: var(--text-color); + border: 1px solid var(--border-color); + padding: 8px 16px; + border-radius: 8px; + font-size: 0.9rem; + cursor: pointer; +} + +/* Grid & Cards */ +.grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + gap: 2rem; + padding-bottom: 4rem; +} + +.card { + background: var(--card-bg); + border-radius: 12px; + overflow: hidden; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + transition: transform 0.3s, box-shadow 0.3s; + display: flex; + flex-direction: column; + border: 1px solid var(--border-color); +} + +.card:hover { + transform: translateY(-5px); + box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); +} + +.card-img { + width: 100%; + height: 160px; + object-fit: cover; + border-bottom: 1px solid var(--border-color); +} + +.card-content { + padding: 1.5rem; + flex-grow: 1; +} + +.card-header { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin-bottom: 0.5rem; +} + +.card-title { + font-size: 1.25rem; + color: var(--primary-color); + margin: 0; +} + +.version { + background: var(--hover-bg); + padding: 2px 8px; + border-radius: 12px; + font-size: 0.8rem; + color: var(--text-color); + opacity: 0.8; +} + +.author { + font-size: 0.9rem; + opacity: 0.6; + margin-bottom: 1rem; +} + +.desc { + font-size: 0.95rem; + margin-bottom: 1.5rem; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.tags { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-bottom: 1rem; +} + +.tag { + background: var(--hover-bg); + padding: 2px 8px; + border-radius: 4px; + font-size: 0.8rem; + color: var(--accent-color); +} + +.stats { + display: flex; + gap: 15px; + font-size: 0.9rem; + opacity: 0.8; + margin-bottom: 1rem; +} + +.stats i { + margin-right: 5px; +} + +.card-actions { + padding: 1rem 1.5rem; + border-top: 1px solid var(--border-color); + display: flex; + gap: 10px; +} + +/* Buttons */ +.btn { + flex: 1; + padding: 8px 16px; + border-radius: 8px; + font-size: 0.9rem; + font-weight: 600; + cursor: pointer; + transition: all 0.3s; + text-align: center; + border: none; + display: inline-flex; + align-items: center; + justify-content: center; + gap: 8px; +} + +.btn-primary { + background-color: var(--primary-color); + color: white; +} + +.btn-primary:hover { + background-color: #00acc1; +} + +.btn-outline { + background-color: transparent; + border: 1px solid var(--primary-color); + color: var(--primary-color); +} + +.btn-outline:hover { + background-color: rgba(0, 188, 212, 0.1); +} + +/* Loader */ +.loader-container { + grid-column: 1 / -1; + display: flex; + justify-content: center; + padding: 3rem 0; +} + +.loader { + width: 48px; + height: 48px; + border: 4px solid var(--border-color); + border-bottom-color: var(--primary-color); + border-radius: 50%; + animation: rotation 1s linear infinite; +} + +@keyframes rotation { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +/* Modal */ +.modal { + display: none; + position: fixed; + z-index: 1000; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.8); + backdrop-filter: blur(5px); +} + +.modal-content { + background-color: var(--card-bg); + margin: 5% auto; + padding: 2rem; + border-radius: 12px; + width: 90%; + max-width: 800px; + max-height: 90vh; + overflow-y: auto; + position: relative; + border: 1px solid var(--border-color); +} + +.close-modal { + position: absolute; + top: 15px; + right: 20px; + background: none; + border: none; + color: var(--text-color); + font-size: 1.5rem; + cursor: pointer; + opacity: 0.7; + transition: opacity 0.3s; +} + +.close-modal:hover { + opacity: 1; +} + +.modal-header { + display: flex; + gap: 20px; + align-items: flex-start; +} + +.modal-header img { + width: 120px; + height: 120px; + border-radius: 12px; + object-fit: cover; +} + +.markdown-body { + margin-top: 2rem; + padding-top: 2rem; + border-top: 1px solid var(--border-color); +} + +/* Toast */ +.toast { + visibility: hidden; + min-width: 250px; + background-color: var(--primary-color); + color: white; + text-align: center; + border-radius: 8px; + padding: 16px; + position: fixed; + z-index: 1001; + left: 50%; + bottom: 30px; + transform: translateX(-50%); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); +} + +.toast.show { + visibility: visible; + animation: fadein 0.5s, fadeout 0.5s 2.5s; +} + +.toast.error { + background-color: #f44336; +} + +@keyframes fadein { + from { bottom: 0; opacity: 0; } + to { bottom: 30px; opacity: 1; } +} + +@keyframes fadeout { + from { bottom: 30px; opacity: 1; } + to { bottom: 0; opacity: 0; } +} + +.no-results { + grid-column: 1 / -1; + text-align: center; + padding: 3rem; + font-size: 1.2rem; + opacity: 0.7; +} + +/* Responsive */ +@media (max-width: 768px) { + .nav-content { + flex-direction: column; + } + .search-bar { + max-width: 100%; + width: 100%; + } + .filters { + flex-direction: column; + align-items: stretch; + } + .filter-group { + overflow-x: auto; + padding-bottom: 10px; + } + .modal-header { + flex-direction: column; + } +} diff --git a/plugin_gallery/index.html b/plugin_gallery/index.html new file mode 100644 index 0000000..c0cbf79 --- /dev/null +++ b/plugin_gallery/index.html @@ -0,0 +1,67 @@ + + + + + +Niestandardowi dostawcy i narzędzia dla Weeb CLI z bezpieczną piaskownicą.
+${escapeHTML(p.description)}
+ + + +- {{ t('tagline') }} -
- -pip install weeb-cli
-
- pip install weeb-cli
- yay -S weeb-cli
- git clone https://github.com/ewgsta/weeb-cli.git
-cd weeb-cli
-pip install -e .
- | {{ t('key') }} | -{{ t('action') }} | -
|---|---|
| ↑ ↓ | -{{ t('ctrlNav') }} | -
| Enter | -{{ t('ctrlSelect') }} | -
| s | -{{ t('ctrlSearch') }} | -
| d | -{{ t('ctrlDown') }} | -
| w | -{{ t('ctrlWatch') }} | -
| c | -{{ t('ctrlSet') }} | -
| q | -{{ t('ctrlExit') }} | -
| Ctrl+C | -{{ t('ctrlBack') }} | -
{{ t('apiModeDesc') }}
-weeb-cli api providers
-weeb-cli api search "Angel Beats"
-weeb-cli api episodes 12345 --season 1
-weeb-cli api streams 12345 --season 1 --episode 1
-weeb-cli api details 12345
-weeb-cli api download 12345 --season 1 --episode 1 --output ./downloads
- {{ t('sonarrDesc') }}
-pip install weeb-cli[serve]
-
-weeb-cli serve --port 9876 \
- --watch-dir /downloads/watch \
- --completed-dir /downloads/completed \
- --sonarr-url http://sonarr:8989 \
- --sonarr-api-key YOUR_KEY \
- --providers animecix,anizle,turkanime
- Python 3.8+, Typer, Rich, - Questionary, SQLite.
-requests, curl_cffi, BeautifulSoup4, - lxml.
-FFmpeg, MPV, Aria2, yt-dlp.
-