commit f7aeed9f38f5c91685f0b406526595ad7a36393b Author: Ben Kreeger Date: Tue Aug 19 16:38:06 2025 -0500 Initial commit of files diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0023a53 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/.nvim/config.json b/.nvim/config.json new file mode 100644 index 0000000..a90f467 --- /dev/null +++ b/.nvim/config.json @@ -0,0 +1,6 @@ +{ + "commands": { + "build": "swift build", + "run": "swift run" + } +} diff --git a/.swift-version b/.swift-version new file mode 100644 index 0000000..0cda48a --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +6.2 diff --git a/.swiftformat b/.swiftformat new file mode 100644 index 0000000..9b99e7d --- /dev/null +++ b/.swiftformat @@ -0,0 +1 @@ +--indent 4 diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..b60c05a --- /dev/null +++ b/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "7168671e688b0ccae86155da01e80e0d8c44c91c80a5989a6c075f4f2ae64b75", + "pins" : [ + { + "identity" : "swift-argument-parser", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-argument-parser", + "state" : { + "revision" : "309a47b2b1d9b5e991f36961c983ecec72275be3", + "version" : "1.6.1" + } + } + ], + "version" : 3 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..b61906a --- /dev/null +++ b/Package.swift @@ -0,0 +1,19 @@ +// swift-tools-version: 6.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Putty", + platforms: [.macOS(.v15)], + dependencies: [ + .package(url: "https://github.com/apple/swift-argument-parser", from: "1.6.1"), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .executableTarget(name: "putty", dependencies: [ + .product(name: "ArgumentParser", package: "swift-argument-parser"), + ]), + ], +) diff --git a/README.md b/README.md new file mode 100644 index 0000000..41f392d --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Putty + +Rewritten for like, the third or fourth time. This time in Swift. + +## Documentation links + +- [Swift Argument Parser](https://swiftpackageindex.com/apple/swift-argument-parser/1.6.1/documentation/argumentparser) diff --git a/Sources/Putty/Putty.swift b/Sources/Putty/Putty.swift new file mode 100644 index 0000000..893f5b5 --- /dev/null +++ b/Sources/Putty/Putty.swift @@ -0,0 +1,18 @@ +import ArgumentParser + +@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") + } +}