@danhachuel/thunderbolt 0.2.80 → 0.2.81
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.
- package/MANUAL-INSTALACAO.md +3 -3
- package/README.md +3 -3
- package/app/main.py +11 -27
- package/hermes_ui/languages.py +1 -1
- package/package.json +1 -1
package/MANUAL-INSTALACAO.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Este manual descreve a instalação local da UI Thunderbolt, baseada no MoneyPrinterTurbo, utilizando o pacote npm `@danhachuel/thunderbolt`. O fluxo recomendado instala automaticamente o ambiente Python, as dependências da aplicação, as dependências do MoneyPrinterTurbo, o Streamlit e o suporte FFmpeg através de `imageio-ffmpeg`.
|
|
4
4
|
|
|
5
|
-
> **Versão deste manual:** 0.2.
|
|
5
|
+
> **Versão deste manual:** 0.2.81
|
|
6
6
|
> **Pacote npm:** `@danhachuel/thunderbolt`
|
|
7
7
|
> **Porta padrão da UI:** `localhost:3030`
|
|
8
8
|
> **Repositório:** [github.com/DanHachuel/thunderbolt](https://github.com/DanHachuel/thunderbolt)
|
|
@@ -192,9 +192,9 @@ npx --yes @danhachuel/thunderbolt install
|
|
|
192
192
|
|
|
193
193
|
## Idiomas e selector de bandeira
|
|
194
194
|
|
|
195
|
-
O Thunderbolt inclui as dez opções de idioma usadas pelo fluxo MoneyPrinterTurbo:
|
|
195
|
+
O Thunderbolt inclui as dez opções de idioma usadas pelo fluxo MoneyPrinterTurbo: **Inglês (en) 🇺🇸**, **Chinês Simplificado (zh) 🇨🇳**, **Alemão (de) 🇩🇪**, **Vietnamita (vi) 🇻🇳**, **Turco (tr) 🇹🇷**, **Português (pt) 🇧🇷**, **Russo (ru) 🇷🇺**, **Espanhol (es) 🇪🇸**, **Indonésio (id) 🇮🇩** e **Italiano (it) 🇮🇹**. A criação de vídeos mantém ainda os rótulos históricos para não invalidar Blueprints e tarefas antigas.
|
|
196
196
|
|
|
197
|
-
No
|
|
197
|
+
No topo da área principal, o menu nativo de idioma segue o padrão do MoneyPrinterTurbo e mostra cada opção como **nome do idioma + bandeira**. A escolha fica guardada como `ui_language` em `storage/state/settings.json` e, quando existe um caminho MoneyPrinterTurbo configurado, é sincronizada com `[ui].language` no `config.toml`. O toolbar do Streamlit não é manipulado: o indicador de execução, **Deploy** e o menu de três pontos permanecem nativos e clicáveis. Na Criação de Vídeos e em Roteiros, o selector **Script Language** mostra bandeira, nome e código, mas guarda o código curto; essa escolha é sincronizada com `[ui].video_language`.
|
|
198
198
|
|
|
199
199
|
## 4. Diagnóstico antes de iniciar
|
|
200
200
|
|
package/README.md
CHANGED
|
@@ -48,11 +48,11 @@ Os adaptadores do MoneyPrinterTurbo e de publicação nas plataformas são ligad
|
|
|
48
48
|
|
|
49
49
|
## Idiomas e selector rápido da UI
|
|
50
50
|
|
|
51
|
-
O Thunderbolt mantém os idiomas históricos da criação de vídeos e acrescenta as dez opções canónicas do MoneyPrinterTurbo:
|
|
51
|
+
O Thunderbolt mantém os idiomas históricos da criação de vídeos e acrescenta as dez opções canónicas do MoneyPrinterTurbo: **Inglês (en) 🇺🇸**, **Chinês Simplificado (zh) 🇨🇳**, **Alemão (de) 🇩🇪**, **Vietnamita (vi) 🇻🇳**, **Turco (tr) 🇹🇷**, **Português (pt) 🇧🇷**, **Russo (ru) 🇷🇺**, **Espanhol (es) 🇪🇸**, **Indonésio (id) 🇮🇩** e **Italiano (it) 🇮🇹**. Os códigos curtos são os valores persistidos e sincronizados com `ui.video_language` no `config.toml`; a bandeira e o nome são apenas a apresentação visual.
|
|
52
52
|
|
|
53
|
-
No
|
|
53
|
+
No topo da área principal da aplicação existe o menu nativo de idioma no padrão do MoneyPrinterTurbo, sem sobrepor o toolbar do Streamlit. O selector mostra o idioma actual e cada opção aparece como **nome do idioma + bandeira**. Ao escolher outra opção, a preferência é guardada em `storage/state/settings.json` como `ui_language`, e a navegação lateral actualiza-se sem alterar o idioma seleccionado para os vídeos. O indicador de execução, o botão **Deploy** e o menu principal do Streamlit permanecem totalmente nativos e clicáveis.
|
|
54
54
|
|
|
55
|
-
## Navegação da UI 0.2.
|
|
55
|
+
## Navegação da UI 0.2.81
|
|
56
56
|
|
|
57
57
|
A barra lateral mantém os níveis principais, nesta ordem: **Início**, **Niche Finder**, **Pipeline**, **Pipeline TikTok**, **Automação**, **Edição**, **AI Influencers** e **Configurações**. **Pipeline** é expansível e contém **Criação de Vídeos**, **Criação de Músicas**, **Roteiros** e **Upload**. **Automação** também é expansível e contém **Automação Youtube**. **Edição** é expansível e contém **Limpador de Metadados**, **Cortes**, **Editor Python** e **Download Mídia**, nessa ordem. **AI Influencers** é expansível e contém **Personagens**, **Redes Sociais** e **Tutorial Meta**, nessa ordem. **Niche Finder** é expansível e contém **Niche Finder Kaggle** e **Niche Finder Apify**. **Configurações** é expansível e contém **Canais Youtube**, **Blueprints Youtube**, **MCP**, **Contas Google**, **Configuração API** e **Notificações**. O Início reúne o dashboard e as filas do Pipeline, sem botões de acções rápidas.
|
|
58
58
|
|
package/app/main.py
CHANGED
|
@@ -37,7 +37,7 @@ from hermes_ui.material_sources import material_api_keys, material_source_catalo
|
|
|
37
37
|
from hermes_ui.music import list_music_files, materialize_suno_audio, request_suno_generation, store_music_file
|
|
38
38
|
from hermes_ui.media_downloader import AUDIO_FORMATS, VIDEO_CONTAINERS, VIDEO_QUALITY_OPTIONS, MediaDownloadError, build_download_options, clear_media_download_history, dependency_status, download_media, list_media_downloads, media_download_file
|
|
39
39
|
from hermes_ui.notifications import clear_notifications, list_notifications, mark_all_notifications_read, mark_notification_read, notification_event_catalog, notification_preferences, record_notification, reconcile_persisted_notifications, save_notification_preferences, unread_notification_count
|
|
40
|
-
from hermes_ui.languages import LANGUAGE_CODES, language_code,
|
|
40
|
+
from hermes_ui.languages import LANGUAGE_CODES, language_code, language_label, ui_text, video_language_label, video_language_options
|
|
41
41
|
from hermes_ui.script_documents import list_script_documents, read_script_document, save_script_document, script_storage_path
|
|
42
42
|
from hermes_ui.script_generation import generate_script_document
|
|
43
43
|
from hermes_ui.voice_preview import DEFAULT_SAMPLE, load_preview_file, synthesize_preview
|
|
@@ -188,24 +188,7 @@ st.markdown("""
|
|
|
188
188
|
[data-testid="stRadio"] label { border:1px solid #2a4052; border-radius:12px; padding:.65rem .8rem; background:#101b25; min-height:4.3rem; }
|
|
189
189
|
[data-testid="stRadio"] label:has(input:checked) { border-color:#c59b55; background:linear-gradient(145deg, rgba(96,71,33,.42), rgba(17,27,37,.95)); }
|
|
190
190
|
[data-testid="stStatusWidget"] { border-color:#2a4052 !important; background:#101b25 !important; }
|
|
191
|
-
/*
|
|
192
|
-
[data-testid="stPopover"] { position:fixed !important; top:0.20rem !important; right:1.5rem !important; width:1.5rem !important; min-width:1.5rem !important; max-width:1.5rem !important; z-index:100000 !important; pointer-events:auto !important; }
|
|
193
|
-
/* Reservar uma faixa própria entre Deploy e o menu sem deslocar o indicador de execução. */
|
|
194
|
-
[data-testid="stAppDeployButton"] { width:3.3rem !important; min-width:3.3rem !important; max-width:3.3rem !important; }
|
|
195
|
-
[data-testid="stAppDeployButton"] button { width:3.3rem !important; min-width:3.3rem !important; max-width:3.3rem !important; padding:0 !important; justify-content:center !important; }
|
|
196
|
-
[data-testid="stMainMenu"] { width:1.5rem !important; min-width:1.5rem !important; max-width:1.5rem !important; transform:translateX(1rem) !important; }
|
|
197
|
-
[data-testid="stPopover"] > div,
|
|
198
|
-
[data-testid="stPopover"] [data-testid="stPopoverButton"] { width:1.5rem !important; min-width:1.5rem !important; max-width:1.5rem !important; }
|
|
199
|
-
[data-testid="stPopover"] [data-testid="stPopoverButton"] { height:2.25rem !important; padding:0 !important; border:1px solid #2a4052 !important; border-radius:8px !important; background:#101b25 !important; }
|
|
200
|
-
[data-testid="stPopover"] [data-testid="stPopoverButton"] p { font-size:1rem !important; line-height:1 !important; margin:0 !important; }
|
|
201
|
-
[data-testid="stPopover"] [data-testid="stPopoverButton"] [data-testid="stIconMaterial"] { display:none !important; }
|
|
202
|
-
[data-testid="stPopover"] [data-testid="stPopoverBody"] { min-width:18rem; }
|
|
203
|
-
@media (max-width: 700px) {
|
|
204
|
-
[data-testid="stPopover"] { right:1.5rem !important; }
|
|
205
|
-
[data-testid="stAppDeployButton"] { width:3.3rem !important; min-width:3.3rem !important; max-width:3.3rem !important; }
|
|
206
|
-
[data-testid="stAppDeployButton"] button { width:3.3rem !important; min-width:3.3rem !important; max-width:3.3rem !important; }
|
|
207
|
-
[data-testid="stMainMenu"] { width:1.5rem !important; min-width:1.5rem !important; max-width:1.5rem !important; transform:translateX(1rem) !important; }
|
|
208
|
-
}
|
|
191
|
+
/* O menu de idiomas usa layout nativo da aplicação; o toolbar do Streamlit não é alterado. */
|
|
209
192
|
|
|
210
193
|
/* Cores dos chips por identidade da plataforma, sem depender da ordem de selecção. */
|
|
211
194
|
[data-testid="stMultiSelectTagsContainer"] span[data-tag] { color:#ffffff !important; border:0 !important; font-weight:700 !important; }
|
|
@@ -263,20 +246,21 @@ def save_video_language(value: str) -> str:
|
|
|
263
246
|
|
|
264
247
|
|
|
265
248
|
def render_ui_language_picker(language: str) -> None:
|
|
266
|
-
"""Render the
|
|
249
|
+
"""Render the MoneyPrinterTurbo-style native language menu in app layout."""
|
|
267
250
|
current = language_code(language)
|
|
268
|
-
|
|
269
|
-
|
|
251
|
+
_spacer, language_col = st.columns([5.2, 1.5])
|
|
252
|
+
with language_col:
|
|
270
253
|
selected = st.selectbox(
|
|
271
|
-
|
|
254
|
+
"Language / 语言",
|
|
272
255
|
list(LANGUAGE_CODES),
|
|
273
256
|
index=list(LANGUAGE_CODES).index(current),
|
|
274
257
|
format_func=language_label,
|
|
275
|
-
key="
|
|
258
|
+
key="top_language_code_selector",
|
|
259
|
+
label_visibility="collapsed",
|
|
276
260
|
)
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
261
|
+
if selected != current:
|
|
262
|
+
save_ui_language(selected)
|
|
263
|
+
st.rerun()
|
|
280
264
|
|
|
281
265
|
|
|
282
266
|
def card(label: str, value: str | int, note: str = ""):
|
package/hermes_ui/languages.py
CHANGED
|
@@ -91,7 +91,7 @@ def language_label(value: Any, *, include_code: bool = True) -> str:
|
|
|
91
91
|
code = language_code(value)
|
|
92
92
|
item = LANGUAGE_BY_CODE[code]
|
|
93
93
|
suffix = f" ({item['code']})" if include_code else ""
|
|
94
|
-
return f"{item['
|
|
94
|
+
return f"{item['name']}{suffix} {item['flag']}"
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
def language_option_labels(*, include_code: bool = True) -> list[str]:
|
package/package.json
CHANGED