weeb-cli 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
weeb_cli/ui/prompt.py ADDED
@@ -0,0 +1,120 @@
1
+ import sys
2
+ import typer
3
+ from rich.console import Console
4
+ from rich.live import Live
5
+ from rich.table import Table
6
+ from rich.text import Text
7
+ from typing import List, Any, Union, Tuple
8
+
9
+ console = Console()
10
+
11
+ class Prompt:
12
+ def __init__(self):
13
+ self.console = Console()
14
+
15
+ def _get_input(self):
16
+ try:
17
+ return typer.getchar()
18
+ except Exception:
19
+ return sys.stdin.read(1)
20
+
21
+ def select(self, title: str, options: List[Union[str, Tuple[str, Any]]], pointer: str = ">", page_size: int = 10) -> Any:
22
+ processed_options = []
23
+ for opt in options:
24
+ if isinstance(opt, tuple):
25
+ processed_options.append(opt)
26
+ else:
27
+ processed_options.append((opt, opt))
28
+
29
+ current_idx = 0
30
+ total_options = len(processed_options)
31
+ window_start = 0
32
+
33
+ def generate_table():
34
+ table = Table.grid(padding=(0, 1))
35
+ table.add_column("Pointer", width=2)
36
+ table.add_column("Option")
37
+
38
+ nonlocal window_start
39
+ if current_idx >= window_start + page_size:
40
+ window_start = current_idx - page_size + 1
41
+ elif current_idx < window_start:
42
+ window_start = current_idx
43
+
44
+ display_options = processed_options[window_start : window_start + page_size]
45
+
46
+ if title:
47
+ self.console.print(f"[bold cyan]? {title}[/bold cyan]")
48
+
49
+ for i, (label, _) in enumerate(display_options):
50
+ abs_idx = window_start + i
51
+ if abs_idx == current_idx:
52
+ table.add_row(f"[cyan]{pointer}[/cyan]", f"[cyan]{label}[/cyan]")
53
+ else:
54
+ table.add_row(" ", label)
55
+
56
+ if total_options > page_size:
57
+ table.add_row(" ", f"[dim]({window_start+1}-{min(window_start+page_size, total_options)} of {total_options})[/dim]")
58
+
59
+ return table
60
+
61
+
62
+ self.console.print(f"[bold cyan]? {title}[/bold cyan]")
63
+
64
+ with Live("", refresh_per_second=20, auto_refresh=False, transient=True) as live:
65
+ while True:
66
+ table = Table.grid(padding=(0, 1))
67
+ table.add_column("Pointer", width=2)
68
+ table.add_column("Option")
69
+
70
+ if current_idx >= window_start + page_size:
71
+ window_start = current_idx - page_size + 1
72
+ elif current_idx < window_start:
73
+ window_start = current_idx
74
+
75
+ limit = min(window_start + page_size, total_options)
76
+
77
+ for idx in range(window_start, limit):
78
+ label = processed_options[idx][0]
79
+ if idx == current_idx:
80
+ table.add_row(f"[cyan]{pointer}[/cyan]", f"[cyan]{label}[/cyan]")
81
+ else:
82
+ table.add_row(" ", label)
83
+
84
+ if total_options > page_size:
85
+ progress = f"({window_start+1}-{limit}/{total_options})"
86
+ table.add_row(" ", f"[dim]{progress}[/dim]")
87
+
88
+ live.update(table)
89
+ live.refresh()
90
+
91
+ key = self._get_input()
92
+
93
+ if key in ["w", "W", "k", "K"] or key == '\x1b[A' or key == '\xe0H': # \xe0H is windows arrow up sometimes
94
+ current_idx = (current_idx - 1) % total_options
95
+ elif key in ["s", "S", "j", "J"] or key == '\x1b[B' or key == '\xe0P':
96
+ current_idx = (current_idx + 1) % total_options
97
+ elif key == '\r' or key == '\n':
98
+ return processed_options[current_idx][1]
99
+ elif key == '\x03':
100
+ sys.exit(0)
101
+ elif key == '\xe0':
102
+ try:
103
+ next_key = typer.getchar()
104
+ if next_key == 'H':
105
+ current_idx = (current_idx - 1) % total_options
106
+ elif next_key == 'P':
107
+ current_idx = (current_idx + 1) % total_options
108
+ except: pass
109
+ elif key == '\x1b':
110
+ try:
111
+ k2 = typer.getchar()
112
+ if k2 == '[':
113
+ k3 = typer.getchar()
114
+ if k3 == 'A':
115
+ current_idx = (current_idx - 1) % total_options
116
+ elif k3 == 'B':
117
+ current_idx = (current_idx + 1) % total_options
118
+ except: pass
119
+
120
+ prompt = Prompt()
@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.4
2
+ Name: weeb-cli
3
+ Version: 1.0.0
4
+ Summary: Tarayıcı yok, reklam yok, dikkat dağıtıcı unsur yok. Sadece siz ve eşsiz bir anime izleme deneyimi.
5
+ Author-email: ewgsta <ewgst@proton.me>
6
+ License-Expression: CC-BY-NC-ND-4.0
7
+ Project-URL: Homepage, https://weeb-cli.ewgsta.me
8
+ Project-URL: Repository, https://github.com/ewgsta/weeb-cli
9
+ Project-URL: Issues, https://github.com/ewgsta/weeb-cli/issues
10
+ Keywords: anime,weeb,anime-download,anizm,anime-watch,anime-watching,anime-downloading,anime-cli,allanime,animecix,anime-indir,anime-izle,weeb-cli,anime-izleme,anime-indirme,weebanime,tranime
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Environment :: Console
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: typer[all]
18
+ Requires-Dist: rich
19
+ Requires-Dist: questionary
20
+ Requires-Dist: requests
21
+ Requires-Dist: packaging
22
+ Requires-Dist: pycryptodome
23
+ Requires-Dist: curl_cffi
24
+ Requires-Dist: appdirs
25
+ Dynamic: license-file
26
+
27
+ <div align="center">
28
+ <img src="https://raw.githubusercontent.com/ewgsta/weeb-cli/refs/heads/main/weeb_landing/logo/256x256.webp" alt="Weeb CLI Logo" width="200" height="200" />
29
+ <h1>Weeb CLI</h1>
30
+ <p>
31
+ <b>Tarayıcı yok, reklam yok, dikkat dağıtıcı unsur yok. Sadece siz ve eşsiz bir anime izleme deneyimi.</b>
32
+ </p>
33
+
34
+ <p>
35
+ <a href="./README-EN.md">Read in English</a>
36
+ </p>
37
+
38
+ <p>
39
+ <a href="https://pypi.org/project/weeb-cli/">
40
+ <img src="https://img.shields.io/pypi/v/weeb-cli?style=flat-square&color=blue" alt="PyPI Sürümü" />
41
+ </a>
42
+ <a href="https://aur.archlinux.org/packages/weeb-cli">
43
+ <img src="https://img.shields.io/aur/version/weeb-cli?style=flat-square&color=magenta" alt="AUR Sürümü" />
44
+ </a>
45
+ <img src="https://img.shields.io/github/license/ewgsta/weeb-cli?style=flat-square" alt="Lisans" />
46
+ <img src="https://img.shields.io/badge/platform-win%20%7C%20linux%20%7C%20macos-lightgrey?style=flat-square" alt="Platform" />
47
+ </p>
48
+ </div>
49
+
50
+ Weeb CLI, anime severler için tasarlanmış güçlü, platformlar arası bir komut satırı aracıdır. Favori anime serilerinizi doğrudan terminalinizden arayın, izleyin ve indirin.
51
+
52
+ ---
53
+
54
+ ## Özellikler
55
+
56
+ - **Gelişmiş Arama**: Hızlı ve detaylı meta verilerle anime arama.
57
+ - **Kesintisiz İzleme**: **MPV** entegrasyonu ile HLS/MP4 yayınlarını yüksek kalitede anında izleyin.
58
+ - **Akıllı İndirici**:
59
+ - **Aria2** entegrasyonu ile çoklu bağlantılı yüksek hızlı indirmeler.
60
+ - Karmaşık yayınlar için **yt-dlp** desteği.
61
+ - Eşzamanlı indirme yönetimi ve kuyruk sistemi.
62
+ - Akıllı dosya isimlendirme (Örn: `Anime Adı - S1B1.mp4`).
63
+ - **İzleme Geçmişi**: İlerlemenizi otomatik takip eder. Kaldığınız yeri (`●`) ve tamamlanan bölümleri (`✓`) işaretler.
64
+ - **Çoklu Dil**: Tam Türkçe ve İngilizce arayüz desteği.
65
+ - **Çoklu Kaynak**: HiAnime, AllAnime (İngilizce), Animecix, Anizle, Turkanime, Weeb (Yerel Kaynak) (Türkçe)
66
+ - **Otomatik Kurulum**: Gerekli araçları (MPV, FFmpeg, Aria2, yt-dlp) eksikse otomatik tespit eder ve kurar.
67
+
68
+ ## Kurulum
69
+
70
+ ### PyPI (Evrensel)
71
+ ```bash
72
+ pip install weeb-cli
73
+ ```
74
+
75
+ ### AUR (Arch Linux)
76
+ ```bash
77
+ yay -S weeb-cli
78
+ ```
79
+
80
+ ### Homebrew (macOS/Linux)
81
+ ```bash
82
+ brew tap ewgsta/tap
83
+ brew install weeb-cli
84
+ ```
85
+
86
+ ### Scoop (Windows)
87
+ ```bash
88
+ scoop bucket add weeb-cli https://github.com/ewgsta/scoop-bucket
89
+ scoop install weeb-cli
90
+ ```
91
+
92
+ ### Chocolatey (Windows)
93
+ ```bash
94
+ choco install weeb-cli
95
+ ```
96
+
97
+
98
+ ---
99
+
100
+ ## Kullanım
101
+
102
+ Aracı terminalden başlatmak için:
103
+
104
+ ```bash
105
+ weeb-cli
106
+ ```
107
+
108
+ ### Kontroller
109
+ - **Ok Tuşları**: Menülerde gezinme.
110
+ - **Enter**: Seçim yapma.
111
+ - **Ctrl+C**: Geri gel / Çıkış.
112
+
113
+ ---
114
+
115
+ ## Yol Haritası (To-Do)
116
+
117
+ - [x] Temel Arama ve Detaylar
118
+ - [x] MPV ile İzleme
119
+ - [x] Yerel İzleme Geçmişi ve İlerleme Takibi
120
+ - [x] İndirme Yöneticisi (Aria2/yt-dlp Entegrasyonu)
121
+ - [x] İnteraktif Ayarlar Menüsü
122
+ - [ ] **Anilist / MAL Entegrasyonu** (Listeleri senkronize etme)
123
+ - [ ] **Torrent Desteği** (Webtorrent ile izleme ve indirme)
124
+ - [ ] **Özel Temalar** (Renk düzenini değiştirme)
125
+ - [ ] **Bildirim Sistemi** (Yeni bölüm uyarıları)
126
+ - [ ] **Toplu İndirme** (Tek tıkla tüm sezonu indirme)
127
+ - [ ] **Discord RPC** (Ne izlediğini gösterme)
128
+
129
+ ---
130
+
131
+ ## Ayarlar
132
+
133
+ Yapılandırma dosyası `~/.weeb-cli/config.json` konumunda saklanır. Uygulama içindeki **Ayarlar** menüsünden de yönetilebilir.
134
+
135
+ | Ayar | Açıklama | Varsayılan |
136
+ |------|----------|------------|
137
+ | `aria2_enabled` | Hızlı indirme için Aria2 kullanımı | `true` |
138
+ | `max_concurrent_downloads` | Eşzamanlı indirme sayısı | `3` |
139
+ | `download_dir` | İndirme klasörü | `./weeb-downloads` |
140
+
141
+ ---
142
+
143
+ ## Lisans
144
+
145
+ Bu proje Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Lisansı (CC BY-NC-ND 4.0) ile lisanslanmıştır.
146
+ Detaylar için [LICENSE](LICENSE) dosyasına bakınız.
147
+
148
+ ---
@@ -0,0 +1,38 @@
1
+ weeb_cli/__init__.py,sha256=Aj77VL1d5Mdku7sgCgKQmPuYavPpAHuZuJcy6bygQZE,21
2
+ weeb_cli/__main__.py,sha256=RCZmmoCNOWC7rAfIDm_LaymsybXIzE6McYbUEEkf9P8,60
3
+ weeb_cli/config.py,sha256=1qm2UfGaF2-3QQUKsRf-xq_6frtO-V76vTSqYUwsQwk,1392
4
+ weeb_cli/i18n.py,sha256=dGFEle12XkhuHJEAndJfzswRRr-77ne_HyDpQ_kQqLg,1730
5
+ weeb_cli/main.py,sha256=ifj3AOsq0Dx_n037J3rc8IibDdZJu8fdN-Gr7iuYK2U,2426
6
+ weeb_cli/commands/downloads.py,sha256=qIpOCcYN3FVrYxSBfpwUa9qld4yFPLzNEAiKHyKaUTs,4638
7
+ weeb_cli/commands/search.py,sha256=4RquyvBGsPTV3Z6cyoMTpH3a0aLlAz5OrkpUKV1UJSM,15047
8
+ weeb_cli/commands/settings.py,sha256=FZ4MNbK9eurtAPuQIMXyAdhTdNObVrFMGY0e0g3ilz4,9020
9
+ weeb_cli/commands/setup.py,sha256=Lx6Iv4FEutk07TiYGKRdEqkFQ7pZpzqKkqAk4WraiG8,1016
10
+ weeb_cli/commands/watchlist.py,sha256=Me0469MFUe_xX4lVHbQjJ4cXaPnC4Ag1SjCNvPnQT4I,4358
11
+ weeb_cli/locales/en.json,sha256=ETPxo3T_hxbPfOjK7qhq5sCTEbPCfDPxmFujnE4lHbI,6617
12
+ weeb_cli/locales/tr.json,sha256=0YR4d0WrN7CFZoju6S9xVlNwQFVZLw-MQGM6X9W6CQI,7038
13
+ weeb_cli/providers/__init__.py,sha256=Ou6GGkQy6CkdzHtOlBeidxLWUnpwItMFgEbXYJ-y8Bk,487
14
+ weeb_cli/providers/animecix.py,sha256=N5Je2mqmilTFkxp4nAjBJLHBoMof_SEDcejGXotPyk4,8536
15
+ weeb_cli/providers/anizle.py,sha256=mE0lpFkO98xs30xMcE0dTUBJHbjctiWdjjBe2iOFqOo,14664
16
+ weeb_cli/providers/base.py,sha256=3SxHJS_CDo_sABANAXixszXTcAnGJ5sceDQ5PCbHLLQ,2471
17
+ weeb_cli/providers/registry.py,sha256=xRfYWOgOE6vtdWVA8uSqAFyy6T-Zw8dJIkJbUB1yO9k,1142
18
+ weeb_cli/providers/turkanime.py,sha256=9Kr4fzF8jZ-KurVKE72NOfPs4T-ZvLFOpzbAJDAnoaM,15177
19
+ weeb_cli/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
+ weeb_cli/services/dependency_manager.py,sha256=oIKpIpStmcw5N_AUDgGBUHEedRyOHSo3xTnC61nThuE,13021
21
+ weeb_cli/services/details.py,sha256=o3baTCZRp_cRr6kIDEcHFBL0dvE8VkVSa1tKcyYDPw4,928
22
+ weeb_cli/services/downloader.py,sha256=9Zn_kSuJ5lnC45sMGU65LnLPOLS5SbqgkNPOtXbpEKM,11265
23
+ weeb_cli/services/player.py,sha256=jtMpY2zlMcQNnTH8A33uPbtt1HNqq5l1cFjtbtN3JMk,1481
24
+ weeb_cli/services/progress.py,sha256=--CMERTzlDcS5cB5upEC7n6K4d3jsHa226cadPsilsc,4665
25
+ weeb_cli/services/scraper.py,sha256=AuKqraCgTZ7Tibj2BXws2co34lGR4ML1nCHLpTf5km8,2909
26
+ weeb_cli/services/search.py,sha256=UritwFArdjZJYvv6yzThmCa1A1Eo8OwvgWl7TyDqLE8,360
27
+ weeb_cli/services/updater.py,sha256=-HWQHsG23rlBM6fi2WruDy_AJtdcBtZp9QLAJw0QCNs,6612
28
+ weeb_cli/services/watch.py,sha256=opZWQ2D3PmkMG8TZtXb17tLVc13Y7lY3t-riIYJHIrc,455
29
+ weeb_cli/ui/__init__.py,sha256=yVsYLjOcffe8b6I1YVDriuQJB6AhDTo2vK_WX0qOPcM,18
30
+ weeb_cli/ui/header.py,sha256=dMjo5E8Ama4fLxgJPmWPD_wi7YhuMu7vv4nlosFLDaU,797
31
+ weeb_cli/ui/menu.py,sha256=OOmL7aMUh0B2pQ1bnED-z6svVYz3sZzvUsBRw5FgNkA,1829
32
+ weeb_cli/ui/prompt.py,sha256=VsY3kl9aByQDDKWOY9pMee_n1cZqLNij6XwBctzwUQs,4824
33
+ weeb_cli-1.0.0.dist-info/licenses/LICENSE,sha256=Tpuv7ovBvaJKV8jfL9GDRKQhxeFJJXtwMAOgQwfep6E,18902
34
+ weeb_cli-1.0.0.dist-info/METADATA,sha256=4UrMAh1YpZ9lmqZRipfFRbeDcuTvi2wIE95OFJnAqu8,4912
35
+ weeb_cli-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
+ weeb_cli-1.0.0.dist-info/entry_points.txt,sha256=qg3Wrgahb3k9709tTWTiqVSDHAU1IGKm9OEIpWMh7Ys,47
37
+ weeb_cli-1.0.0.dist-info/top_level.txt,sha256=4z8FZTru4fNZ_GM3NSb3yux6kMGYDuG0TwhfnbGYC1A,9
38
+ weeb_cli-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ weeb-cli = weeb_cli.main:app