Skip to content

Commit

Permalink
Clean up some code
Browse files Browse the repository at this point in the history
  • Loading branch information
Wevah committed Feb 7, 2023
1 parent f41c84c commit ab579b7
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions icumap2code/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,20 @@ import Foundation
import ArgumentParser

struct ICUMap2Code: ParsableCommand {
static let configuration = CommandConfiguration(commandName: "icumap2code", abstract: "Convert UTS#46 and joiner type map files to a compact binary format.", version: "1.0 (v10)")
static let configuration = CommandConfiguration(
commandName: "icumap2code",
abstract: "Convert UTS#46 and joiner type map files to a compact binary format.",
version: "1.0 (v10)"
)

@Option(name: [.customLong("compress"), .short], help: ArgumentHelp("Output compression mode.", discussion: "Default is uncompressed. Supported values are 'lzfse', 'lz4', 'lzma', and 'zlib'.", valueName: "mode"))
@Option(
name: [.customLong("compress"), .short],
help: ArgumentHelp(
"Output compression mode.",
discussion: "Default is uncompressed. Supported values are 'lzfse', 'lz4', 'lzma', and 'zlib'.",
valueName: "mode"
)
)
var compression: UTS46.CompressionAlgorithm = .none

@Flag(name: .shortAndLong, help: "Verbose output (on STDERR).")
Expand All @@ -25,7 +36,14 @@ struct ICUMap2Code: ParsableCommand {
@Option(name: [.customLong("joiners"), .short], help: ArgumentHelp("Joiner type input file.", valueName: "file"))
var joinersFile: String?

@Option(name: [.customLong("output"), .short], help: ArgumentHelp("The output file.", discussion: "If no file is specified, outputs to stdout.", valueName: "file"))
@Option(
name: [.customLong("output"), .short],
help: ArgumentHelp(
"The output file.",
discussion: "If no file is specified, outputs to stdout.",
valueName: "file"
)
)
var outputFile: String?

func run() throws {
Expand Down

0 comments on commit ab579b7

Please sign in to comment.