rename CLI args for autostart/stop timers

This commit is contained in:
Miguel Jacq 2019-03-24 18:19:50 +11:00
parent 907787028b
commit b353db6997
40 changed files with 50 additions and 50 deletions

View File

@ -55,8 +55,8 @@ def main(cwd=None):
parser = argparse.ArgumentParser(formatter_class=lambda prog: argparse.HelpFormatter(prog,max_help_position=28))
parser.add_argument('--local-only', action='store_true', dest='local_only', help=strings._("help_local_only"))
parser.add_argument('--stay-open', action='store_true', dest='stay_open', help=strings._("help_stay_open"))
parser.add_argument('--startup-timer', metavar='<int>', dest='startup_timer', default=0, help=strings._("help_startup_timer"))
parser.add_argument('--shutdown-timeout', metavar='<int>', dest='shutdown_timeout', default=0, help=strings._("help_shutdown_timeout"))
parser.add_argument('--autostart-timer', metavar='<int>', dest='autostart_timer', default=0, help=strings._("help_autostart_timer"))
parser.add_argument('--autostop-timer', metavar='<int>', dest='autostop_timer', default=0, help=strings._("help_autostop_timer"))
parser.add_argument('--stealth', action='store_true', dest='stealth', help=strings._("help_stealth"))
parser.add_argument('--receive', action='store_true', dest='receive', help=strings._("help_receive"))
parser.add_argument('--config', metavar='config', default=False, help=strings._('help_config'))
@ -71,8 +71,8 @@ def main(cwd=None):
local_only = bool(args.local_only)
debug = bool(args.debug)
stay_open = bool(args.stay_open)
startup_timer = int(args.startup_timer)
shutdown_timeout = int(args.shutdown_timeout)
autostart_timer = int(args.autostart_timer)
autostop_timer = int(args.autostop_timer)
stealth = bool(args.stealth)
receive = bool(args.receive)
config = args.config
@ -129,13 +129,13 @@ def main(cwd=None):
web.generate_slug(common.settings.get('slug'))
else:
web.slug = None
app = OnionShare(common, onion, local_only, shutdown_timeout)
app = OnionShare(common, onion, local_only, autostop_timer)
app.set_stealth(stealth)
app.choose_port()
# Delay the startup if a startup timer was set
if startup_timer > 0:
if autostart_timer > 0:
# Can't set a schedule that is later than the shutdown timer
if app.shutdown_timeout > 0 and app.shutdown_timeout < startup_timer:
if app.shutdown_timeout > 0 and app.shutdown_timeout < autostart_timer:
print(strings._('gui_timeout_cant_be_earlier_than_startup'))
sys.exit()
@ -144,7 +144,7 @@ def main(cwd=None):
url = 'http://{0:s}'.format(app.onion_host)
else:
url = 'http://{0:s}/{1:s}'.format(app.onion_host, web.slug)
schedule = datetime.now() + timedelta(seconds=startup_timer)
schedule = datetime.now() + timedelta(seconds=autostart_timer)
if mode == 'receive':
print(strings._('receive_mode_data_dir').format(common.settings.get('data_dir')))
print('')
@ -165,7 +165,7 @@ def main(cwd=None):
print('')
print(strings._("waiting_for_scheduled_time"))
app.onion.cleanup(False)
time.sleep(startup_timer)
time.sleep(autostart_timer)
app.start_onion_service()
else:
app.start_onion_service()
@ -219,7 +219,7 @@ def main(cwd=None):
url = 'http://{0:s}/{1:s}'.format(app.onion_host, web.slug)
print('')
if startup_timer > 0:
if autostart_timer > 0:
print(strings._('server_started'))
else:
if mode == 'receive':

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "بدأ مستخدم رفع ملفات الى حاسوبك",
"help_local_only": "",
"help_stay_open": "استمر في المشاركة بعد اول تحميل",
"help_shutdown_timeout": "أوقف المشاركة بعد ثواني محددة",
"help_autostop_timer": "أوقف المشاركة بعد ثواني محددة",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "Ползвател започна да ъплоудва файлове на компютъра Ви",
"help_local_only": "Не използвайте Тор (само за разработване)",
"help_stay_open": "Продължи споделянето след първото изтегляне",
"help_shutdown_timeout": "Спри споделянето след дадено количество секунди",
"help_autostop_timer": "Спри споделянето след дадено количество секунди",
"help_stealth": "Използвай клиент авторизация (напреднал)",
"help_receive": "Получаване на дялове вместо изпращане",
"help_debug": "Протоколирай OnionShare грешки на stdout и уеб грешки на диск",

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "",
"help_local_only": "Tor ব্যবহার করবে না (শুধুমাত্র ডেভেলপারদের জন্য)",
"help_stay_open": "ফাইলগুলো পাঠানো হয়ে গেলেও শেয়ার করা থামিও না",
"help_shutdown_timeout": "নির্দিষ্ট সেকেন্ডের পর শেয়ার করা বন্ধ করে দিও",
"help_autostop_timer": "নির্দিষ্ট সেকেন্ডের পর শেয়ার করা বন্ধ করে দিও",
"help_stealth": "ক্লায়েন্ট অনুমোদন ব্যবহার করুন (উন্নততর)",
"help_receive": "কোনকিছু শেয়ার না করে শুধু গ্রহণ করবে",
"help_debug": "OnionShare-এর এররগুলো stdout-এ দেখাও, আর ওয়েব এররগুলো ডিস্কে লগ করো",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "Algú ha començat a pujar arxius al teu ordinador",
"help_local_only": "No facis servir Tor (només per a desenvolupament)",
"help_stay_open": "Mantingues obert el servei després d'enviar els arxius",
"help_shutdown_timeout": "Deixa de compartir al cap de tants segons",
"help_autostop_timer": "Deixa de compartir al cap de tants segons",
"help_stealth": "Fes servir autorització de client (avançat)",
"help_receive": "Rep recursos en comptes d'enviar-los",
"help_debug": "Envia els errors d'OnionShare a stdout i els errors web al disc",

