chore(swabble): apply swiftformat
This commit is contained in:
@@ -24,12 +24,12 @@ struct TranscribeCommand: ParsableCommand {
|
||||
|
||||
init(parsed: ParsedValues) {
|
||||
self.init()
|
||||
if let positional = parsed.positional.first { self.inputFile = positional }
|
||||
if let loc = parsed.options["locale"]?.last { self.locale = loc }
|
||||
if parsed.flags.contains("censor") { self.censor = true }
|
||||
if let out = parsed.options["output"]?.last { self.outputFile = out }
|
||||
if let fmt = parsed.options["format"]?.last { self.format = fmt }
|
||||
if let len = parsed.options["maxLength"]?.last, let intVal = Int(len) { self.maxLength = intVal }
|
||||
if let positional = parsed.positional.first { inputFile = positional }
|
||||
if let loc = parsed.options["locale"]?.last { locale = loc }
|
||||
if parsed.flags.contains("censor") { censor = true }
|
||||
if let out = parsed.options["output"]?.last { outputFile = out }
|
||||
if let fmt = parsed.options["format"]?.last { format = fmt }
|
||||
if let len = parsed.options["maxLength"]?.last, let intVal = Int(len) { maxLength = intVal }
|
||||
}
|
||||
|
||||
mutating func run() async throws {
|
||||
@@ -51,7 +51,7 @@ struct TranscribeCommand: ParsableCommand {
|
||||
transcript += result.text
|
||||
}
|
||||
|
||||
let output = outputFormat.text(for: transcript, maxLength: self.maxLength)
|
||||
let output = outputFormat.text(for: transcript, maxLength: maxLength)
|
||||
if let path = outputFile {
|
||||
try output.write(to: URL(fileURLWithPath: path), atomically: false, encoding: .utf8)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user