16
|
1 package name.blackcap.passman
|
|
2
|
|
3 class ImportExportArguments {
|
|
4 private companion object {
|
|
5 const val D_CHARSET = "UTF-8"
|
|
6 const val D_ESCAPE = '\\'
|
|
7 const val D_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
|
|
8 const val D_QUOTE = '"'
|
|
9 const val D_SEPARATOR = ','
|
|
10 const val D_ZONE = "UTC"
|
|
11 }
|
|
12 @Argument(description = "Character set of CSV file (default $D_CHARSET).")
|
|
13 var charset: String = D_CHARSET
|
|
14 @Argument(description = "CSV escape character (default $D_ESCAPE).")
|
|
15 var escape: Char = D_ESCAPE
|
|
16 @Argument(description = "Do not ask before overwriting.")
|
|
17 var force: Boolean = false
|
|
18 @Argument(description = "Time format (default $D_FORMAT).")
|
|
19 var format: String = D_FORMAT
|
|
20 @Argument(description = "Print this help message.")
|
|
21 var help: Boolean = false
|
|
22 @Argument(description = "Ignore white space before quoted strings.")
|
|
23 var ignore: Boolean = false
|
|
24 @Argument(description = "CSV string-quoting character (default $D_QUOTE).")
|
|
25 var quote: Char = D_QUOTE
|
|
26 @Argument(description = "CSV separator character (default $D_SEPARATOR).")
|
|
27 var separator: Char = D_SEPARATOR
|
|
28 @Argument(description = "Skip first line of input", shortName = 'k')
|
|
29 var skip: Boolean = false
|
|
30 @Argument(description = "Time zone (default $D_ZONE).")
|
|
31 var zone: String = D_ZONE
|
|
32 }
|