diff --git a/pyproject.toml b/pyproject.toml
index d25db83..c2bf10e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -14,7 +14,7 @@ voxvera = ["templates/**", "src/**", "resources/**", "locales/**", "resources/bi
[project]
name = "voxvera"
-version = "0.2.3"
+version = "0.2.4"
description = "VoxVera CLI utilities"
readme = "README.md"
authors = [{name = "VoxVera"}]
diff --git a/voxvera/__init__.py b/voxvera/__init__.py
index 56f4d5d..d08df38 100644
--- a/voxvera/__init__.py
+++ b/voxvera/__init__.py
@@ -1,7 +1,7 @@
import sys
from pathlib import Path
-__version__ = "0.2.3"
+__version__ = "0.2.4"
# Add the vendor directory to sys.path as a fallback.
if getattr(sys, 'frozen', False):
diff --git a/voxvera/cli.py b/voxvera/cli.py
index 236ec42..ceb775d 100644
--- a/voxvera/cli.py
+++ b/voxvera/cli.py
@@ -394,6 +394,12 @@ def interactive_update(config_path: str):
"transformer": _len_transform(120),
"validate": _len_validator(120),
},
+ {
+ "type": "input",
+ "message": t("cli.attachment_path_label"),
+ "name": "attachment_path",
+ "default": data.get("attachment_path", ""),
+ },
]
data.update(prompt(link_qs))
@@ -528,6 +534,18 @@ def build_assets(
val_str = re.sub(r"~~(.*?)~~", r'\1', val_str)
html = html.replace(f"{{{{{key}}}}}", val_str)
+ # Handle optional file attachment
+ attachment_path = data.get("attachment_path")
+ attachment_url = ""
+ attachment_display = "none"
+ if attachment_path and os.path.isfile(attachment_path):
+ att_filename = os.path.basename(attachment_path)
+ attachment_url = f"download/{att_filename}"
+ attachment_display = "inline-block"
+
+ html = html.replace("{{attachment_url}}", attachment_url)
+ html = html.replace("{{attachment_display}}", attachment_display)
+
folder_name = data["folder_name"]
dest = ROOT / "host" / folder_name
os.makedirs(dest, exist_ok=True)
@@ -546,6 +564,9 @@ def build_assets(
if download_path:
shutil.copy(download_path, download_dir / "extra-content.zip")
+ if attachment_path and os.path.isfile(attachment_path):
+ shutil.copy(attachment_path, download_dir / os.path.basename(attachment_path))
+
# Copy config if it's not already there
if Path(config_path) != dest / "config.json":
shutil.copy(config_path, dest / "config.json")
diff --git a/voxvera/locales/ar.json b/voxvera/locales/ar.json
index ddf5e53..5e20532 100644
--- a/voxvera/locales/ar.json
+++ b/voxvera/locales/ar.json
@@ -72,7 +72,8 @@
"bootstrapping_msg": "[{name}] جاري الاتصال بمرحلات Tor وإعداد الخدمة المخفية...",
"bootstrapping_progress": "[{name}] تمهيد Tor: {progress}% ...",
"no_urls_qr_skip": "لم يتم تكوين أي روابط بعد. سيتم إنشاء أكواد QR بعد 'voxvera serve'",
- "input_file_not_found": "ملف الإدخال {path} غير موجود."
+ "input_file_not_found": "ملف الإدخال {path} غير موجود.",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "استخدم متصفح Tor",
@@ -80,7 +81,8 @@
"tear_off_footer": "انقر فوق الزر أدناه للطباعة",
"built_with": "بني بواسطة",
"print_button": "اطبع المنشور",
- "download_button": "تحميل الأداة والكود"
+ "download_button": "تحميل الأداة والكود",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "سري للغاية",
@@ -90,4 +92,4 @@
"url_message": "احصل على VoxVera وابدأ بنشر رسالتك.",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/de.json b/voxvera/locales/de.json
index 5140227..cff33d7 100644
--- a/voxvera/locales/de.json
+++ b/voxvera/locales/de.json
@@ -71,7 +71,8 @@
"bootstrapping_msg": "[{name}] Verbindung zu Tor-Relays herstellen und Hidden Service einrichten...",
"bootstrapping_progress": "[{name}] Tor-Bootstrapping: {progress}% ...",
"no_urls_qr_skip": "Noch keine URLs konfiguriert. QR-Codes werden nach 'voxvera serve' generiert",
- "input_file_not_found": "Eingabedatei {path} existiert nicht."
+ "input_file_not_found": "Eingabedatei {path} existiert nicht.",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "Tor-Browser verwenden",
@@ -79,7 +80,8 @@
"tear_off_footer": "Klicken Sie auf die Schaltfläche unten zum Drucken",
"built_with": "erstellt mit",
"print_button": "Flyer drucken",
- "download_button": "Tool & Quellcode herunterladen"
+ "download_button": "Tool & Quellcode herunterladen",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "STRENG GEHEIM",
@@ -89,4 +91,4 @@
"url_message": "Holen Sie sich VoxVera und beginnen Sie, Ihre Nachricht zu verbreiten.",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/en.json b/voxvera/locales/en.json
index f972613..f14ca9f 100644
--- a/voxvera/locales/en.json
+++ b/voxvera/locales/en.json
@@ -22,6 +22,7 @@
"url_label": "URL (content link - external resource)",
"url_message_label": "URL message",
"binary_message_label": "Binary message",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
"template_not_found": "Template {name} not found",
"template_copied": "Template copied to {dest}",
"flyer_created": "Flyer files created under {dest}",
@@ -79,7 +80,8 @@
"tear_off_footer": "click the button below to print",
"built_with": "built with",
"print_button": "Print this page",
- "download_button": "Download Source Code"
+ "download_button": "Download Source Code",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "TOP SECRET",
diff --git a/voxvera/locales/es.json b/voxvera/locales/es.json
index 9878f6a..ed97fc7 100644
--- a/voxvera/locales/es.json
+++ b/voxvera/locales/es.json
@@ -71,7 +71,8 @@
"bootstrapping_msg": "[{name}] Conectando a repetidores Tor y configurando servicio oculto...",
"bootstrapping_progress": "[{name}] Arranque de Tor: {progress}% ...",
"no_urls_qr_skip": "No hay URLs configuradas todavía. Los códigos QR se generarán después de 'voxvera serve'",
- "input_file_not_found": "El archivo de entrada {path} no existe."
+ "input_file_not_found": "El archivo de entrada {path} no existe.",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "Use el Navegador Tor",
@@ -79,7 +80,8 @@
"tear_off_footer": "haga clic en el botón de abajo para imprimir",
"built_with": "construido con",
"print_button": "Imprimir volante",
- "download_button": "Descargar Herramienta y Código"
+ "download_button": "Descargar Herramienta y Código",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "ALTO SECRETO",
@@ -89,4 +91,4 @@
"url_message": "Obtenga VoxVera y comience a difundir su mensaje.",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/fa.json b/voxvera/locales/fa.json
index ac0ed3c..65eb63b 100644
--- a/voxvera/locales/fa.json
+++ b/voxvera/locales/fa.json
@@ -72,7 +72,8 @@
"bootstrapping_msg": "[{name}] در حال اتصال به رلههای Tor و راهاندازی سرویس مخفی...",
"bootstrapping_progress": "[{name}] راهاندازی Tor: {progress}% ...",
"no_urls_qr_skip": "هنوز آدرسی پیکربندی نشده است. کدهای QR پس از 'voxvera serve' ایجاد میشوند",
- "input_file_not_found": "فایل ورودی {path} وجود ندارد."
+ "input_file_not_found": "فایل ورودی {path} وجود ندارد.",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "از مرورگر Tor استفاده کنید",
@@ -80,7 +81,8 @@
"tear_off_footer": "برای چاپ روی دکمه زیر کلیک کنید",
"built_with": "ساخته شده با",
"print_button": "چاپ اعلامیه",
- "download_button": "دانلود ابزار و کد منبع"
+ "download_button": "دانلود ابزار و کد منبع",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "بهکلی محرمانه",
@@ -90,4 +92,4 @@
"url_message": "VoxVera را دریافت کنید و گسترش پیام خود را آغاز کنید.",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/fr.json b/voxvera/locales/fr.json
index 44a05ed..c9695f6 100644
--- a/voxvera/locales/fr.json
+++ b/voxvera/locales/fr.json
@@ -72,7 +72,8 @@
"bootstrapping_msg": "[{name}] Connexion aux relais Tor et configuration du service caché...",
"bootstrapping_progress": "[{name}] Amorçage de Tor : {progress}% ...",
"no_urls_qr_skip": "Aucune URL configurée pour le moment. Les codes QR seront générés après 'voxvera serve'",
- "input_file_not_found": "Le fichier d'entrée {path} n'existe pas."
+ "input_file_not_found": "Le fichier d'entrée {path} n'existe pas.",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "Utilisez le navigateur Tor",
@@ -80,7 +81,8 @@
"tear_off_footer": "cliquez sur le bouton ci-dessous pour imprimer",
"built_with": "créé avec",
"print_button": "Imprimer le flyer",
- "download_button": "Télécharger l'outil et le code"
+ "download_button": "Télécharger l'outil et le code",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "TOP SECRET",
@@ -90,4 +92,4 @@
"url_message": "Obtenez VoxVera et commencez à diffuser votre message.",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/he.json b/voxvera/locales/he.json
index ec95ae9..b2fc893 100644
--- a/voxvera/locales/he.json
+++ b/voxvera/locales/he.json
@@ -72,7 +72,8 @@
"bootstrapping_msg": "[{name}] מתחבר לממסרי Tor ומגדיר שירות נסתר...",
"bootstrapping_progress": "[{name}] איתחול Tor: {progress}% ...",
"no_urls_qr_skip": "עדיין לא הוגדרו כתובות URL. קודי QR ייווצרו לאחר 'voxvera serve'",
- "input_file_not_found": "קובץ הקלט {path} אינו קיים."
+ "input_file_not_found": "קובץ הקלט {path} אינו קיים.",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "השתמש בדפדפן Tor",
@@ -80,7 +81,8 @@
"tear_off_footer": "לחץ על הכפתור למטה להדפסה",
"built_with": "נבנה עם",
"print_button": "הדפס פלייר",
- "download_button": "הורד כלי וקוד מקור"
+ "download_button": "הורד כלי וקוד מקור",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "סודי ביותר",
@@ -90,4 +92,4 @@
"url_message": "קבלו את VoxVera והתחילו להפיץ את המסר שלכם.",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/hi.json b/voxvera/locales/hi.json
index e0ec656..363a8c8 100644
--- a/voxvera/locales/hi.json
+++ b/voxvera/locales/hi.json
@@ -72,7 +72,8 @@
"bootstrapping_msg": "[{name}] Tor रिले से जुड़ रहा है और हिडन सर्विस सेटअप कर रहा है...",
"bootstrapping_progress": "[{name}] Tor बूटस्ट्रैपिंग: {progress}% ...",
"no_urls_qr_skip": "अभी तक कोई URL कॉन्फ़िगर नहीं किया गया है। QR कोड 'voxvera serve' के बाद जेनरेट किए जाएंगे",
- "input_file_not_found": "इनपुट फ़ाइल {path} मौजूद नहीं है।"
+ "input_file_not_found": "इनपुट फ़ाइल {path} मौजूद नहीं है।",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "Tor Browser का उपयोग करें",
@@ -80,7 +81,8 @@
"tear_off_footer": "प्रिंट करने के लिए नीचे दिए गए बटन पर क्लिक करें",
"built_with": "बनाया गया",
"print_button": "फ्लायर प्रिंट करें",
- "download_button": "टूल और कोड डाउनलोड करें"
+ "download_button": "टूल और कोड डाउनलोड करें",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "अति गोपनीय",
@@ -90,4 +92,4 @@
"url_message": "VoxVera प्राप्त करें और अपना संदेश फैलाना शुरू करें।",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/ja.json b/voxvera/locales/ja.json
index cb70d23..7e03846 100644
--- a/voxvera/locales/ja.json
+++ b/voxvera/locales/ja.json
@@ -72,7 +72,8 @@
"bootstrapping_msg": "[{name}] Tor リレーに接続し、隠しサービスをセットアップ中...",
"bootstrapping_progress": "[{name}] Tor 起動中: {progress}% ...",
"no_urls_qr_skip": "URLがまだ設定されていません。QRコードは 'voxvera serve' の後に生成されます",
- "input_file_not_found": "入力ファイル {path} が存在しません。"
+ "input_file_not_found": "入力ファイル {path} が存在しません。",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "Tor Browserを使用してください",
@@ -80,7 +81,8 @@
"tear_off_footer": "下のボタンをクリックして印刷してください",
"built_with": "built with",
"print_button": "フライヤーを印刷",
- "download_button": "ツールとソースをダウンロード"
+ "download_button": "ツールとソースをダウンロード",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "極秘事項",
@@ -90,4 +92,4 @@
"url_message": "VoxVeraを入手して、メッセージの拡散を始めましょう。",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/pt.json b/voxvera/locales/pt.json
index f36756e..658e8d1 100644
--- a/voxvera/locales/pt.json
+++ b/voxvera/locales/pt.json
@@ -72,7 +72,8 @@
"bootstrapping_msg": "[{name}] Conectando aos repetidores Tor e configurando serviço oculto...",
"bootstrapping_progress": "[{name}] Inicialização do Tor: {progress}% ...",
"no_urls_qr_skip": "Nenhuma URL configurada ainda. Os códigos QR serão gerados após 'voxvera serve'",
- "input_file_not_found": "Arquivo de entrada {path} não existe."
+ "input_file_not_found": "Arquivo de entrada {path} não existe.",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "Use o Tor Browser",
@@ -80,7 +81,8 @@
"tear_off_footer": "clique no botão abaixo para imprimir",
"built_with": "construído com",
"print_button": "Imprimir Panfleto",
- "download_button": "Baixar Ferramenta e Código"
+ "download_button": "Baixar Ferramenta e Código",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "ALTO SECRETO",
@@ -90,4 +92,4 @@
"url_message": "Obtenha o VoxVera e comece a espalhar sua mensagem.",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/ru.json b/voxvera/locales/ru.json
index 62111f1..5493a10 100644
--- a/voxvera/locales/ru.json
+++ b/voxvera/locales/ru.json
@@ -72,7 +72,8 @@
"bootstrapping_msg": "[{name}] Подключение к реле Tor и настройка скрытого сервиса...",
"bootstrapping_progress": "[{name}] Загрузка Tor: {progress}% ...",
"no_urls_qr_skip": "URL еще не настроены. QR-коды будут созданы после 'voxvera serve'",
- "input_file_not_found": "Входной файл {path} не существует."
+ "input_file_not_found": "Входной файл {path} не существует.",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "Используйте Tor Browser",
@@ -80,7 +81,8 @@
"tear_off_footer": "нажмите кнопку ниже, чтобы распечатать",
"built_with": "создано с помощью",
"print_button": "Печать листовки",
- "download_button": "Скачать инструмент и код"
+ "download_button": "Скачать инструмент и код",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "СОВЕРШЕННО СЕКРЕТНО",
@@ -90,4 +92,4 @@
"url_message": "Получите VoxVera и начните распространять свое сообщение.",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/sw.json b/voxvera/locales/sw.json
index 873cef2..4173a33 100644
--- a/voxvera/locales/sw.json
+++ b/voxvera/locales/sw.json
@@ -72,7 +72,8 @@
"bootstrapping_msg": "[{name}] Inajunganisha na seva za Tor na kuandaa huduma ya siri...",
"bootstrapping_progress": "[{name}] Tor Inapakia: {progress}% ...",
"no_urls_qr_skip": "Hakuna URL zilizowekwa bado. QR codes zitaundwa baada ya 'voxvera serve'",
- "input_file_not_found": "Faili ya kuingiza {path} haipo."
+ "input_file_not_found": "Faili ya kuingiza {path} haipo.",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "Tumia Kivinjari cha Tor",
@@ -80,7 +81,8 @@
"tear_off_footer": "bonyeza kitufe hapa chini ili kuchapisha",
"built_with": "imejengwa na",
"print_button": "Chapa Kipeperushi",
- "download_button": "Pakua Zana na Chanzo"
+ "download_button": "Pakua Zana na Chanzo",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "SIRI KUBWA",
@@ -90,4 +92,4 @@
"url_message": "Pata VoxVera na uanze kueneza ujumbe wako.",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/tr.json b/voxvera/locales/tr.json
index d63a912..19f312a 100644
--- a/voxvera/locales/tr.json
+++ b/voxvera/locales/tr.json
@@ -72,7 +72,8 @@
"bootstrapping_msg": "[{name}] Tor rölelerine bağlanılıyor ve gizli servis kuruluyor...",
"bootstrapping_progress": "[{name}] Tor Başlatılıyor: %{progress} ...",
"no_urls_qr_skip": "Henüz URL yapılandırılmadı. QR kodları 'voxvera serve' komutundan sonra oluşturulacak",
- "input_file_not_found": "{path} giriş dosyası mevcut değil."
+ "input_file_not_found": "{path} giriş dosyası mevcut değil.",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "Tor Tarayıcı Kullanın",
@@ -80,7 +81,8 @@
"tear_off_footer": "yazdırmak için aşağıdaki düğmeye tıklayın",
"built_with": "ile yapıldı",
"print_button": "İlanı Yazdır",
- "download_button": "Aracı ve Kaynak Kodunu İndir"
+ "download_button": "Aracı ve Kaynak Kodunu İndir",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "ÇOK GİZLİ",
@@ -90,4 +92,4 @@
"url_message": "VoxVera'yı edinin ve mesajınızı yaymaya başlayın.",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/locales/zh.json b/voxvera/locales/zh.json
index e0fbd9e..1f77dbe 100644
--- a/voxvera/locales/zh.json
+++ b/voxvera/locales/zh.json
@@ -72,7 +72,8 @@
"bootstrapping_msg": "[{name}] 正在连接 Tor 中继并设置隐藏服务...",
"bootstrapping_progress": "[{name}] Tor 引导中: {progress}% ...",
"no_urls_qr_skip": "尚未配置 URL。QR 码将在 'voxvera serve' 后生成",
- "input_file_not_found": "输入文件 {path} 不存在。"
+ "input_file_not_found": "输入文件 {path} 不存在。",
+ "attachment_path_label": "Attachment file path (optional - will be served from Tor site)"
},
"web": {
"tear_off_tor_browser": "使用 Tor 浏览器",
@@ -80,7 +81,8 @@
"tear_off_footer": "点击下方按钮进行打印",
"built_with": "构建自",
"print_button": "打印传单",
- "download_button": "下载工具与源码"
+ "download_button": "下载工具与源码",
+ "download_attachment": "Download Attachment"
},
"landing": {
"title": "绝密",
@@ -90,4 +92,4 @@
"url_message": "获取 VoxVera 并开始传播你的消息。",
"name": "Vox Vera Printable Flyers"
}
-}
\ No newline at end of file
+}
diff --git a/voxvera/src/config.json b/voxvera/src/config.json
index c05d634..2458679 100644
--- a/voxvera/src/config.json
+++ b/voxvera/src/config.json
@@ -8,5 +8,7 @@
"url_message": "Get VoxVera and start spreading your message.",
"url": "https://github.com/PR0M3TH3AN/VoxVera",
"tear_off_link": "https://voxvera.org/",
- "binary_message": "0110010 0101011 0110010 0111101 0110100"
+ "binary_message": "0110010 0101011 0110010 0111101 0110100",
+ "attachment_path": "",
+ "attachment_filename": ""
}
diff --git a/voxvera/src/index-master.html b/voxvera/src/index-master.html
index a86ac6b..447a473 100644
--- a/voxvera/src/index-master.html
+++ b/voxvera/src/index-master.html
@@ -579,6 +579,9 @@
+
+
+