2025-02-22 10:21:07 +01:00
|
|
|
import ArgumentParser
|
2025-03-09 22:53:45 +01:00
|
|
|
import DoxyLibrary
|
2025-02-22 10:21:07 +01:00
|
|
|
import Logging
|
|
|
|
|
|
|
|
extension App {
|
|
|
|
struct Options: AppArguments, ParsableArguments {
|
2025-03-26 00:26:57 +01:00
|
|
|
|
2025-02-22 10:21:07 +01:00
|
|
|
// MARK: Properties
|
|
|
|
|
2025-03-26 00:26:57 +01:00
|
|
|
@Option(
|
|
|
|
name: .shortAndLong,
|
|
|
|
help: "A path to the location of the DocC archives in the local file system."
|
|
|
|
)
|
|
|
|
var archivesPath: String = "Resources/Archives"
|
|
|
|
|
2025-03-09 23:33:23 +01:00
|
|
|
@Option(
|
|
|
|
name: .shortAndLong,
|
|
|
|
help: "A hostname to bind the application to. Defaults to `127.0.0.1`."
|
|
|
|
)
|
2025-02-22 10:21:07 +01:00
|
|
|
var hostname: String = "127.0.0.1"
|
2025-03-09 00:11:49 +01:00
|
|
|
|
2025-03-09 23:33:23 +01:00
|
|
|
@Option(
|
|
|
|
name: .shortAndLong,
|
|
|
|
help: "A log level to set the logger service in the application."
|
|
|
|
)
|
2025-03-09 00:11:49 +01:00
|
|
|
var logLevel: Logger.Level?
|
2025-03-26 00:26:57 +01:00
|
|
|
|
|
|
|
@Option(
|
|
|
|
name: .shortAndLong,
|
|
|
|
help: "A name for the Hummingbird application."
|
|
|
|
)
|
|
|
|
var name: String = "Doxy"
|
2025-02-22 10:21:07 +01:00
|
|
|
|
2025-03-09 23:33:23 +01:00
|
|
|
@Option(
|
|
|
|
name: .shortAndLong,
|
|
|
|
help: "A port number to bind the application to. Defaults to `8080`."
|
|
|
|
)
|
2025-02-22 10:21:07 +01:00
|
|
|
var port: Int = 8080
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|