putty/Sources/CLI/CLI.swift
2025-08-19 18:42:27 -05:00

23 lines
643 B
Swift

import ArgumentParser
import PuttyKit
@main
struct CLI: AsyncParsableCommand {
static let configuration: CommandConfiguration = .init(
commandName: "putty",
abstract: "A utility for getting comic data from GoComics.com.",
subcommands: [Scrape.self],
)
}
struct Scrape: AsyncParsableCommand {
static let configuration: CommandConfiguration = .init(abstract: "Scrape all necessary data.")
mutating func run() async throws {
print("scrape")
let fetcher = PageFetcher(webDriverURL: "http://browser:4444")
_ = try await fetcher.fetchAToZ()
print("Fetch complete!")
}
}