View File

@ -21,7 +21,7 @@
"systray_download_canceled_message": "Brugeren annullerede downloaden",
"help_local_only": "Brug ikke Tor (kun til udvikling)",
"help_stay_open": "Fortsæt deling efter filerne er blevet sendt",
"help_shutdown_timeout": "Stop deling efter et vist antal sekunder",
"help_autostop_timer": "Stop deling efter et vist antal sekunder",
"help_stealth": "Brug klientautentifikation (avanceret)",
"help_debug": "Log OnionShare-fejl til stdout, og webfejl til disk",
"help_filename": "Liste over filer eller mapper som skal deles",

View File

@ -53,7 +53,7 @@
"close_on_timeout": "Angehalten da der auto-stop Timer abgelaufen ist",
"systray_upload_started_title": "OnionShare Upload wurde gestartet",
"systray_upload_started_message": "Ein Benutzer hat begonnen, Dateien auf deinen Computer hochzuladen",
"help_shutdown_timeout": "Den Server nach einer bestimmten Zeit anhalten (in Sekunden)",
"help_autostop_timer": "Den Server nach einer bestimmten Zeit anhalten (in Sekunden)",
"help_receive": "Empfange Dateien anstatt sie zu senden",
"gui_share_stop_server_shutdown_timeout": "Server stoppen (läuft noch {} Sekunden)",
"gui_share_stop_server_shutdown_timeout_tooltip": "Zeit läuft in {} Sekunden ab",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "Ένας/μια χρήστης/τρια ξεκίνησε να ανεβάζει αρχεία στον υπολογιστή σου",
"help_local_only": "Να μην χρησιμοποιηθεί το Tor (μόνο για development)",
"help_stay_open": "Να συνεχίσει ο διαμοιρασμός μετά την αποστολή των αρχείων",
"help_shutdown_timeout": "Να τερματιστεί ο διαμοιρασμός μετά από ένα συγκεκριμένο αριθμό δευτερολέπτων",
"help_autostop_timer": "Να τερματιστεί ο διαμοιρασμός μετά από ένα συγκεκριμένο αριθμό δευτερολέπτων",
"help_stealth": "Κάντε χρήση εξουσιοδότησης πελάτη (Για προχωρημένους)",
"help_receive": "Λάβετε διαμοιρασμένα αρχεία αντι να τα στέλνετε",
"help_debug": "Κατέγραψε τα σφάλματα του OnionShare στο stdout (συνήθως οθόνη) και τα σφάλματα web στον δίσκο",

View File

@ -20,8 +20,8 @@
"large_filesize": "Warning: Sending a large share could take hours",
"help_local_only": "Don't use Tor (only for development)",
"help_stay_open": "Continue sharing after files have been sent",
"help_startup_timer": "Schedule this share to start N seconds from now",
"help_shutdown_timeout": "Stop sharing after a given amount of seconds",
"help_autostart_timer": "Schedule this share to start N seconds from now",
"help_autostop_timer": "Stop sharing after a given amount of seconds",
"help_stealth": "Use client authorization (advanced)",
"help_receive": "Receive shares instead of sending them",
"help_debug": "Log OnionShare errors to stdout, and web errors to disk",

View File

