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/__init__.py +1 -0
- weeb_cli/__main__.py +4 -0
- weeb_cli/commands/downloads.py +126 -0
- weeb_cli/commands/search.py +428 -0
- weeb_cli/commands/settings.py +254 -0
- weeb_cli/commands/setup.py +26 -0
- weeb_cli/commands/watchlist.py +130 -0
- weeb_cli/config.py +50 -0
- weeb_cli/i18n.py +65 -0
- weeb_cli/locales/en.json +168 -0
- weeb_cli/locales/tr.json +168 -0
- weeb_cli/main.py +85 -0
- weeb_cli/providers/__init__.py +21 -0
- weeb_cli/providers/animecix.py +276 -0
- weeb_cli/providers/anizle.py +450 -0
- weeb_cli/providers/base.py +98 -0
- weeb_cli/providers/registry.py +45 -0
- weeb_cli/providers/turkanime.py +499 -0
- weeb_cli/services/__init__.py +0 -0
- weeb_cli/services/dependency_manager.py +321 -0
- weeb_cli/services/details.py +32 -0
- weeb_cli/services/downloader.py +308 -0
- weeb_cli/services/player.py +47 -0
- weeb_cli/services/progress.py +136 -0
- weeb_cli/services/scraper.py +91 -0
- weeb_cli/services/search.py +16 -0
- weeb_cli/services/updater.py +199 -0
- weeb_cli/services/watch.py +19 -0
- weeb_cli/ui/__init__.py +1 -0
- weeb_cli/ui/header.py +30 -0
- weeb_cli/ui/menu.py +59 -0
- weeb_cli/ui/prompt.py +120 -0
- weeb_cli-1.0.0.dist-info/METADATA +148 -0
- weeb_cli-1.0.0.dist-info/RECORD +38 -0
- weeb_cli-1.0.0.dist-info/WHEEL +5 -0
- weeb_cli-1.0.0.dist-info/entry_points.txt +2 -0
- weeb_cli-1.0.0.dist-info/licenses/LICENSE +390 -0
- weeb_cli-1.0.0.dist-info/top_level.txt +1 -0
weeb_cli/locales/en.json
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"update": {
|
|
3
|
+
"available": "New Update Available!",
|
|
4
|
+
"current": "Current Version",
|
|
5
|
+
"prompt": "Would you like to update now?",
|
|
6
|
+
"opening": "Opening download page...",
|
|
7
|
+
"error": "Update failed",
|
|
8
|
+
"success": "Update successful!",
|
|
9
|
+
"restart_required": "Please restart the application to apply changes.",
|
|
10
|
+
"manual_required": "Auto-update not available, opening download page...",
|
|
11
|
+
"detected": "Install method detected",
|
|
12
|
+
"running": "Running",
|
|
13
|
+
"timeout": "Operation timed out.",
|
|
14
|
+
"fallback": "Update failed, opening download page..."
|
|
15
|
+
},
|
|
16
|
+
"menu": {
|
|
17
|
+
"title": "Main Menu",
|
|
18
|
+
"prompt": "What would you like to do?",
|
|
19
|
+
"options": {
|
|
20
|
+
"search": "Search Anime",
|
|
21
|
+
"watchlist": "My Watchlist",
|
|
22
|
+
"downloads": "Downloads",
|
|
23
|
+
"settings": "Settings",
|
|
24
|
+
"exit": "Exit"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"settings": {
|
|
28
|
+
"title": "Settings",
|
|
29
|
+
"language": "Change Language",
|
|
30
|
+
"source": "Select Scraping Source",
|
|
31
|
+
"aria2": "Aria2 Downloader",
|
|
32
|
+
"ytdlp": "yt-dlp Support",
|
|
33
|
+
"show_description": "Show Description",
|
|
34
|
+
"aria2_config": "Aria2 Settings",
|
|
35
|
+
"ytdlp_config": "yt-dlp Settings",
|
|
36
|
+
"max_conn": "Max Connections",
|
|
37
|
+
"download_dir": "Download Directory",
|
|
38
|
+
"format": "Format",
|
|
39
|
+
"enter_conn": "Connections (1-16)",
|
|
40
|
+
"enter_path": "Download Path",
|
|
41
|
+
"enter_format": "Format string",
|
|
42
|
+
"download_settings": "Download Settings",
|
|
43
|
+
"change_folder_name": "Change Folder Name",
|
|
44
|
+
"change_full_path": "Change Full Path",
|
|
45
|
+
"concurrent_downloads": "Simultaneous Downloads",
|
|
46
|
+
"enter_concurrent": "Enter number of simultaneous downloads (1-5)",
|
|
47
|
+
"language_changed": "Language changed to English.",
|
|
48
|
+
"source_changed": "Source changed to {source}.",
|
|
49
|
+
"no_sources": "No sources available for this language.",
|
|
50
|
+
"toggle_on": "{tool} enabled.",
|
|
51
|
+
"toggle_off": "{tool} disabled."
|
|
52
|
+
},
|
|
53
|
+
"setup": {
|
|
54
|
+
"welcome": "Welcome to Weeb CLI!",
|
|
55
|
+
"language_prompt": "Select Language / Dil Seçiniz",
|
|
56
|
+
"wizard_title": "Setup Wizard",
|
|
57
|
+
"check": "Checking {tool}...",
|
|
58
|
+
"found": "Found: {path}",
|
|
59
|
+
"not_found": "{tool} not found. Attempting install...",
|
|
60
|
+
"installing": "Installing {tool}...",
|
|
61
|
+
"downloading": "Downloading {tool}...",
|
|
62
|
+
"success": "{tool} installed successfully.",
|
|
63
|
+
"failed": "Failed to install {tool}.",
|
|
64
|
+
"manual_required": "Automatic installation failed for {tool}. Please install manually.",
|
|
65
|
+
"complete": "Setup complete!",
|
|
66
|
+
"location": "Tools installed at: {path}",
|
|
67
|
+
"pkg_manager_try": "Trying package manager: {manager}..."
|
|
68
|
+
},
|
|
69
|
+
"common": {
|
|
70
|
+
"error": "Error",
|
|
71
|
+
"processing": "Processing...",
|
|
72
|
+
"continue_key": "Press Enter to continue...",
|
|
73
|
+
"success": "Goodbye!",
|
|
74
|
+
"enabled": "Enabled",
|
|
75
|
+
"disabled": "Disabled",
|
|
76
|
+
"network_error": "No internet connection!",
|
|
77
|
+
"ctrl_c_hint": "Tip: Use Ctrl+C to go back. (Exit on Main Menu)",
|
|
78
|
+
"wip": "Work in progress..."
|
|
79
|
+
},
|
|
80
|
+
"search": {
|
|
81
|
+
"prompt": "Enter anime name",
|
|
82
|
+
"searching": "Searching...",
|
|
83
|
+
"no_results": "No results found.",
|
|
84
|
+
"results": "Search Results",
|
|
85
|
+
"cancel": "Cancel",
|
|
86
|
+
"error": "Search failed.",
|
|
87
|
+
"recent": "Recent searches"
|
|
88
|
+
},
|
|
89
|
+
"details": {
|
|
90
|
+
"error_slug": "Error: Invalid anime ID.",
|
|
91
|
+
"not_found": "Details not found.",
|
|
92
|
+
"episode": "Episode",
|
|
93
|
+
"select_episode": "Select Episode",
|
|
94
|
+
"no_episodes": "No episodes available.",
|
|
95
|
+
"selected": "Selected: {episode}",
|
|
96
|
+
"watch": "Watch",
|
|
97
|
+
"download": "Download",
|
|
98
|
+
"mark_watched": "Mark as watched?",
|
|
99
|
+
"action_prompt": "Select Action",
|
|
100
|
+
"download_options": {
|
|
101
|
+
"all": "Select All",
|
|
102
|
+
"manual": "Manual Select",
|
|
103
|
+
"range": "Range Select",
|
|
104
|
+
"prompt": "Select download mode",
|
|
105
|
+
"range_input": "Enter range (e.g. 1-5, 8)",
|
|
106
|
+
"started": "Downloads started...",
|
|
107
|
+
"range_error": "Invalid range format."
|
|
108
|
+
},
|
|
109
|
+
"player_starting": "Starting Player...",
|
|
110
|
+
"stream_not_found": "No stream URL found.",
|
|
111
|
+
"select_source": "Select Source:",
|
|
112
|
+
"invalid_ep_id": "Invalid Episode ID.",
|
|
113
|
+
"download_wip": "Download feature coming soon...",
|
|
114
|
+
"queueing": "Queueing {count} episodes... (Coming Soon)"
|
|
115
|
+
},
|
|
116
|
+
"player": {
|
|
117
|
+
"installing_mpv": "MPV not found. Installing...",
|
|
118
|
+
"install_failed": "Failed to install MPV. Please install manually."
|
|
119
|
+
},
|
|
120
|
+
"watchlist": {
|
|
121
|
+
"total_anime": "Total Anime",
|
|
122
|
+
"total_episodes": "Total Episodes",
|
|
123
|
+
"total_hours": "Total Time",
|
|
124
|
+
"last_watched": "Last Watched",
|
|
125
|
+
"completed": "Completed",
|
|
126
|
+
"in_progress": "In Progress",
|
|
127
|
+
"select_category": "Select Category",
|
|
128
|
+
"select_anime": "Select Anime",
|
|
129
|
+
"no_completed": "No completed anime.",
|
|
130
|
+
"no_in_progress": "No anime in progress.",
|
|
131
|
+
"anime_title": "Anime",
|
|
132
|
+
"episodes_watched": "Watched",
|
|
133
|
+
"next": "Next"
|
|
134
|
+
},
|
|
135
|
+
"errors": {
|
|
136
|
+
"provider_error": "Provider error: {error}",
|
|
137
|
+
"timeout": "Connection timeout",
|
|
138
|
+
"cloudflare": "Cloudflare protection active",
|
|
139
|
+
"no_streams": "No streams found"
|
|
140
|
+
},
|
|
141
|
+
"downloads": {
|
|
142
|
+
"title": "Download History",
|
|
143
|
+
"empty": "You haven't downloaded anything yet.",
|
|
144
|
+
"status": "Status",
|
|
145
|
+
"progress": "Progress",
|
|
146
|
+
"status_processing": "Downloading",
|
|
147
|
+
"status_completed": "Completed",
|
|
148
|
+
"status_failed": "Failed",
|
|
149
|
+
"status_pending": "Pending",
|
|
150
|
+
"resume_prompt": "{count} incomplete download(s) found. Resume?",
|
|
151
|
+
"resumed": "Downloads resuming...",
|
|
152
|
+
"already_downloading": "This anime is already downloading.",
|
|
153
|
+
"already_in_queue": "Selected episodes are already in queue.",
|
|
154
|
+
"queued": "{count} episode(s) added to queue.",
|
|
155
|
+
"start_now": "Download Now",
|
|
156
|
+
"add_to_queue": "Add to Queue",
|
|
157
|
+
"action_prompt": "Select Action",
|
|
158
|
+
"view_queue": "View Queue",
|
|
159
|
+
"start_queue": "Start Queue",
|
|
160
|
+
"stop_queue": "Stop Queue",
|
|
161
|
+
"clear_completed": "Clear Completed",
|
|
162
|
+
"queue_started": "Queue started.",
|
|
163
|
+
"queue_stopped": "Queue stopped.",
|
|
164
|
+
"queue_running": "Running",
|
|
165
|
+
"pending_count": "{count} download(s) pending",
|
|
166
|
+
"cleared": "Cleared."
|
|
167
|
+
}
|
|
168
|
+
}
|
weeb_cli/locales/tr.json
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"update": {
|
|
3
|
+
"available": "Yeni Sürüm Mevcut!",
|
|
4
|
+
"current": "Mevcut Sürüm",
|
|
5
|
+
"prompt": "Şimdi güncellemek ister misiniz?",
|
|
6
|
+
"opening": "İndirme sayfası açılıyor...",
|
|
7
|
+
"error": "Güncelleme başarısız",
|
|
8
|
+
"success": "Güncelleme başarılı!",
|
|
9
|
+
"restart_required": "Değişikliklerin uygulanması için uygulamayı yeniden başlatın.",
|
|
10
|
+
"manual_required": "Otomatik güncelleme yapılamadı, indirme sayfası açılıyor...",
|
|
11
|
+
"detected": "Kurulum yöntemi tespit edildi",
|
|
12
|
+
"running": "Çalıştırılıyor",
|
|
13
|
+
"timeout": "İşlem zaman aşımına uğradı.",
|
|
14
|
+
"fallback": "Güncelleme başarısız, indirme sayfası açılıyor..."
|
|
15
|
+
},
|
|
16
|
+
"menu": {
|
|
17
|
+
"title": "Ana Menü",
|
|
18
|
+
"prompt": "Ne yapmak istersiniz?",
|
|
19
|
+
"options": {
|
|
20
|
+
"search": "Anime Ara",
|
|
21
|
+
"watchlist": "İzlediklerim",
|
|
22
|
+
"downloads": "İndirmeler",
|
|
23
|
+
"settings": "Ayarlar",
|
|
24
|
+
"exit": "Çıkış"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"settings": {
|
|
28
|
+
"title": "Ayarlar",
|
|
29
|
+
"language": "Dil Değiştir",
|
|
30
|
+
"source": "Kaynak Seçimi",
|
|
31
|
+
"aria2": "Aria2 İndirici",
|
|
32
|
+
"ytdlp": "yt-dlp Desteği",
|
|
33
|
+
"show_description": "Açıklama Göster",
|
|
34
|
+
"aria2_config": "Aria2 Ayarları",
|
|
35
|
+
"ytdlp_config": "yt-dlp Ayarları",
|
|
36
|
+
"max_conn": "Maksimum Bağlantı",
|
|
37
|
+
"download_dir": "İndirme Klasörü",
|
|
38
|
+
"format": "Format",
|
|
39
|
+
"enter_conn": "Bağlantı Sayısı (1-16)",
|
|
40
|
+
"enter_path": "İndirme Yolu",
|
|
41
|
+
"enter_format": "Format yapısı",
|
|
42
|
+
"download_settings": "İndirme Ayarları",
|
|
43
|
+
"change_folder_name": "Klasör Adını Değiştir",
|
|
44
|
+
"change_full_path": "Tam Yolu Değiştir",
|
|
45
|
+
"concurrent_downloads": "Eşzamanlı İndirme Sayısı",
|
|
46
|
+
"enter_concurrent": "Eşzamanlı indirme sayısını girin (1-5)",
|
|
47
|
+
"language_changed": "Dil Türkçe olarak değiştirildi.",
|
|
48
|
+
"source_changed": "Kaynak {source} olarak değiştirildi.",
|
|
49
|
+
"no_sources": "Bu dil için kaynak bulunamadı.",
|
|
50
|
+
"toggle_on": "{tool} aktif edildi.",
|
|
51
|
+
"toggle_off": "{tool} devre dışı bırakıldı."
|
|
52
|
+
},
|
|
53
|
+
"setup": {
|
|
54
|
+
"welcome": "Weeb CLI'a Hoş Geldiniz!",
|
|
55
|
+
"language_prompt": "Dil Seçiniz / Select Language",
|
|
56
|
+
"wizard_title": "Kurulum Sihirbazı",
|
|
57
|
+
"check": "{tool} kontrol ediliyor...",
|
|
58
|
+
"found": "Bulundu: {path}",
|
|
59
|
+
"not_found": "{tool} bulunamadı. Kurulum deneniyor...",
|
|
60
|
+
"installing": "{tool} kuruluyor...",
|
|
61
|
+
"downloading": "{tool} indiriliyor...",
|
|
62
|
+
"success": "{tool} başarıyla kuruldu.",
|
|
63
|
+
"failed": "{tool} kurulumu başarısız.",
|
|
64
|
+
"manual_required": "{tool} için otomatik kurulum başarısız. Lütfen manuel kurun.",
|
|
65
|
+
"complete": "Kurulum tamamlandı!",
|
|
66
|
+
"location": "Araçlar şuraya kuruldu: {path}",
|
|
67
|
+
"pkg_manager_try": "Paket yöneticisi deneniyor: {manager}..."
|
|
68
|
+
},
|
|
69
|
+
"common": {
|
|
70
|
+
"error": "Hata",
|
|
71
|
+
"processing": "İşlem yapılıyor...",
|
|
72
|
+
"continue_key": "Devam etmek için Enter'a basın...",
|
|
73
|
+
"success": "Görüşmek üzere!",
|
|
74
|
+
"enabled": "Aktif",
|
|
75
|
+
"disabled": "Pasif",
|
|
76
|
+
"network_error": "İnternet bağlantısı yok!",
|
|
77
|
+
"ctrl_c_hint": "İpucu: Geri dönmek için Ctrl+C kullanın. (Ana menüde çıkış yapar)",
|
|
78
|
+
"wip": "Çalışma devam ediyor..."
|
|
79
|
+
},
|
|
80
|
+
"search": {
|
|
81
|
+
"prompt": "Anime adı girin",
|
|
82
|
+
"searching": "Aranıyor...",
|
|
83
|
+
"no_results": "Sonuç bulunamadı.",
|
|
84
|
+
"results": "Arama Sonuçları",
|
|
85
|
+
"cancel": "İptal",
|
|
86
|
+
"error": "Arama başarısız.",
|
|
87
|
+
"recent": "Son aramalar"
|
|
88
|
+
},
|
|
89
|
+
"details": {
|
|
90
|
+
"error_slug": "Hata: Geçersiz anime ID.",
|
|
91
|
+
"not_found": "Detaylar bulunamadı.",
|
|
92
|
+
"episode": "Bölüm",
|
|
93
|
+
"select_episode": "Bölüm Seçin",
|
|
94
|
+
"no_episodes": "Bölüm bulunamadı.",
|
|
95
|
+
"selected": "Seçildi: {episode}",
|
|
96
|
+
"watch": "İzle",
|
|
97
|
+
"download": "İndir",
|
|
98
|
+
"mark_watched": "İzlendi olarak işaretlensin mi?",
|
|
99
|
+
"action_prompt": "İşlem Seçin",
|
|
100
|
+
"download_options": {
|
|
101
|
+
"all": "Tümünü Seç",
|
|
102
|
+
"manual": "Elle Seç",
|
|
103
|
+
"range": "Aralık Seç",
|
|
104
|
+
"prompt": "İndirme Modu Seçin",
|
|
105
|
+
"range_input": "Aralık girin (örn. 1-5, 8)",
|
|
106
|
+
"started": "İndirmeler başlatılıyor...",
|
|
107
|
+
"range_error": "Geçersiz aralık formatı."
|
|
108
|
+
},
|
|
109
|
+
"player_starting": "Oynatıcı Başlatılıyor...",
|
|
110
|
+
"stream_not_found": "Yayın URL'si bulunamadı.",
|
|
111
|
+
"select_source": "Kaynak Seçin:",
|
|
112
|
+
"invalid_ep_id": "Geçersiz Bölüm ID.",
|
|
113
|
+
"download_wip": "İndirme özelliği yakında...",
|
|
114
|
+
"queueing": "{count} bölüm sıraya alınıyor... (Yakında)"
|
|
115
|
+
},
|
|
116
|
+
"player": {
|
|
117
|
+
"installing_mpv": "MPV bulunamadı. Kuruluyor...",
|
|
118
|
+
"install_failed": "MPV kurulamadı. Lütfen manuel kurun."
|
|
119
|
+
},
|
|
120
|
+
"watchlist": {
|
|
121
|
+
"total_anime": "Toplam Anime",
|
|
122
|
+
"total_episodes": "Toplam Bölüm",
|
|
123
|
+
"total_hours": "Toplam Süre",
|
|
124
|
+
"last_watched": "Son İzlenen",
|
|
125
|
+
"completed": "Tamamlananlar",
|
|
126
|
+
"in_progress": "Devam Edenler",
|
|
127
|
+
"select_category": "Kategori Seçin",
|
|
128
|
+
"select_anime": "Anime Seçin",
|
|
129
|
+
"no_completed": "Tamamlanan anime yok.",
|
|
130
|
+
"no_in_progress": "Devam eden anime yok.",
|
|
131
|
+
"anime_title": "Anime",
|
|
132
|
+
"episodes_watched": "İzlenen",
|
|
133
|
+
"next": "Sonraki"
|
|
134
|
+
},
|
|
135
|
+
"errors": {
|
|
136
|
+
"provider_error": "Kaynak hatası: {error}",
|
|
137
|
+
"timeout": "Bağlantı zaman aşımı",
|
|
138
|
+
"cloudflare": "Cloudflare koruması aktif",
|
|
139
|
+
"no_streams": "Stream bulunamadı"
|
|
140
|
+
},
|
|
141
|
+
"downloads": {
|
|
142
|
+
"title": "Geçmiş İndirmeler",
|
|
143
|
+
"empty": "Henüz hiç indirme yapmamışsınız.",
|
|
144
|
+
"status": "Durum",
|
|
145
|
+
"progress": "İlerleme",
|
|
146
|
+
"status_processing": "İndiriliyor",
|
|
147
|
+
"status_completed": "Tamamlandı",
|
|
148
|
+
"status_failed": "Başarısız",
|
|
149
|
+
"status_pending": "Bekliyor",
|
|
150
|
+
"resume_prompt": "{count} tamamlanmamış indirme var. Devam edilsin mi?",
|
|
151
|
+
"resumed": "İndirmeler devam ediyor...",
|
|
152
|
+
"already_downloading": "Bu anime zaten indiriliyor.",
|
|
153
|
+
"already_in_queue": "Seçilen bölümler zaten sırada.",
|
|
154
|
+
"queued": "{count} bölüm sıraya eklendi.",
|
|
155
|
+
"start_now": "Hemen İndir",
|
|
156
|
+
"add_to_queue": "Kuyruğa Ekle",
|
|
157
|
+
"action_prompt": "İşlem Seçin",
|
|
158
|
+
"view_queue": "Kuyruğu Görüntüle",
|
|
159
|
+
"start_queue": "Kuyruğu Başlat",
|
|
160
|
+
"stop_queue": "Kuyruğu Durdur",
|
|
161
|
+
"clear_completed": "Tamamlananları Temizle",
|
|
162
|
+
"queue_started": "Kuyruk başlatıldı.",
|
|
163
|
+
"queue_stopped": "Kuyruk durduruldu.",
|
|
164
|
+
"queue_running": "Çalışıyor",
|
|
165
|
+
"pending_count": "{count} indirme bekliyor",
|
|
166
|
+
"cleared": "Temizlendi."
|
|
167
|
+
}
|
|
168
|
+
}
|
weeb_cli/main.py
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
import questionary
|
|
3
|
+
import sys
|
|
4
|
+
import time
|
|
5
|
+
from rich.console import Console
|
|
6
|
+
from weeb_cli.ui.menu import show_main_menu
|
|
7
|
+
from weeb_cli.commands.search import search_anime
|
|
8
|
+
from weeb_cli.commands.watchlist import show_watchlist
|
|
9
|
+
from weeb_cli.commands.settings import open_settings
|
|
10
|
+
from weeb_cli.config import config
|
|
11
|
+
from weeb_cli.i18n import i18n
|
|
12
|
+
from weeb_cli.commands.setup import start_setup_wizard
|
|
13
|
+
from weeb_cli.services.dependency_manager import dependency_manager
|
|
14
|
+
from weeb_cli.services.updater import update_prompt
|
|
15
|
+
from weeb_cli.ui.prompt import prompt
|
|
16
|
+
|
|
17
|
+
app = typer.Typer(add_completion=False)
|
|
18
|
+
console = Console()
|
|
19
|
+
|
|
20
|
+
def check_network():
|
|
21
|
+
with console.status(f"[dim]{i18n.t('common.ctrl_c_hint')}[/dim]", spinner="dots"):
|
|
22
|
+
time.sleep(1)
|
|
23
|
+
|
|
24
|
+
def run_setup():
|
|
25
|
+
langs = {
|
|
26
|
+
"Türkçe": "tr",
|
|
27
|
+
"English": "en"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
choices = [(k, v) for k, v in langs.items()]
|
|
31
|
+
|
|
32
|
+
selected_code = prompt.select(
|
|
33
|
+
"Select Language / Dil Seçiniz",
|
|
34
|
+
choices
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
i18n.set_language(selected_code)
|
|
38
|
+
|
|
39
|
+
console.print(f"[dim]{i18n.t('common.ctrl_c_hint')}[/dim]")
|
|
40
|
+
start_setup_wizard()
|
|
41
|
+
|
|
42
|
+
def check_ffmpeg_silent():
|
|
43
|
+
if not dependency_manager.check_dependency("ffmpeg"):
|
|
44
|
+
console.print(f"[cyan]{i18n.t('setup.downloading', tool='FFmpeg')}...[/cyan]")
|
|
45
|
+
dependency_manager.install_dependency("ffmpeg")
|
|
46
|
+
|
|
47
|
+
@app.command()
|
|
48
|
+
def start():
|
|
49
|
+
if not config.get("language"):
|
|
50
|
+
run_setup()
|
|
51
|
+
|
|
52
|
+
update_prompt()
|
|
53
|
+
check_incomplete_downloads()
|
|
54
|
+
|
|
55
|
+
check_network()
|
|
56
|
+
check_ffmpeg_silent()
|
|
57
|
+
|
|
58
|
+
show_main_menu()
|
|
59
|
+
|
|
60
|
+
def check_incomplete_downloads():
|
|
61
|
+
from weeb_cli.services.downloader import queue_manager
|
|
62
|
+
|
|
63
|
+
if queue_manager.has_incomplete_downloads():
|
|
64
|
+
count = queue_manager.get_incomplete_count()
|
|
65
|
+
try:
|
|
66
|
+
ans = questionary.confirm(
|
|
67
|
+
i18n.t("downloads.resume_prompt", count=count),
|
|
68
|
+
default=True
|
|
69
|
+
).ask()
|
|
70
|
+
|
|
71
|
+
if ans:
|
|
72
|
+
queue_manager.resume_incomplete()
|
|
73
|
+
console.print(f"[green]{i18n.get('downloads.resumed')}[/green]")
|
|
74
|
+
else:
|
|
75
|
+
queue_manager.cancel_incomplete()
|
|
76
|
+
except KeyboardInterrupt:
|
|
77
|
+
queue_manager.cancel_incomplete()
|
|
78
|
+
|
|
79
|
+
@app.callback(invoke_without_command=True)
|
|
80
|
+
def main(ctx: typer.Context):
|
|
81
|
+
if ctx.invoked_subcommand is None:
|
|
82
|
+
start()
|
|
83
|
+
|
|
84
|
+
if __name__ == "__main__":
|
|
85
|
+
app()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from weeb_cli.providers.base import BaseProvider
|
|
2
|
+
from weeb_cli.providers.registry import (
|
|
3
|
+
register_provider,
|
|
4
|
+
get_provider,
|
|
5
|
+
get_providers_for_lang,
|
|
6
|
+
get_default_provider,
|
|
7
|
+
list_providers
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
from weeb_cli.providers import animecix
|
|
11
|
+
from weeb_cli.providers import anizle
|
|
12
|
+
from weeb_cli.providers import turkanime
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"BaseProvider",
|
|
16
|
+
"register_provider",
|
|
17
|
+
"get_provider",
|
|
18
|
+
"get_providers_for_lang",
|
|
19
|
+
"get_default_provider",
|
|
20
|
+
"list_providers"
|
|
21
|
+
]
|