mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-25 10:06:14 +00:00
Reformatted the exporter selection part of CommandLineController.
This commit is contained in:
parent
b5ff4dd1a6
commit
01590b05ee
@ -126,15 +126,12 @@ class CommandLineController(val options: CommandLineOptions) {
|
||||
System.exit(0)
|
||||
}
|
||||
|
||||
val export = options.get("export")
|
||||
val export = options.get("export")?.toLowerCase()
|
||||
logger.debug("options.val_export: {}", export)
|
||||
if (export != null) {
|
||||
if (export.toLowerCase() == "html") {
|
||||
HTMLExporter(database, user_manager, settings=settings, file_base=file_base).export()
|
||||
System.exit(0)
|
||||
} else {
|
||||
show_error("Unknown export format '${export}'.")
|
||||
}
|
||||
when (export) {
|
||||
"html" -> { HTMLExporter(database, user_manager, settings=settings, file_base=file_base).export(); System.exit(0) }
|
||||
null -> { /* No export whished -> do nothing. */ }
|
||||
else -> show_error("Unknown export format '${export}'.")
|
||||
}
|
||||
|
||||
println("You are logged in as ${user_manager.toString().anonymize()}")
|
||||
|
Loading…
Reference in New Issue
Block a user