@ -24,7 +24,7 @@
"close_on_timeout": "Parado porque el temporizador expiró",
"timeout_download_still_running": "Esperando a que se complete la descarga",
"large_filesize": "Advertencia: Enviar un archivo tan grande podría llevar horas",
"help_shutdown_timeout": "Dejar de compartir después de una determinada cantidad de segundos",
"help_autostop_timer": "Dejar de compartir después de una determinada cantidad de segundos",
"help_stealth": "Usar autorización de cliente (avanzada)",
"help_config": "Ubicación del archivo de configuración JSON personalizado (opcional)",
"gui_copied_url_title": "Dirección de OnionShare copiada",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "یک کاربر شروع به آپلود فایل بر روی کامپیوتر شما کرده است",
"help_local_only": "عدم استفاده از Tor (فقط برای توسعه)",
"help_stay_open": "ادامه اشتراک گذاری پس از ارسال دانلود ها",
"help_shutdown_timeout": "توقف به اشتراک گذاری پس از میزان ثانیه ای مشخص",
"help_autostop_timer": "توقف به اشتراک گذاری پس از میزان ثانیه ای مشخص",
"help_stealth": "استفاده از احراز هویت کلاینت (پیشرفته)",
"help_receive": "دریافت اشتراک به جای ارسال آن",
"help_debug": "لاگ کردن خطاهای OnionShare روی stdout، و خطاهای وب بر روی دیسک",

View File

