diff src/main/kotlin/name/blackcap/passman/ImportExportArguments.kt @ 16:7a74ae668665

Add export subcommand.
author David Barts <n5jrn@me.com>
date Sun, 05 Feb 2023 10:50:39 -0800
parents
children 4427199eb218
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/kotlin/name/blackcap/passman/ImportExportArguments.kt	Sun Feb 05 10:50:39 2023 -0800
@@ -0,0 +1,32 @@
+package name.blackcap.passman
+
+class ImportExportArguments {
+    private companion object {
+        const val D_CHARSET = "UTF-8"
+        const val D_ESCAPE = '\\'
+        const val D_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
+        const val D_QUOTE = '"'
+        const val D_SEPARATOR = ','
+        const val D_ZONE = "UTC"
+    }
+    @Argument(description = "Character set of CSV file (default $D_CHARSET).")
+    var charset: String = D_CHARSET
+    @Argument(description = "CSV escape character (default $D_ESCAPE).")
+    var escape: Char = D_ESCAPE
+    @Argument(description = "Do not ask before overwriting.")
+    var force: Boolean = false
+    @Argument(description = "Time format (default $D_FORMAT).")
+    var format: String = D_FORMAT
+    @Argument(description = "Print this help message.")
+    var help: Boolean = false
+    @Argument(description = "Ignore white space before quoted strings.")
+    var ignore: Boolean = false
+    @Argument(description = "CSV string-quoting character (default $D_QUOTE).")
+    var quote: Char = D_QUOTE
+    @Argument(description = "CSV separator character (default $D_SEPARATOR).")
+    var separator: Char = D_SEPARATOR
+    @Argument(description = "Skip first line of input", shortName = 'k')
+    var skip: Boolean = false
+    @Argument(description = "Time zone (default $D_ZONE).")
+    var zone: String = D_ZONE
+}