@danhachuel/thunderbolt 0.2.16 → 0.2.17
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 +6 -4
- package/README.md +3 -3
- package/app/main.py +10 -1
- package/hermes_ui/storage.py +2 -0
- 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.17
|
|
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)
|
|
@@ -100,13 +100,13 @@ Execute:
|
|
|
100
100
|
Windows PowerShell ou MobaXterm:
|
|
101
101
|
|
|
102
102
|
```powershell
|
|
103
|
-
npx.cmd --yes @danhachuel/thunderbolt@0.2.
|
|
103
|
+
npx.cmd --yes @danhachuel/thunderbolt@0.2.17 install
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
Linux/macOS:
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
|
-
npx --yes @danhachuel/thunderbolt@0.2.
|
|
109
|
+
npx --yes @danhachuel/thunderbolt@0.2.17 install
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
A instalação normal é **segura para actualizações**: preserva `storage`, Blueprints, Brandings, configurações e artefactos do utilizador. Remove apenas `.venv`, o clone técnico do MoneyPrinterTurbo e dependências que serão recriadas. Uma pasta antiga sem dados do utilizador, como `C:\Users\<utilizador>\AppData\Local\hermes` da tentativa incompleta, pode ser removida; uma pasta antiga que contenha Blueprints, Brandings ou storage é preservada e apenas avisada no terminal. Feche processos Python, Node, Streamlit e MobaXterm que estejam a usar as pastas antes de executar.
|
|
@@ -345,7 +345,9 @@ Na primeira execução, abra **Configurações** e reveja:
|
|
|
345
345
|
|---|---|
|
|
346
346
|
| Porta Streamlit | Definir a porta local da UI |
|
|
347
347
|
| Pasta MoneyPrinterTurbo | Indicar o clone local que será sincronizado com `config.toml` |
|
|
348
|
-
| YouTube Data API
|
|
348
|
+
| YouTube Data API Key | Permitir importar nome, handle e métricas públicas de canais |
|
|
349
|
+
| YouTube OAuth Client ID | Identificar a aplicação OAuth 2.0 do Google para operações autenticadas |
|
|
350
|
+
| YouTube OAuth Client Secret | Secret do mesmo cliente OAuth 2.0; não é a Data API Key |
|
|
349
351
|
| TikTok Client ID/Secret | Credenciais da aplicação; Redirect URI, scopes e autorização ficam no TikTok for Developers Playground |
|
|
350
352
|
|
|
351
353
|
As chaves devem ser inseridas apenas na configuração local. Não as coloque no GitHub, no `package.json`, em blueprints ou em ficheiros de estado versionados.
|
package/README.md
CHANGED
|
@@ -103,9 +103,9 @@ thunderbolt
|
|
|
103
103
|
No Windows PowerShell, se `npx` for bloqueado por `npx.ps1`, use directamente `npx.cmd`:
|
|
104
104
|
|
|
105
105
|
```powershell
|
|
106
|
-
npx.cmd --yes @danhachuel/thunderbolt@0.2.
|
|
107
|
-
npx.cmd --yes @danhachuel/thunderbolt@0.2.
|
|
108
|
-
npx.cmd --yes @danhachuel/thunderbolt@0.2.
|
|
106
|
+
npx.cmd --yes @danhachuel/thunderbolt@0.2.17 install
|
|
107
|
+
npx.cmd --yes @danhachuel/thunderbolt@0.2.17 doctor
|
|
108
|
+
npx.cmd --yes @danhachuel/thunderbolt@0.2.17
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
Como alternativa, pode permitir scripts para o seu utilizador:
|
package/app/main.py
CHANGED
|
@@ -350,7 +350,15 @@ def render_settings():
|
|
|
350
350
|
st.subheader("Execução local")
|
|
351
351
|
port = st.number_input("Porta Streamlit", 1, 65535, int(settings.get("port", 3030)))
|
|
352
352
|
moneyprinter_path = st.text_input("Pasta do motor de vídeo", settings.get("moneyprinter_path", ""), key="settings_moneyprinter_path")
|
|
353
|
-
|
|
353
|
+
st.markdown("**YouTube — API pública e OAuth 2.0**")
|
|
354
|
+
st.caption("A Data API Key consulta canais e estatísticas públicas. O Client ID e o Client Secret são credenciais OAuth 2.0 separadas, usadas para autorizar operações na conta, como upload.")
|
|
355
|
+
youtube_cols = st.columns(3)
|
|
356
|
+
with youtube_cols[0]:
|
|
357
|
+
youtube_api_key = text_setting("YouTube Data API Key", "youtube_api_key", secret=True, help_text="Chave criada em Google Cloud > APIs e serviços > Credenciais > Chave de API.")
|
|
358
|
+
with youtube_cols[1]:
|
|
359
|
+
youtube_client_id = text_setting("YouTube OAuth Client ID", "youtube_client_id", help_text="Client ID do OAuth 2.0 criado no Google Cloud.")
|
|
360
|
+
with youtube_cols[2]:
|
|
361
|
+
youtube_client_secret = text_setting("YouTube OAuth Client Secret", "youtube_client_secret", secret=True, help_text="Client Secret do mesmo cliente OAuth 2.0.")
|
|
354
362
|
|
|
355
363
|
with st.expander("Serviço, materiais e rede"):
|
|
356
364
|
cols = st.columns(2)
|
|
@@ -448,6 +456,7 @@ def render_settings():
|
|
|
448
456
|
if st.form_submit_button("Guardar configurações do Thunderbolt", type="primary"):
|
|
449
457
|
settings.update({
|
|
450
458
|
"port": port, "moneyprinter_path": moneyprinter_path, "youtube_api_key": youtube_api_key,
|
|
459
|
+
"youtube_client_id": youtube_client_id, "youtube_client_secret": youtube_client_secret,
|
|
451
460
|
"log_level": log_level, "listen_host": listen_host, "listen_port": listen_port, "video_source": video_source,
|
|
452
461
|
"endpoint": endpoint, "proxy_http": proxy_http, "proxy_https": proxy_https, "match_materials_to_script": match_materials_to_script,
|
|
453
462
|
"llm_provider": llm_provider, "openai_api_key": openai_api_key, "openai_base_url": openai_base_url, "openai_model_name": openai_model_name,
|
package/hermes_ui/storage.py
CHANGED
package/package.json
CHANGED