-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to Swift package and add tests (#5)
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
- Loading branch information
Showing
45 changed files
with
750 additions
and
1,049 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Lint | ||
on: | ||
push: | ||
paths: | ||
- '**/*.swift' | ||
pull_request: | ||
paths: | ||
- '**/*.swift' | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: SwiftFormat | ||
run: swiftformat --lint . --reporter github-actions-log --disable fileHeader # seems to be broken currently in Actions env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.DS_Store | ||
macSup2Srt.xcodeproj/project.xcworkspace/xcuserdata | ||
macSup2Srt.xcodeproj/xcuserdata | ||
build | ||
/.build/ | ||
/.swiftpm/ | ||
/.vscode/ | ||
tests/images | ||
tests/*.json | ||
tests/*.srt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# retain_public: true | ||
targets: | ||
- macSubtitleOCR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ace/xcshareddata/swiftpm/Package.resolved → Package.resolved
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// swift-tools-version: 6.0 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "macSubtitleOCR", | ||
platforms: [ | ||
.macOS("13.0"), | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"), | ||
], | ||
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: "macSubtitleOCR", | ||
dependencies: [ | ||
.product(name: "ArgumentParser", package: "swift-argument-parser"), | ||
]), | ||
.testTarget( | ||
name: "macSubtitleOCRTests", | ||
dependencies: [ | ||
.product(name: "ArgumentParser", package: "swift-argument-parser"), | ||
.target(name: "macSubtitleOCR"), | ||
], | ||
resources: [ | ||
.process("Resources"), | ||
]), | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
macSup2Srt/Extensions/DataExtensions.swift → ...btitleOCR/Extensions/DataExtensions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...tensions/TextOutputStreamExtensions.swift → ...tensions/TextOutputStreamExtensions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// | ||
// TextOutputStreamExtensions.swift | ||
// macSup2Srt | ||
// macSubtitleOCR | ||
// | ||
// Created by Ethan Dye on 9/16/24. | ||
// Copyright © 2024 Ethan Dye. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct StandardErrorOutputStream: TextOutputStream { | ||
struct StandardErrorOutputStream: TextOutputStream { | ||
public mutating func write(_ string: String) { fputs(string, stderr) } | ||
} |
2 changes: 1 addition & 1 deletion
2
macSup2Srt/MKV/EBML/EBML.swift → Sources/macSubtitleOCR/MKV/EBML/EBML.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.