@ -62,7 +62,7 @@
"version_string": "OnionShare {0:s} | https://onionshare.org/",
"zip_progress_bar_format": "Compression : %p%",
"error_ephemeral_not_supported": "OnionShare exige au moins Tor 0.2.7.1 et python3-stem 1.4.0.",
"help_shutdown_timeout": "Arrêter le partage après un certain nombre de secondes",
"help_autostop_timer": "Arrêter le partage après un certain nombre de secondes",
"gui_tor_connection_error_settings": "Essayez de modifier dans les paramètres la façon dont OnionShare se connecte au réseau Tor.",
"no_available_port": "Impossible de trouver un port disponible pour démarrer le service oignon",
"gui_share_stop_server_shutdown_timeout": "Arrêter le partage ({}s restantes)",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "Thosaigh úsáideoir ag uaslódáil comhad go dtí do ríomhaire",
"help_local_only": "Ná húsáid Tor (tástáil amháin)",
"help_stay_open": "Lean ort ag comhroinnt tar éis an chéad íoslódáil",
"help_shutdown_timeout": "Stop ag comhroinnt tar éis líon áirithe soicindí",
"help_autostop_timer": "Stop ag comhroinnt tar éis líon áirithe soicindí",
"help_stealth": "Úsáid údarú cliaint (ardleibhéal)",
"help_receive": "Glac le comhaid chomhroinnte in áit iad a sheoladh",
"help_debug": "Déan tuairisc ar earráidí OnionShare ar stdout, agus earráidí Gréasáin ar an diosca",

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -39,7 +39,7 @@
"systray_download_canceled_message": "L'utente ha interrotto il download",
"systray_upload_started_title": "Upload con OnionShare avviato",
"systray_upload_started_message": "Un utente ha avviato l'upload di file sul tuo computer",
"help_shutdown_timeout": "Termina la condivisione dopo alcuni secondi",
"help_autostop_timer": "Termina la condivisione dopo alcuni secondi",
"help_stealth": "Usa l'autorizzazione del client (avanzato)",
"help_config": "Specifica il percorso del file di configurazione del JSON personalizzato",
"gui_share_stop_server_shutdown_timeout": "Arresta la condivisione ({}s rimanenti)",

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "ユーザーがファイルをアップロードし始めました",
"help_local_only": "Torを使わない開発利用のみ",
"help_stay_open": "ファイルが送信された後に共有し続けます",
"help_shutdown_timeout": "数秒後に共有が停止されます",
"help_autostop_timer": "数秒後に共有が停止されます",
"help_stealth": "クライアント認証を使う(上級者向け)",
"help_receive": "共有を送信する代わりに受信する",
"help_debug": "OnionShareのエラーを標準出力に、Webのエラーをディスクに記録する",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "사용자가 파일들을 당신의 컴퓨터로 업로딩 하는것을 시작했습니다",
"help_local_only": "Tor를 사용하지 마시오 (오직 개발자용)",
"help_stay_open": "첫 다운로드 후 계속 공유하시오",
"help_shutdown_timeout": "정해진 초단위의 시간이 지난후 공유하는 것을 멈추시오",
"help_autostop_timer": "정해진 초단위의 시간이 지난후 공유하는 것을 멈추시오",
"help_stealth": "고객 허가를 사용 (고급 수준의)",
"help_receive": "그것들을 보내는것 대신 공유를 받으시오",
"help_debug": "어니언쉐어 에러들은 표준 출력 장치로 접속하고, 웹 에러들은 디스크로 접속 ",

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -21,7 +21,7 @@
"systray_download_canceled_message": "De gebruiker heeft de download afgebroken",
"help_local_only": "Tor niet gebruiken (alleen voor ontwikkelingsdoeleinden)",
"help_stay_open": "Blijven delen na afronden van eerste download",
"help_shutdown_timeout": "Stoppen met delen na het opgegeven aantal seconden",
"help_autostop_timer": "Stoppen met delen na het opgegeven aantal seconden",
"help_stealth": "Client-authorisatie gebruiken (geavanceerd)",
"help_debug": "Log OnionShare fouten naar stdout, en web fouten naar disk",
"help_filename": "Lijst van bestanden of mappen om te delen",

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "En bruker startet opplasting av filer til din datamaskin",
"help_local_only": "Ikke bruk Tor (kun i utviklingsøyemed)",
"help_stay_open": "Fortsett å dele etter at filene har blitt sendt",
"help_shutdown_timeout": "Stopp deling etter et gitt antall sekunder",
"help_autostop_timer": "Stopp deling etter et gitt antall sekunder",
"help_stealth": "Bruk klientidentifisering (avansert)",
"help_receive": "Motta delinger istedenfor å sende dem",
"help_debug": "Log OnionShare-feil til stdout, og vev-feil til disk",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "Użytkownik rozpoczął wysyłanie plików na Twój komputer",
"help_local_only": "Nie wykorzystuj sieci Tor (opcja zaawansowana)",
"help_stay_open": "Kontynuuj udostępnianie po pierwszym pobraniu",
"help_shutdown_timeout": "Przestań udostępniać po określonym czasie w sekundach",
"help_autostop_timer": "Przestań udostępniać po określonym czasie w sekundach",
"help_stealth": "Korzystaj z weryfikacji klienta (zaawansowane)",
"help_receive": "Odbieraj dane zamiast je wysyłać",
"help_debug": "Zapisz błędy OnionShare do stdout i zapisz błędy sieciowe na dysku",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "Alguém começou a carregar arquivos no seu computador",
"help_local_only": "Não use Tor (unicamente para programação)",
"help_stay_open": "Continuar a compartilhar após o envio de documentos",
"help_shutdown_timeout": "Parar de compartilhar após um número determinado de segundos",
"help_autostop_timer": "Parar de compartilhar após um número determinado de segundos",
"help_stealth": "Usar autorização de cliente (avançado)",
"help_receive": "Receber compartilhamentos ao invés de enviá-los",
"help_debug": "Registrar erros do OnionShare no stdout e erros de rede, no disco",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -51,7 +51,7 @@
"systray_upload_started_message": "Пользователь начал загрузку файлов на Ваш компьютер",
"help_local_only": "Не использовать Tor (только для разработки)",
"help_stay_open": "Продолжить отправку после первого скачивания",
"help_shutdown_timeout": "Остановить отправку после заданного количества секунд",
"help_autostop_timer": "Остановить отправку после заданного количества секунд",
"help_stealth": "Использовать авторизацию клиента (дополнительно)",
"help_receive": "Получать загрузки вместо их отправки",
"help_debug": "Направлять сообщения об ошибках OnionShare в stdout, ошибки сети сохранять на диск",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "En användare började ladda upp filer på din dator",
"help_local_only": "Använd inte Tor (endast för utveckling)",
"help_stay_open": "Fortsätt dela efter att filer har skickats",
"help_shutdown_timeout": "Avbryt delning efter ett bestämt antal sekunder",
"help_autostop_timer": "Avbryt delning efter ett bestämt antal sekunder",
"help_stealth": "Använd klient-auktorisering (avancerat)",
"help_receive": "Ta emot delningar istället för att skicka dem",
"help_debug": "Logga OnionShare fel till stdout och webbfel till hårddisken",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -26,7 +26,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "不使用Tor(只限开发测试)",
"help_stay_open": "文件传输完成后继续分享",
"help_shutdown_timeout": "超过给定时间(秒)后,终止分享.",
"help_autostop_timer": "超过给定时间(秒)后,终止分享.",
"help_stealth": "使用服务端认证(高级选项)",
"help_receive": "仅接收分享的文件,不发送",
"help_debug": "将OnionShare错误日志记录到stdout,将web错误日志记录到磁盘",

View File

@ -25,7 +25,7 @@
"systray_upload_started_message": "",
"help_local_only": "",
"help_stay_open": "",
"help_shutdown_timeout": "",
"help_autostop_timer": "",
"help_stealth": "",
"help_receive": "",
"help_debug": "",