mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-23 01:06:17 +00:00
Cleaned up CommandLineOptions.
This commit is contained in:
parent
6499aed3c1
commit
fefebc9cd6
@ -18,18 +18,19 @@ package de.fabianonline.telegram_backup;
|
|||||||
|
|
||||||
class CommandLineOptions {
|
class CommandLineOptions {
|
||||||
public static boolean cmd_console = false;
|
public static boolean cmd_console = false;
|
||||||
public static String val_account = null;
|
|
||||||
public static boolean cmd_help = false;
|
public static boolean cmd_help = false;
|
||||||
public static boolean cmd_login = false;
|
public static boolean cmd_login = false;
|
||||||
public static boolean cmd_debug = false;
|
public static boolean cmd_debug = false;
|
||||||
public static boolean cmd_list_accounts = false;
|
public static boolean cmd_list_accounts = false;
|
||||||
public static Integer val_limit_messages = null;
|
|
||||||
public static String val_target = null;
|
|
||||||
public static boolean cmd_version = false;
|
public static boolean cmd_version = false;
|
||||||
public static String val_export = null;
|
|
||||||
public static boolean cmd_license = false;
|
public static boolean cmd_license = false;
|
||||||
public static boolean cmd_daemon = false;
|
public static boolean cmd_daemon = false;
|
||||||
|
|
||||||
|
public static String val_account = null;
|
||||||
|
public static Integer val_limit_messages = null;
|
||||||
|
public static String val_target = null;
|
||||||
|
public static String val_export = null;
|
||||||
|
|
||||||
public static void parseOptions(String[] args) {
|
public static void parseOptions(String[] args) {
|
||||||
String last_cmd = null;
|
String last_cmd = null;
|
||||||
|
|
||||||
@ -37,17 +38,16 @@ class CommandLineOptions {
|
|||||||
if (last_cmd != null) {
|
if (last_cmd != null) {
|
||||||
switch (last_cmd) {
|
switch (last_cmd) {
|
||||||
case "--account":
|
case "--account":
|
||||||
val_account = arg;
|
val_account = arg; break;
|
||||||
break;
|
|
||||||
case "--limit-messages":
|
case "--limit-messages":
|
||||||
val_limit_messages = Integer.parseInt(arg);
|
val_limit_messages = Integer.parseInt(arg); break;
|
||||||
break;
|
|
||||||
case "--target":
|
case "--target":
|
||||||
val_target = arg;
|
val_target = arg; break;
|
||||||
break;
|
|
||||||
case "--export":
|
case "--export":
|
||||||
val_export = arg;
|
val_export = arg; break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
last_cmd = null;
|
last_cmd = null;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user