├── .gitignore ├── LICENSE ├── LocalPackage ├── .gitignore ├── Package.swift ├── Sources │ ├── DataLayer │ │ ├── Dependency │ │ │ ├── DependencyClient.swift │ │ │ ├── LoggingSystemClient.swift │ │ │ ├── NSAppClient.swift │ │ │ ├── NSCursorClient.swift │ │ │ ├── NSPasteboardClient.swift │ │ │ ├── NSSoundClient.swift │ │ │ ├── SPUUpdaterClient.swift │ │ │ ├── ScreenCaptureClient.swift │ │ │ ├── TextRecognitionClient.swift │ │ │ └── WindowSceneMessengerClient.swift │ │ └── Repository │ │ │ └── CheckForUpdatesRepository.swift │ ├── Domain │ │ ├── AppDelegate.swift │ │ ├── AppDependencies.swift │ │ ├── AppServices.swift │ │ ├── Event │ │ │ ├── CriticalEvent.swift │ │ │ ├── ErrorEvent.swift │ │ │ └── NoticeEvent.swift │ │ ├── Service │ │ │ ├── LogService.swift │ │ │ ├── ScanTextService.swift │ │ │ └── UpdateService.swift │ │ ├── String+Extension.swift │ │ └── ViewModel │ │ │ ├── MenuViewModel.swift │ │ │ └── ScreenshotViewModel.swift │ └── Presentation │ │ ├── Resources │ │ └── Localizable.xcstrings │ │ ├── Scene │ │ ├── MenuBarScene.swift │ │ └── ScreenshotScene.swift │ │ └── View │ │ ├── MenuView.swift │ │ └── ScreenshotView.swift └── Tests │ └── DomainTests │ └── DomainTests.swift ├── README.md ├── TextScanner.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── swiftpm │ └── Package.resolved ├── TextScanner ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon_128x128.png │ │ ├── icon_128x128@2x.png │ │ ├── icon_16x16.png │ │ ├── icon_16x16@2x.png │ │ ├── icon_256x256.png │ │ ├── icon_256x256@2x.png │ │ ├── icon_32x32.png │ │ ├── icon_32x32@2x.png │ │ ├── icon_512x512.png │ │ └── icon_512x512@2x.png │ └── Contents.json ├── Info.plist ├── TextScanner.entitlements └── TextScannerApp.swift ├── UPDATE.md ├── appcast.xml ├── bin ├── create_dmg.sh ├── dmg_background.png ├── generate_appcast └── generate_keys └── materials ├── demo.gif ├── scan_icon.ai └── scan_icon.psd /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac 2 | .DS_Store 3 | 4 | # Xcode 5 | xcuserdata/ 6 | *.xcuserstate 7 | *.xccheckout 8 | 9 | # Swift Package Manager 10 | Packages.resolved 11 | .swiftpm/ 12 | .build/ 13 | ShiftWindowPackages/Package.resolved 14 | 15 | # Test 16 | TestResults/ 17 | 18 | # Release 19 | *.dmg 20 | *.app/ 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Takuto Nakamura 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LocalPackage/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | xcuserdata/ 5 | DerivedData/ 6 | .swiftpm/configuration/registries.json 7 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata 8 | .netrc 9 | -------------------------------------------------------------------------------- /LocalPackage/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version: 6.0 2 | 3 | import PackageDescription 4 | 5 | let swiftSettings: [SwiftSetting] = [ 6 | .enableUpcomingFeature("ExistentialAny"), 7 | ] 8 | 9 | let package = Package( 10 | name: "LocalPackage", 11 | defaultLocalization: "en", 12 | platforms: [ 13 | .macOS(.v15), 14 | ], 15 | products: [ 16 | .library( 17 | name: "DataLayer", 18 | targets: ["DataLayer"] 19 | ), 20 | .library( 21 | name: "Domain", 22 | targets: ["Domain"] 23 | ), 24 | .library( 25 | name: "Presentation", 26 | targets: ["Presentation"] 27 | ), 28 | ], 29 | dependencies: [ 30 | .package(url: "https://github.com/apple/swift-log.git", exact: "1.6.2"), 31 | .package(url: "https://github.com/Kyome22/WindowSceneKit.git", exact: "1.1.0"), 32 | .package(url: "https://github.com/sparkle-project/Sparkle.git", exact: "2.6.4"), 33 | ], 34 | targets: [ 35 | .target( 36 | name: "DataLayer", 37 | dependencies: [ 38 | .product(name: "Logging", package: "swift-log"), 39 | .product(name: "Sparkle", package: "Sparkle"), 40 | .product(name: "WindowSceneKit", package: "WindowSceneKit"), 41 | ], 42 | swiftSettings: swiftSettings 43 | ), 44 | .target( 45 | name: "Domain", 46 | dependencies: [ 47 | "DataLayer", 48 | .product(name: "Logging", package: "swift-log"), 49 | ], 50 | swiftSettings: swiftSettings 51 | ), 52 | .testTarget( 53 | name: "DomainTests", 54 | dependencies: [ 55 | "DataLayer", 56 | "Domain", 57 | ], 58 | swiftSettings: swiftSettings 59 | ), 60 | .target( 61 | name: "Presentation", 62 | dependencies: [ 63 | "DataLayer", 64 | "Domain", 65 | .product(name: "WindowSceneKit", package: "WindowSceneKit"), 66 | ], 67 | swiftSettings: swiftSettings 68 | ), 69 | ] 70 | ) 71 | -------------------------------------------------------------------------------- /LocalPackage/Sources/DataLayer/Dependency/DependencyClient.swift: -------------------------------------------------------------------------------- 1 | public protocol DependencyClient: Sendable { 2 | static var liveValue: Self { get } 3 | static var testValue: Self { get } 4 | } 5 | -------------------------------------------------------------------------------- /LocalPackage/Sources/DataLayer/Dependency/LoggingSystemClient.swift: -------------------------------------------------------------------------------- 1 | import Logging 2 | 3 | public struct LoggingSystemClient: DependencyClient { 4 | public var bootstrap: @Sendable (@escaping @Sendable (String) -> any LogHandler) -> Void 5 | 6 | public static let liveValue = Self( 7 | bootstrap: { LoggingSystem.bootstrap($0) } 8 | ) 9 | 10 | public static let testValue = Self( 11 | bootstrap: { _ in } 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /LocalPackage/Sources/DataLayer/Dependency/NSAppClient.swift: -------------------------------------------------------------------------------- 1 | import AppKit 2 | 3 | public struct NSAppClient: DependencyClient { 4 | public var activate: @MainActor @Sendable (Bool) -> Void 5 | public var terminate: @MainActor @Sendable (Any?) -> Void 6 | public var orderFrontStandardAboutPanel: @MainActor @Sendable (Any?) -> Void 7 | 8 | public static let liveValue = Self( 9 | activate: { NSApp.activate(ignoringOtherApps: $0) }, 10 | terminate: { NSApp.terminate($0) }, 11 | orderFrontStandardAboutPanel: { NSApp.orderFrontStandardAboutPanel($0) } 12 | ) 13 | 14 | public static let testValue = Self( 15 | activate: { _ in }, 16 | terminate: { _ in }, 17 | orderFrontStandardAboutPanel: { _ in } 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /LocalPackage/Sources/DataLayer/Dependency/NSCursorClient.swift: -------------------------------------------------------------------------------- 1 | import AppKit 2 | 3 | public struct NSCursorClient: DependencyClient { 4 | public var push: @Sendable (NSCursor) -> Void 5 | public var pop: @Sendable () -> Void 6 | public var equal: @Sendable (NSCursor, NSCursor) -> Bool 7 | 8 | public static let liveValue = Self( 9 | push: { $0.push() }, 10 | pop: { NSCursor.pop() }, 11 | equal: { $0 == $1 } 12 | ) 13 | 14 | public static let testValue = Self( 15 | push: { _ in }, 16 | pop: {}, 17 | equal: { _, _ in false } 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /LocalPackage/Sources/DataLayer/Dependency/NSPasteboardClient.swift: -------------------------------------------------------------------------------- 1 | import AppKit 2 | 3 | public struct NSPasteboardClient: DependencyClient { 4 | public var clearContents: @Sendable () -> Int 5 | public var declareTypes: @Sendable ([NSPasteboard.PasteboardType], Any?) -> Int 6 | public var setString: @Sendable (String, NSPasteboard.PasteboardType) -> Bool 7 | 8 | public static let liveValue = Self( 9 | clearContents: { NSPasteboard.general.clearContents() }, 10 | declareTypes: { NSPasteboard.general.declareTypes($0, owner: $1) }, 11 | setString: { NSPasteboard.general.setString($0, forType: $1) } 12 | ) 13 | 14 | public static let testValue = Self( 15 | clearContents: { .zero }, 16 | declareTypes: { _, _ in .zero }, 17 | setString: { _, _ in false } 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /LocalPackage/Sources/DataLayer/Dependency/NSSoundClient.swift: -------------------------------------------------------------------------------- 1 | import AppKit 2 | 3 | public struct NSSoundClient: DependencyClient { 4 | public var play: @Sendable (NSSound) -> Void 5 | 6 | public static let liveValue = Self( 7 | play: { $0.play() } 8 | ) 9 | 10 | public static let testValue = Self( 11 | play: { _ in } 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /LocalPackage/Sources/DataLayer/Dependency/SPUUpdaterClient.swift: -------------------------------------------------------------------------------- 1 | import Combine 2 | @preconcurrency import Sparkle 3 | 4 | public struct SPUUpdaterClient: DependencyClient { 5 | var automaticallyChecksForUpdates: @Sendable () -> Bool 6 | var setAutomaticallyChecksForUpdates: @Sendable (Bool) -> Void 7 | public var canCheckForUpdatesPublisher: @Sendable () -> AnyPublisher 8 | public var checkForUpdates: @Sendable () -> Void 9 | 10 | public static let liveValue: Self = { 11 | let updaterController = SPUStandardUpdaterController( 12 | startingUpdater: true, 13 | updaterDelegate: nil, 14 | userDriverDelegate: nil 15 | ) 16 | return Self( 17 | automaticallyChecksForUpdates: { 18 | updaterController.updater.automaticallyChecksForUpdates 19 | }, 20 | setAutomaticallyChecksForUpdates: { 21 | updaterController.updater.automaticallyChecksForUpdates = $0 22 | }, 23 | canCheckForUpdatesPublisher: { 24 | updaterController.updater.publisher(for: \.canCheckForUpdates).eraseToAnyPublisher() 25 | }, 26 | checkForUpdates: { 27 | updaterController.updater.checkForUpdates() 28 | } 29 | ) 30 | }() 31 | 32 | public static let testValue = Self( 33 | automaticallyChecksForUpdates: { false }, 34 | setAutomaticallyChecksForUpdates: { _ in }, 35 | canCheckForUpdatesPublisher: { Just(false).eraseToAnyPublisher() }, 36 | checkForUpdates: {} 37 | ) 38 | } 39 | -------------------------------------------------------------------------------- /LocalPackage/Sources/DataLayer/Dependency/ScreenCaptureClient.swift: -------------------------------------------------------------------------------- 1 | import ScreenCaptureKit 2 | 3 | public struct ScreenCaptureClient: DependencyClient { 4 | public var currentShareableContent: @Sendable () async throws -> SCShareableContent 5 | public var screenWindowsOnlyBelow: @Sendable (SCWindow) async throws -> SCShareableContent 6 | public var captureImage: @Sendable (SCContentFilter, SCStreamConfiguration) async throws -> CGImage 7 | 8 | public static let liveValue = Self( 9 | currentShareableContent: { 10 | try await SCShareableContent.current 11 | }, 12 | screenWindowsOnlyBelow: { 13 | try await SCShareableContent.excludingDesktopWindows(false, onScreenWindowsOnlyBelow: $0) 14 | }, 15 | captureImage: { 16 | try await SCScreenshotManager.captureImage(contentFilter: $0, configuration: $1) 17 | } 18 | ) 19 | 20 | public static let testValue = Self( 21 | currentShareableContent: { throw SCStreamError(.noDisplayList) }, 22 | screenWindowsOnlyBelow: { _ in throw SCStreamError(.noDisplayList) }, 23 | captureImage: { _, _ in throw SCStreamError(.noCaptureSource) } 24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /LocalPackage/Sources/DataLayer/Dependency/TextRecognitionClient.swift: -------------------------------------------------------------------------------- 1 | import Vision 2 | 3 | public struct TextRecognitionClient: DependencyClient { 4 | public var perform: @Sendable (ImageRequestHandler, RecognizeTextRequest) async throws -> RecognizeTextRequest.Result 5 | 6 | public static let liveValue = Self( 7 | perform: { try await $0.perform($1) } 8 | ) 9 | 10 | public static let testValue = Self( 11 | perform: { _, _ in 12 | throw VisionError.operationFailed("Failed to recognize text.") 13 | } 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /LocalPackage/Sources/DataLayer/Dependency/WindowSceneMessengerClient.swift: -------------------------------------------------------------------------------- 1 | import WindowSceneKit 2 | 3 | public struct WindowSceneMessengerClient: DependencyClient { 4 | public var request: @Sendable (WindowAction, String, [String : any Sendable]) -> Void 5 | 6 | public static let liveValue = Self( 7 | request: { WindowSceneMessenger.request(windowAction: $0, windowKey: $1, supplements: $2) } 8 | ) 9 | 10 | public static let testValue = Self( 11 | request: { _, _, _ in } 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /LocalPackage/Sources/DataLayer/Repository/CheckForUpdatesRepository.swift: -------------------------------------------------------------------------------- 1 | public struct CheckForUpdatesRepository: Sendable { 2 | private var spuUpdaterClient: SPUUpdaterClient 3 | 4 | public var isEnabled: Bool { 5 | spuUpdaterClient.automaticallyChecksForUpdates() 6 | } 7 | 8 | public init(_ spuUpdaterClient: SPUUpdaterClient) { 9 | self.spuUpdaterClient = spuUpdaterClient 10 | } 11 | 12 | public func switchStatus(_ isEnabled: Bool) { 13 | spuUpdaterClient.setAutomaticallyChecksForUpdates(isEnabled) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import AppKit 2 | 3 | public final class AppDelegate: NSObject, NSApplicationDelegate { 4 | public let appDependencies = AppDependenciesKey.defaultValue 5 | public let appServices = AppServicesKey.defaultValue 6 | 7 | public func applicationDidFinishLaunching(_ notification: Notification) { 8 | Task { 9 | await appServices.logService.bootstrap() 10 | appServices.logService.notice(.launchApp) 11 | await appServices.scanTextService.checkPermission() 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/AppDependencies.swift: -------------------------------------------------------------------------------- 1 | import DataLayer 2 | import SwiftUI 3 | 4 | public final class AppDependencies: Sendable { 5 | public let loggingSystemClient: LoggingSystemClient 6 | public let nsAppClient: NSAppClient 7 | public let nsCursorClient: NSCursorClient 8 | public let nsPasteboardClient: NSPasteboardClient 9 | public let nsSoundClient: NSSoundClient 10 | public let screenCaptureClient: ScreenCaptureClient 11 | public let spuUpdaterClient: SPUUpdaterClient 12 | public let textRecognitionClient: TextRecognitionClient 13 | public let windowSceneMessengerClient: WindowSceneMessengerClient 14 | 15 | public nonisolated init( 16 | loggingSystemClient: LoggingSystemClient = .liveValue, 17 | nsAppClient: NSAppClient = .liveValue, 18 | nsCursorClient: NSCursorClient = .liveValue, 19 | nsPasteboardClient: NSPasteboardClient = .liveValue, 20 | nsSoundClient: NSSoundClient = .liveValue, 21 | screenCaptureClient: ScreenCaptureClient = .liveValue, 22 | spuUpdaterClient: SPUUpdaterClient = .liveValue, 23 | textRecognitionClient: TextRecognitionClient = .liveValue, 24 | windowSceneMessengerClient: WindowSceneMessengerClient = .liveValue 25 | ) { 26 | self.loggingSystemClient = loggingSystemClient 27 | self.nsAppClient = nsAppClient 28 | self.nsCursorClient = nsCursorClient 29 | self.nsPasteboardClient = nsPasteboardClient 30 | self.nsSoundClient = nsSoundClient 31 | self.screenCaptureClient = screenCaptureClient 32 | self.spuUpdaterClient = spuUpdaterClient 33 | self.textRecognitionClient = textRecognitionClient 34 | self.windowSceneMessengerClient = windowSceneMessengerClient 35 | } 36 | } 37 | 38 | struct AppDependenciesKey: EnvironmentKey { 39 | static let defaultValue = AppDependencies() 40 | } 41 | 42 | public extension EnvironmentValues { 43 | var appDependencies: AppDependencies { 44 | get { self[AppDependenciesKey.self] } 45 | set { self[AppDependenciesKey.self] = newValue } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/AppServices.swift: -------------------------------------------------------------------------------- 1 | import DataLayer 2 | import SwiftUI 3 | 4 | public final class AppServices: Sendable { 5 | public let logService: LogService 6 | public let scanTextService: ScanTextService 7 | public let updateService: UpdateService 8 | 9 | public nonisolated init(appDependencies: AppDependencies) { 10 | logService = .init(appDependencies.loggingSystemClient) 11 | scanTextService = .init(appDependencies.screenCaptureClient, 12 | appDependencies.textRecognitionClient) 13 | updateService = .init(appDependencies.spuUpdaterClient) 14 | } 15 | } 16 | 17 | struct AppServicesKey: EnvironmentKey { 18 | static let defaultValue = AppServices(appDependencies: AppDependenciesKey.defaultValue) 19 | } 20 | 21 | public extension EnvironmentValues { 22 | var appServices: AppServices { 23 | get { self[AppServicesKey.self] } 24 | set { self[AppServicesKey.self] = newValue } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/Event/CriticalEvent.swift: -------------------------------------------------------------------------------- 1 | import Logging 2 | 3 | public enum CriticalEvent { 4 | case failedExecuteScript(any Error) 5 | 6 | public var message: Logger.Message { 7 | switch self { 8 | case .failedExecuteScript: 9 | "Failed to execute script." 10 | } 11 | } 12 | 13 | public var metadata: Logger.Metadata? { 14 | switch self { 15 | case let .failedExecuteScript(error): 16 | ["cause": "\(error.localizedDescription)"] 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/Event/ErrorEvent.swift: -------------------------------------------------------------------------------- 1 | import Logging 2 | 3 | public enum ErrorEvent { 4 | case none 5 | 6 | public var message: Logger.Message { "" } 7 | public var metadata: Logger.Metadata? { nil } 8 | } 9 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/Event/NoticeEvent.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Logging 3 | 4 | public enum NoticeEvent { 5 | case launchApp 6 | case screenView(name: String) 7 | 8 | public var message: Logger.Message { 9 | switch self { 10 | case .launchApp: 11 | "launch_app" 12 | case .screenView: 13 | "screen_view" 14 | } 15 | } 16 | 17 | public var metadata: Logger.Metadata? { 18 | switch self { 19 | case .launchApp: 20 | [:] 21 | case let .screenView(name): 22 | ["screen": .string(name)] 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/Service/LogService.swift: -------------------------------------------------------------------------------- 1 | import DataLayer 2 | import Foundation 3 | import Logging 4 | 5 | public actor LogService { 6 | private var hasAlreadyBootstrap = false 7 | private let loggingSystemClient: LoggingSystemClient 8 | 9 | public init(_ loggingSystemClient: LoggingSystemClient) { 10 | self.loggingSystemClient = loggingSystemClient 11 | } 12 | 13 | public func bootstrap() { 14 | guard !hasAlreadyBootstrap else { return } 15 | #if DEBUG 16 | loggingSystemClient.bootstrap { label in 17 | StreamLogHandler.standardOutput(label: label) 18 | } 19 | #endif 20 | hasAlreadyBootstrap = true 21 | } 22 | 23 | public nonisolated func notice( 24 | _ event: NoticeEvent, 25 | source: @autoclosure () -> String? = nil, 26 | file: String = #fileID, 27 | function: String = #function, 28 | line: UInt = #line 29 | ) { 30 | Logger(label: Bundle.main.bundleIdentifier!).notice( 31 | event.message, 32 | metadata: event.metadata, 33 | source: source(), 34 | file: file, 35 | function: function, 36 | line: line 37 | ) 38 | } 39 | 40 | public nonisolated func error( 41 | _ event: ErrorEvent, 42 | source: @autoclosure () -> String? = nil, 43 | file: String = #fileID, 44 | function: String = #function, 45 | line: UInt = #line 46 | ) { 47 | Logger(label: Bundle.main.bundleIdentifier!).error( 48 | event.message, 49 | metadata: event.metadata, 50 | source: source(), 51 | file: file, 52 | function: function, 53 | line: line 54 | ) 55 | } 56 | 57 | public nonisolated func critical( 58 | _ event: CriticalEvent, 59 | source: @autoclosure () -> String? = nil, 60 | file: String = #fileID, 61 | function: String = #function, 62 | line: UInt = #line 63 | ) { 64 | Logger(label: Bundle.main.bundleIdentifier!).critical( 65 | event.message, 66 | metadata: event.metadata, 67 | source: source(), 68 | file: file, 69 | function: function, 70 | line: line 71 | ) 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/Service/ScanTextService.swift: -------------------------------------------------------------------------------- 1 | import Combine 2 | import DataLayer 3 | import ScreenCaptureKit 4 | import Vision 5 | 6 | public actor ScanTextService { 7 | private let screenCaptureClient: ScreenCaptureClient 8 | private let textRecognitionClient: TextRecognitionClient 9 | 10 | public init( 11 | _ screenCaptureClient: ScreenCaptureClient, 12 | _ textRecognitionClient: TextRecognitionClient 13 | ) { 14 | self.screenCaptureClient = screenCaptureClient 15 | self.textRecognitionClient = textRecognitionClient 16 | } 17 | 18 | func checkPermission() async { 19 | _ = try? await screenCaptureClient.currentShareableContent() 20 | } 21 | 22 | func captureImage(_ windowID: CGWindowID, _ clippingRect: CGRect) async -> CGImage? { 23 | do { 24 | let currentContent = try await screenCaptureClient.currentShareableContent() 25 | guard let window = currentContent.windows.first(where: { $0.windowID == windowID }) else { 26 | return nil 27 | } 28 | let targetContent = try await screenCaptureClient.screenWindowsOnlyBelow(window) 29 | guard let display = targetContent.displays.first(where: { $0.frame.intersects(window.frame) }) else { 30 | return nil 31 | } 32 | let filter = SCContentFilter(display: display, including: targetContent.windows) 33 | filter.includeMenuBar = true 34 | let configuration = SCStreamConfiguration() 35 | configuration.captureResolution = .nominal 36 | configuration.sourceRect = clippingRect 37 | let scaleFactor = CGFloat(filter.pointPixelScale) 38 | configuration.width = Int(scaleFactor * clippingRect.width) 39 | configuration.height = Int(scaleFactor * clippingRect.height) 40 | let image = try await screenCaptureClient.captureImage(filter, configuration) 41 | return image 42 | } catch { 43 | return nil 44 | } 45 | } 46 | 47 | func textRecognize(_ cgImage: CGImage) async -> String? { 48 | do { 49 | var request = RecognizeTextRequest() 50 | request.recognitionLanguages = [.init(identifier: "ja")] 51 | let imageRequestHandler = ImageRequestHandler(cgImage, orientation: .up) 52 | let result = try await textRecognitionClient.perform(imageRequestHandler, request) 53 | return result.compactMap { $0.topCandidates(1).first?.string }.joined(separator: "\n") 54 | } catch { 55 | return nil 56 | } 57 | } 58 | } 59 | 60 | extension SCShareableContent: @retroactive @unchecked Sendable {} 61 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/Service/UpdateService.swift: -------------------------------------------------------------------------------- 1 | import Combine 2 | import DataLayer 3 | 4 | public actor UpdateService { 5 | private let spuUpdaterClient: SPUUpdaterClient 6 | 7 | public init(_ spuUpdaterClient: SPUUpdaterClient) { 8 | self.spuUpdaterClient = spuUpdaterClient 9 | } 10 | 11 | public func canChecksForUpdatesStream() -> AsyncStream { 12 | AsyncStream { continuation in 13 | let cancellable = spuUpdaterClient 14 | .canCheckForUpdatesPublisher() 15 | .sink { value in 16 | continuation.yield(value) 17 | } 18 | continuation.onTermination = { _ in 19 | cancellable.cancel() 20 | } 21 | } 22 | } 23 | 24 | public func checkForUpdates() { 25 | spuUpdaterClient.checkForUpdates() 26 | } 27 | } 28 | 29 | extension AnyCancellable: @retroactive @unchecked Sendable {} 30 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/String+Extension.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String { 4 | public static let screenshot = "screenshot" 5 | } 6 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/ViewModel/MenuViewModel.swift: -------------------------------------------------------------------------------- 1 | import DataLayer 2 | import Foundation 3 | import Observation 4 | 5 | @MainActor @Observable public final class MenuViewModel { 6 | private let nsAppClient: NSAppClient 7 | private let windowSceneMessengerClient: WindowSceneMessengerClient 8 | private let updateService: UpdateService 9 | 10 | @ObservationIgnored private var task: Task? 11 | 12 | public var canChecksForUpdates = false 13 | 14 | public init( 15 | _ nsAppClient: NSAppClient, 16 | _ windowSceneMessengerClient: WindowSceneMessengerClient, 17 | _ updateService: UpdateService 18 | ) { 19 | self.nsAppClient = nsAppClient 20 | self.windowSceneMessengerClient = windowSceneMessengerClient 21 | self.updateService = updateService 22 | task = Task { [weak self, updateService] in 23 | for await value in await updateService.canChecksForUpdatesStream() { 24 | self?.canChecksForUpdates = value 25 | } 26 | } 27 | } 28 | 29 | public func scanText() { 30 | nsAppClient.activate(true) 31 | windowSceneMessengerClient.request(.open, .screenshot, [:]) 32 | } 33 | 34 | public func activateApp() { 35 | nsAppClient.activate(true) 36 | } 37 | 38 | public func checkForUpdates() async { 39 | await updateService.checkForUpdates() 40 | } 41 | 42 | public func openAbout() { 43 | nsAppClient.activate(true) 44 | nsAppClient.orderFrontStandardAboutPanel(nil) 45 | } 46 | 47 | public func terminateApp() { 48 | nsAppClient.terminate(nil) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Domain/ViewModel/ScreenshotViewModel.swift: -------------------------------------------------------------------------------- 1 | import AppKit 2 | import CoreGraphics 3 | import DataLayer 4 | import Foundation 5 | import Observation 6 | 7 | @MainActor @Observable public final class ScreenshotViewModel { 8 | private let nsCursorClient: NSCursorClient 9 | private let nsPasteboardClient: NSPasteboardClient 10 | private let nsSoundClient: NSSoundClient 11 | private let windowSceneMessengerClient: WindowSceneMessengerClient 12 | private let logService: LogService 13 | private let scanTextService: ScanTextService 14 | private let windowID: CGWindowID 15 | 16 | public var clippingRect = CGRect.zero 17 | 18 | public init( 19 | _ nsCursorClient: NSCursorClient, 20 | _ nsPasteboardClient: NSPasteboardClient, 21 | _ nsSoundClient: NSSoundClient, 22 | _ windowSceneMessengerClient: WindowSceneMessengerClient, 23 | _ logService: LogService, 24 | _ scanTextService: ScanTextService, 25 | _ windowID: CGWindowID 26 | ) { 27 | self.nsCursorClient = nsCursorClient 28 | self.nsPasteboardClient = nsPasteboardClient 29 | self.nsSoundClient = nsSoundClient 30 | self.windowSceneMessengerClient = windowSceneMessengerClient 31 | self.logService = logService 32 | self.scanTextService = scanTextService 33 | self.windowID = windowID 34 | } 35 | 36 | public func onAppear(screenName: String) { 37 | logService.notice(.screenView(name: screenName)) 38 | } 39 | 40 | public func dragMoved(startLocation: CGPoint, location: CGPoint) { 41 | if !nsCursorClient.equal(.current, .crosshair) { 42 | nsCursorClient.push(.crosshair) 43 | } 44 | clippingRect = calcurateRect(startLocation, location) 45 | } 46 | 47 | public func dragEnded(startLocation: CGPoint, location: CGPoint) async { 48 | defer { 49 | windowSceneMessengerClient.request(.close, .screenshot, [:]) 50 | } 51 | nsCursorClient.pop() 52 | let rect = calcurateRect(startLocation, location) 53 | guard let cgImage = await scanTextService.captureImage(windowID, rect), 54 | let text = await scanTextService.textRecognize(cgImage) else { 55 | return 56 | } 57 | _ = nsPasteboardClient.clearContents() 58 | _ = nsPasteboardClient.declareTypes([.string], nil) 59 | if nsPasteboardClient.setString(text, .string), 60 | let sound = NSSound(named: "Tink") { 61 | nsSoundClient.play(sound) 62 | } 63 | } 64 | 65 | func calcurateRect(_ pointA: CGPoint, _ pointB: CGPoint) -> CGRect { 66 | let x = min(pointA.x, pointB.x) 67 | let y = min(pointA.y, pointB.y) 68 | let width = abs(pointA.x - pointB.x) 69 | let height = abs(pointA.y - pointB.y) 70 | return CGRect(x: x, y: y, width: width, height: height) 71 | } 72 | 73 | public func close() { 74 | windowSceneMessengerClient.request(.close, .screenshot, [:]) 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Presentation/Resources/Localizable.xcstrings: -------------------------------------------------------------------------------- 1 | { 2 | "sourceLanguage" : "en", 3 | "strings" : { 4 | "aboutApp" : { 5 | "localizations" : { 6 | "en" : { 7 | "stringUnit" : { 8 | "state" : "translated", 9 | "value" : "About TextScanner" 10 | } 11 | } 12 | } 13 | }, 14 | "checkForUpdates" : { 15 | "localizations" : { 16 | "en" : { 17 | "stringUnit" : { 18 | "state" : "translated", 19 | "value" : "Check for Updates…" 20 | } 21 | } 22 | } 23 | }, 24 | "scanText" : { 25 | "localizations" : { 26 | "en" : { 27 | "stringUnit" : { 28 | "state" : "translated", 29 | "value" : "Scan Text" 30 | } 31 | } 32 | } 33 | }, 34 | "terminateApp" : { 35 | "localizations" : { 36 | "en" : { 37 | "stringUnit" : { 38 | "state" : "translated", 39 | "value" : "Quit TextScanner" 40 | } 41 | } 42 | } 43 | } 44 | }, 45 | "version" : "1.0" 46 | } -------------------------------------------------------------------------------- /LocalPackage/Sources/Presentation/Scene/MenuBarScene.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | public struct MenuBarScene: Scene { 4 | @Environment(\.appDependencies) private var appDependencies 5 | @Environment(\.appServices) private var appServices 6 | 7 | public init() {} 8 | 9 | public var body: some Scene { 10 | MenuBarExtra { 11 | MenuView( 12 | nsAppClient: appDependencies.nsAppClient, 13 | windowSceneMessengerClient: appDependencies.windowSceneMessengerClient, 14 | updateService: appServices.updateService 15 | ) 16 | .environment(\.displayScale, 2.0) 17 | } label: { 18 | Image(systemName: "text.viewfinder") 19 | .environment(\.displayScale, 2.0) 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Presentation/Scene/ScreenshotScene.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import WindowSceneKit 3 | 4 | public struct ScreenshotScene: Scene { 5 | @Environment(\.appDependencies) private var appDependencies 6 | @Environment(\.appServices) private var appServices 7 | @Binding var isPresented: Bool 8 | 9 | public init(isPresented: Binding) { 10 | _isPresented = isPresented 11 | } 12 | 13 | public var body: some Scene { 14 | WindowScene(isPresented: $isPresented) { _ in 15 | ScreenshotWindow { windowID in 16 | ScreenshotView( 17 | nsCursorClient: appDependencies.nsCursorClient, 18 | nsPasteboardClient: appDependencies.nsPasteboardClient, 19 | nsSoundClient: appDependencies.nsSoundClient, 20 | windowSceneMessengerClient: appDependencies.windowSceneMessengerClient, 21 | logService: appServices.logService, 22 | scanTextService: appServices.scanTextService, 23 | windowID: windowID 24 | ) 25 | } 26 | } 27 | } 28 | } 29 | 30 | private final class ScreenshotWindow: NSWindow { 31 | init(@ViewBuilder content: (_ windowID: CGWindowID) -> Content) { 32 | super.init( 33 | contentRect: .zero, 34 | styleMask: [.fullSizeContentView], 35 | backing: .buffered, 36 | defer: false 37 | ) 38 | level = .popUpMenu 39 | collectionBehavior = [.canJoinAllSpaces] 40 | isOpaque = false 41 | hasShadow = false 42 | backgroundColor = NSColor(white: .zero, alpha: 0.02) 43 | contentView = NSHostingView(rootView: content(CGWindowID(windowNumber))) 44 | } 45 | 46 | override func center() { 47 | guard let frame = NSScreen.main?.frame else { return } 48 | setFrame(frame, display: false, animate: false) 49 | } 50 | 51 | override func orderFrontRegardless() { 52 | super.orderFrontRegardless() 53 | makeKey() 54 | } 55 | 56 | override var canBecomeKey: Bool { true } 57 | 58 | override func cancelOperation(_ sender: Any?) { 59 | close() 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Presentation/View/MenuView.swift: -------------------------------------------------------------------------------- 1 | import DataLayer 2 | import Domain 3 | import SwiftUI 4 | 5 | struct MenuView: View { 6 | @State private var viewModel: MenuViewModel 7 | 8 | init( 9 | nsAppClient: NSAppClient, 10 | windowSceneMessengerClient: WindowSceneMessengerClient, 11 | updateService: UpdateService 12 | ) { 13 | viewModel = .init(nsAppClient, windowSceneMessengerClient, updateService) 14 | } 15 | 16 | var body: some View { 17 | VStack { 18 | Button { 19 | viewModel.scanText() 20 | } label: { 21 | Text("scanText", bundle: .module) 22 | } 23 | Divider() 24 | Button { 25 | Task { 26 | await viewModel.checkForUpdates() 27 | } 28 | } label: { 29 | Text("checkForUpdates", bundle: .module) 30 | } 31 | .disabled(!viewModel.canChecksForUpdates) 32 | Button { 33 | viewModel.openAbout() 34 | } label: { 35 | Text("aboutApp", bundle: .module) 36 | } 37 | Button { 38 | viewModel.terminateApp() 39 | } label: { 40 | Text("terminateApp", bundle: .module) 41 | } 42 | } 43 | } 44 | } 45 | 46 | #Preview { 47 | MenuView( 48 | nsAppClient: .testValue, 49 | windowSceneMessengerClient: .testValue, 50 | updateService: .init(.testValue) 51 | ) 52 | } 53 | -------------------------------------------------------------------------------- /LocalPackage/Sources/Presentation/View/ScreenshotView.swift: -------------------------------------------------------------------------------- 1 | import DataLayer 2 | import Domain 3 | import SwiftUI 4 | 5 | struct ScreenshotView: View { 6 | @State private var viewModel: ScreenshotViewModel 7 | 8 | init( 9 | nsCursorClient: NSCursorClient, 10 | nsPasteboardClient: NSPasteboardClient, 11 | nsSoundClient: NSSoundClient, 12 | windowSceneMessengerClient: WindowSceneMessengerClient, 13 | logService: LogService, 14 | scanTextService: ScanTextService, 15 | windowID: CGWindowID 16 | ) { 17 | viewModel = .init(nsCursorClient, 18 | nsPasteboardClient, 19 | nsSoundClient, 20 | windowSceneMessengerClient, 21 | logService, 22 | scanTextService, 23 | windowID) 24 | } 25 | 26 | var body: some View { 27 | Canvas { context, size in 28 | var path = Path(CGRect(origin: .zero, size: size)) 29 | path.addRect(viewModel.clippingRect) 30 | context.fill(path, with: .color(.black.opacity(0.4)), style: .init(eoFill: true)) 31 | if !viewModel.clippingRect.size.equalTo(.zero) { 32 | context.stroke( 33 | Path(viewModel.clippingRect), 34 | with: .color(.white), 35 | style: .init(lineWidth: 1, dash: [5, 5]) 36 | ) 37 | context.stroke( 38 | Path(viewModel.clippingRect), 39 | with: .color(.black), 40 | style: .init(lineWidth: 1, dash: [5, 5], dashPhase: 5) 41 | ) 42 | } 43 | } 44 | .contentShape(Rectangle()) 45 | .gesture( 46 | DragGesture(minimumDistance: 0) 47 | .onChanged { value in 48 | viewModel.dragMoved(startLocation: value.startLocation, location: value.location) 49 | } 50 | .onEnded { value in 51 | Task { 52 | await viewModel.dragEnded(startLocation: value.startLocation, location: value.location) 53 | } 54 | } 55 | ) 56 | .onAppear { 57 | viewModel.onAppear(screenName: String(describing: Self.self)) 58 | } 59 | .overlay(alignment: .topTrailing) { 60 | Button { 61 | viewModel.close() 62 | } label: { 63 | Image(systemName: "xmark.circle.fill") 64 | .resizable() 65 | .frame(width: 32, height: 32) 66 | } 67 | .buttonStyle(.borderless) 68 | .padding() 69 | } 70 | } 71 | } 72 | 73 | #Preview { 74 | ScreenshotView( 75 | nsCursorClient: .testValue, 76 | nsPasteboardClient: .testValue, 77 | nsSoundClient: .testValue, 78 | windowSceneMessengerClient: .testValue, 79 | logService: .init(.testValue), 80 | scanTextService: .init(.testValue, .testValue), 81 | windowID: .zero 82 | ) 83 | } 84 | -------------------------------------------------------------------------------- /LocalPackage/Tests/DomainTests/DomainTests.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/LocalPackage/Tests/DomainTests/DomainTests.swift -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TextScanner 2 | 3 | Scan text from screenshot. 4 | 5 | ![Demo GIF](./materials/demo.gif) 6 | 7 | ## Installation 8 | 9 | TextScanner works on macOS 15.0 or later. 10 | 11 | 1. Download `Installer.dmg` from [releases](https://github.com/Kyome22/TextScanner/releases) page. 12 | 2. Double-click on the `Installer.dmg`. 13 | 3. Copy the App to the Applications folder. 14 | -------------------------------------------------------------------------------- /TextScanner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 77; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1CAE4BBE2D3B8E3500EBBE15 /* Domain in Frameworks */ = {isa = PBXBuildFile; productRef = 1CAE4BBD2D3B8E3500EBBE15 /* Domain */; }; 11 | 1CAE4BC02D3B8E3500EBBE15 /* Presentation in Frameworks */ = {isa = PBXBuildFile; productRef = 1CAE4BBF2D3B8E3500EBBE15 /* Presentation */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | 1C5CF5502D3B7E720090F963 /* Vision.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Vision.framework; path = System/Library/Frameworks/Vision.framework; sourceTree = SDKROOT; }; 16 | 1CD5D7DB2D353CC60088B889 /* TextScanner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TextScanner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 17 | 1CD5D7F42D353DBE0088B889 /* LocalPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = LocalPackage; sourceTree = ""; }; 18 | /* End PBXFileReference section */ 19 | 20 | /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ 21 | 1CD5D7FB2D37A3410088B889 /* Exceptions for "TextScanner" folder in "TextScanner" target */ = { 22 | isa = PBXFileSystemSynchronizedBuildFileExceptionSet; 23 | membershipExceptions = ( 24 | Info.plist, 25 | ); 26 | target = 1CD5D7DA2D353CC60088B889 /* TextScanner */; 27 | }; 28 | /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ 29 | 30 | /* Begin PBXFileSystemSynchronizedRootGroup section */ 31 | 1CD5D7DD2D353CC60088B889 /* TextScanner */ = { 32 | isa = PBXFileSystemSynchronizedRootGroup; 33 | exceptions = ( 34 | 1CD5D7FB2D37A3410088B889 /* Exceptions for "TextScanner" folder in "TextScanner" target */, 35 | ); 36 | path = TextScanner; 37 | sourceTree = ""; 38 | }; 39 | /* End PBXFileSystemSynchronizedRootGroup section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | 1CD5D7D82D353CC60088B889 /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | 1CAE4BC02D3B8E3500EBBE15 /* Presentation in Frameworks */, 47 | 1CAE4BBE2D3B8E3500EBBE15 /* Domain in Frameworks */, 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | /* End PBXFrameworksBuildPhase section */ 52 | 53 | /* Begin PBXGroup section */ 54 | 1CD5D7D22D353CC60088B889 = { 55 | isa = PBXGroup; 56 | children = ( 57 | 1CD5D7F42D353DBE0088B889 /* LocalPackage */, 58 | 1CD5D7DD2D353CC60088B889 /* TextScanner */, 59 | 1CD5D7F52D35401B0088B889 /* Frameworks */, 60 | 1CD5D7DC2D353CC60088B889 /* Products */, 61 | ); 62 | sourceTree = ""; 63 | }; 64 | 1CD5D7DC2D353CC60088B889 /* Products */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 1CD5D7DB2D353CC60088B889 /* TextScanner.app */, 68 | ); 69 | name = Products; 70 | sourceTree = ""; 71 | }; 72 | 1CD5D7F52D35401B0088B889 /* Frameworks */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 1C5CF5502D3B7E720090F963 /* Vision.framework */, 76 | ); 77 | name = Frameworks; 78 | sourceTree = ""; 79 | }; 80 | /* End PBXGroup section */ 81 | 82 | /* Begin PBXNativeTarget section */ 83 | 1CD5D7DA2D353CC60088B889 /* TextScanner */ = { 84 | isa = PBXNativeTarget; 85 | buildConfigurationList = 1CD5D7EA2D353CC80088B889 /* Build configuration list for PBXNativeTarget "TextScanner" */; 86 | buildPhases = ( 87 | 1CD5D7D72D353CC60088B889 /* Sources */, 88 | 1CD5D7D82D353CC60088B889 /* Frameworks */, 89 | 1CD5D7D92D353CC60088B889 /* Resources */, 90 | ); 91 | buildRules = ( 92 | ); 93 | dependencies = ( 94 | ); 95 | fileSystemSynchronizedGroups = ( 96 | 1CD5D7DD2D353CC60088B889 /* TextScanner */, 97 | ); 98 | name = TextScanner; 99 | packageProductDependencies = ( 100 | 1CAE4BBD2D3B8E3500EBBE15 /* Domain */, 101 | 1CAE4BBF2D3B8E3500EBBE15 /* Presentation */, 102 | ); 103 | productName = TextScanner; 104 | productReference = 1CD5D7DB2D353CC60088B889 /* TextScanner.app */; 105 | productType = "com.apple.product-type.application"; 106 | }; 107 | /* End PBXNativeTarget section */ 108 | 109 | /* Begin PBXProject section */ 110 | 1CD5D7D32D353CC60088B889 /* Project object */ = { 111 | isa = PBXProject; 112 | attributes = { 113 | BuildIndependentTargetsInParallel = 1; 114 | LastSwiftUpdateCheck = 1620; 115 | LastUpgradeCheck = 1620; 116 | TargetAttributes = { 117 | 1CD5D7DA2D353CC60088B889 = { 118 | CreatedOnToolsVersion = 16.2; 119 | }; 120 | }; 121 | }; 122 | buildConfigurationList = 1CD5D7D62D353CC60088B889 /* Build configuration list for PBXProject "TextScanner" */; 123 | developmentRegion = en; 124 | hasScannedForEncodings = 0; 125 | knownRegions = ( 126 | en, 127 | Base, 128 | ); 129 | mainGroup = 1CD5D7D22D353CC60088B889; 130 | minimizedProjectReferenceProxies = 1; 131 | preferredProjectObjectVersion = 77; 132 | productRefGroup = 1CD5D7DC2D353CC60088B889 /* Products */; 133 | projectDirPath = ""; 134 | projectRoot = ""; 135 | targets = ( 136 | 1CD5D7DA2D353CC60088B889 /* TextScanner */, 137 | ); 138 | }; 139 | /* End PBXProject section */ 140 | 141 | /* Begin PBXResourcesBuildPhase section */ 142 | 1CD5D7D92D353CC60088B889 /* Resources */ = { 143 | isa = PBXResourcesBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | ); 147 | runOnlyForDeploymentPostprocessing = 0; 148 | }; 149 | /* End PBXResourcesBuildPhase section */ 150 | 151 | /* Begin PBXSourcesBuildPhase section */ 152 | 1CD5D7D72D353CC60088B889 /* Sources */ = { 153 | isa = PBXSourcesBuildPhase; 154 | buildActionMask = 2147483647; 155 | files = ( 156 | ); 157 | runOnlyForDeploymentPostprocessing = 0; 158 | }; 159 | /* End PBXSourcesBuildPhase section */ 160 | 161 | /* Begin XCBuildConfiguration section */ 162 | 1CD5D7E82D353CC80088B889 /* Debug */ = { 163 | isa = XCBuildConfiguration; 164 | buildSettings = { 165 | ALWAYS_SEARCH_USER_PATHS = NO; 166 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 167 | CLANG_ANALYZER_NONNULL = YES; 168 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 169 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 170 | CLANG_ENABLE_MODULES = YES; 171 | CLANG_ENABLE_OBJC_ARC = YES; 172 | CLANG_ENABLE_OBJC_WEAK = YES; 173 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 174 | CLANG_WARN_BOOL_CONVERSION = YES; 175 | CLANG_WARN_COMMA = YES; 176 | CLANG_WARN_CONSTANT_CONVERSION = YES; 177 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 178 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 179 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 180 | CLANG_WARN_EMPTY_BODY = YES; 181 | CLANG_WARN_ENUM_CONVERSION = YES; 182 | CLANG_WARN_INFINITE_RECURSION = YES; 183 | CLANG_WARN_INT_CONVERSION = YES; 184 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 185 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 186 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 187 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 188 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 189 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 190 | CLANG_WARN_STRICT_PROTOTYPES = YES; 191 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 192 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 193 | CLANG_WARN_UNREACHABLE_CODE = YES; 194 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 195 | COPY_PHASE_STRIP = NO; 196 | DEBUG_INFORMATION_FORMAT = dwarf; 197 | ENABLE_STRICT_OBJC_MSGSEND = YES; 198 | ENABLE_TESTABILITY = YES; 199 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 200 | GCC_C_LANGUAGE_STANDARD = gnu17; 201 | GCC_DYNAMIC_NO_PIC = NO; 202 | GCC_NO_COMMON_BLOCKS = YES; 203 | GCC_OPTIMIZATION_LEVEL = 0; 204 | GCC_PREPROCESSOR_DEFINITIONS = ( 205 | "DEBUG=1", 206 | "$(inherited)", 207 | ); 208 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 209 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 210 | GCC_WARN_UNDECLARED_SELECTOR = YES; 211 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 212 | GCC_WARN_UNUSED_FUNCTION = YES; 213 | GCC_WARN_UNUSED_VARIABLE = YES; 214 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 215 | MACOSX_DEPLOYMENT_TARGET = 15.0; 216 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 217 | MTL_FAST_MATH = YES; 218 | ONLY_ACTIVE_ARCH = YES; 219 | SDKROOT = macosx; 220 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 221 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 222 | }; 223 | name = Debug; 224 | }; 225 | 1CD5D7E92D353CC80088B889 /* Release */ = { 226 | isa = XCBuildConfiguration; 227 | buildSettings = { 228 | ALWAYS_SEARCH_USER_PATHS = NO; 229 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 230 | CLANG_ANALYZER_NONNULL = YES; 231 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 232 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 233 | CLANG_ENABLE_MODULES = YES; 234 | CLANG_ENABLE_OBJC_ARC = YES; 235 | CLANG_ENABLE_OBJC_WEAK = YES; 236 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 237 | CLANG_WARN_BOOL_CONVERSION = YES; 238 | CLANG_WARN_COMMA = YES; 239 | CLANG_WARN_CONSTANT_CONVERSION = YES; 240 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 241 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 242 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 243 | CLANG_WARN_EMPTY_BODY = YES; 244 | CLANG_WARN_ENUM_CONVERSION = YES; 245 | CLANG_WARN_INFINITE_RECURSION = YES; 246 | CLANG_WARN_INT_CONVERSION = YES; 247 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 248 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 249 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 250 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 251 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 252 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 253 | CLANG_WARN_STRICT_PROTOTYPES = YES; 254 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 255 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 256 | CLANG_WARN_UNREACHABLE_CODE = YES; 257 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 258 | COPY_PHASE_STRIP = NO; 259 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 260 | ENABLE_NS_ASSERTIONS = NO; 261 | ENABLE_STRICT_OBJC_MSGSEND = YES; 262 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 263 | GCC_C_LANGUAGE_STANDARD = gnu17; 264 | GCC_NO_COMMON_BLOCKS = YES; 265 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 266 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 267 | GCC_WARN_UNDECLARED_SELECTOR = YES; 268 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 269 | GCC_WARN_UNUSED_FUNCTION = YES; 270 | GCC_WARN_UNUSED_VARIABLE = YES; 271 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 272 | MACOSX_DEPLOYMENT_TARGET = 15.0; 273 | MTL_ENABLE_DEBUG_INFO = NO; 274 | MTL_FAST_MATH = YES; 275 | SDKROOT = macosx; 276 | SWIFT_COMPILATION_MODE = wholemodule; 277 | }; 278 | name = Release; 279 | }; 280 | 1CD5D7EB2D353CC80088B889 /* Debug */ = { 281 | isa = XCBuildConfiguration; 282 | buildSettings = { 283 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 284 | CODE_SIGN_ENTITLEMENTS = TextScanner/TextScanner.entitlements; 285 | CODE_SIGN_STYLE = Automatic; 286 | COMBINE_HIDPI_IMAGES = YES; 287 | CURRENT_PROJECT_VERSION = 1.1.0; 288 | DEVELOPMENT_TEAM = VJ5N2X84K8; 289 | ENABLE_HARDENED_RUNTIME = YES; 290 | ENABLE_PREVIEWS = YES; 291 | GENERATE_INFOPLIST_FILE = YES; 292 | INFOPLIST_FILE = TextScanner/Info.plist; 293 | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; 294 | INFOPLIST_KEY_LSUIElement = YES; 295 | INFOPLIST_KEY_NSHumanReadableCopyright = "© 2025 Takuto Nakamura."; 296 | LD_RUNPATH_SEARCH_PATHS = ( 297 | "$(inherited)", 298 | "@executable_path/../Frameworks", 299 | ); 300 | MARKETING_VERSION = 1.1; 301 | PRODUCT_BUNDLE_IDENTIFIER = com.kyome.TextScanner; 302 | PRODUCT_NAME = "$(TARGET_NAME)"; 303 | SWIFT_EMIT_LOC_STRINGS = YES; 304 | SWIFT_VERSION = 6.0; 305 | }; 306 | name = Debug; 307 | }; 308 | 1CD5D7EC2D353CC80088B889 /* Release */ = { 309 | isa = XCBuildConfiguration; 310 | buildSettings = { 311 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 312 | CODE_SIGN_ENTITLEMENTS = TextScanner/TextScanner.entitlements; 313 | CODE_SIGN_STYLE = Automatic; 314 | COMBINE_HIDPI_IMAGES = YES; 315 | CURRENT_PROJECT_VERSION = 1.1.0; 316 | DEVELOPMENT_TEAM = VJ5N2X84K8; 317 | ENABLE_HARDENED_RUNTIME = YES; 318 | ENABLE_PREVIEWS = YES; 319 | GENERATE_INFOPLIST_FILE = YES; 320 | INFOPLIST_FILE = TextScanner/Info.plist; 321 | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; 322 | INFOPLIST_KEY_LSUIElement = YES; 323 | INFOPLIST_KEY_NSHumanReadableCopyright = "© 2025 Takuto Nakamura."; 324 | LD_RUNPATH_SEARCH_PATHS = ( 325 | "$(inherited)", 326 | "@executable_path/../Frameworks", 327 | ); 328 | MARKETING_VERSION = 1.1; 329 | PRODUCT_BUNDLE_IDENTIFIER = com.kyome.TextScanner; 330 | PRODUCT_NAME = "$(TARGET_NAME)"; 331 | SWIFT_EMIT_LOC_STRINGS = YES; 332 | SWIFT_VERSION = 6.0; 333 | }; 334 | name = Release; 335 | }; 336 | /* End XCBuildConfiguration section */ 337 | 338 | /* Begin XCConfigurationList section */ 339 | 1CD5D7D62D353CC60088B889 /* Build configuration list for PBXProject "TextScanner" */ = { 340 | isa = XCConfigurationList; 341 | buildConfigurations = ( 342 | 1CD5D7E82D353CC80088B889 /* Debug */, 343 | 1CD5D7E92D353CC80088B889 /* Release */, 344 | ); 345 | defaultConfigurationIsVisible = 0; 346 | defaultConfigurationName = Release; 347 | }; 348 | 1CD5D7EA2D353CC80088B889 /* Build configuration list for PBXNativeTarget "TextScanner" */ = { 349 | isa = XCConfigurationList; 350 | buildConfigurations = ( 351 | 1CD5D7EB2D353CC80088B889 /* Debug */, 352 | 1CD5D7EC2D353CC80088B889 /* Release */, 353 | ); 354 | defaultConfigurationIsVisible = 0; 355 | defaultConfigurationName = Release; 356 | }; 357 | /* End XCConfigurationList section */ 358 | 359 | /* Begin XCSwiftPackageProductDependency section */ 360 | 1CAE4BBD2D3B8E3500EBBE15 /* Domain */ = { 361 | isa = XCSwiftPackageProductDependency; 362 | productName = Domain; 363 | }; 364 | 1CAE4BBF2D3B8E3500EBBE15 /* Presentation */ = { 365 | isa = XCSwiftPackageProductDependency; 366 | productName = Presentation; 367 | }; 368 | /* End XCSwiftPackageProductDependency section */ 369 | }; 370 | rootObject = 1CD5D7D32D353CC60088B889 /* Project object */; 371 | } 372 | -------------------------------------------------------------------------------- /TextScanner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TextScanner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "originHash" : "d05f29fa0b140f0290b9e1225b71f2e6cc169ad6f3db12a4a5150161a2e8c02d", 3 | "pins" : [ 4 | { 5 | "identity" : "sparkle", 6 | "kind" : "remoteSourceControl", 7 | "location" : "https://github.com/sparkle-project/Sparkle.git", 8 | "state" : { 9 | "revision" : "0ef1ee0220239b3776f433314515fd849025673f", 10 | "version" : "2.6.4" 11 | } 12 | }, 13 | { 14 | "identity" : "swift-log", 15 | "kind" : "remoteSourceControl", 16 | "location" : "https://github.com/apple/swift-log.git", 17 | "state" : { 18 | "revision" : "96a2f8a0fa41e9e09af4585e2724c4e825410b91", 19 | "version" : "1.6.2" 20 | } 21 | }, 22 | { 23 | "identity" : "windowscenekit", 24 | "kind" : "remoteSourceControl", 25 | "location" : "https://github.com/Kyome22/WindowSceneKit.git", 26 | "state" : { 27 | "revision" : "dd80b2169b64761b986d7185ba528def719656d8", 28 | "version" : "1.1.0" 29 | } 30 | } 31 | ], 32 | "version" : 3 33 | } 34 | -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon_16x16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "icon_16x16@2x.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "icon_32x32.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "icon_32x32@2x.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "icon_128x128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "icon_128x128@2x.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "icon_256x256.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "icon_256x256@2x.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "icon_512x512.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "icon_512x512@2x.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/AppIcon.appiconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/TextScanner/Assets.xcassets/AppIcon.appiconset/icon_128x128.png -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/TextScanner/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/AppIcon.appiconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/TextScanner/Assets.xcassets/AppIcon.appiconset/icon_16x16.png -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/TextScanner/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/AppIcon.appiconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/TextScanner/Assets.xcassets/AppIcon.appiconset/icon_256x256.png -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/TextScanner/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/AppIcon.appiconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/TextScanner/Assets.xcassets/AppIcon.appiconset/icon_32x32.png -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/TextScanner/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/AppIcon.appiconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/TextScanner/Assets.xcassets/AppIcon.appiconset/icon_512x512.png -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/TextScanner/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /TextScanner/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /TextScanner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ITSAppUsesNonExemptEncryption 6 | 7 | SUFeedURL 8 | https://raw.githubusercontent.com/Kyome22/TextScanner/main/appcast.xml 9 | SUPublicEDKey 10 | sluXMipVziYgkZOrrbO59J51dGAj0bFgFEDydaRi52k= 11 | 12 | 13 | -------------------------------------------------------------------------------- /TextScanner/TextScanner.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TextScanner/TextScannerApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextScannerApp.swift 3 | // TextScanner 4 | // 5 | // Created by Takuto Nakamura on 2025/01/13. 6 | // 7 | 8 | import Domain 9 | import Presentation 10 | import SwiftUI 11 | import WindowSceneKit 12 | import Vision 13 | 14 | @main 15 | struct TextScannerApp: App { 16 | @NSApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate 17 | @WindowState(.screenshot) private var isPresented = false 18 | 19 | var body: some Scene { 20 | MenuBarScene() 21 | ScreenshotScene(isPresented: $isPresented) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /UPDATE.md: -------------------------------------------------------------------------------- 1 | 1. バージョン番号を上げてアーカイブビルドする 2 | 2. dmg を作る 3 | ```sh 4 | ./bin/create_dmg.sh リリースアーカイブした.appのパス 5 | ``` 6 | 3. `appcast.xml`を作る 7 | ```sh 8 | ./bin/generate_appcast --account com.kyome.TextScanner . 9 | ``` 10 | 4. `appcast.xml`の`enclosure`タグの`url`を GitHub の Release 添付ファイルリンクに変更 11 | ```diff xml 12 | - 13 | + 14 | ``` 15 | 5. タグを打つ 16 | 6. GitHub の Release を Publish して`Installer.dmg`をアップロード 17 | -------------------------------------------------------------------------------- /appcast.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TextScanner 5 | 6 | 1.1 7 | Wed, 05 Feb 2025 23:46:30 +0900 8 | 1.1.0 9 | 1.1 10 | 15.0 11 | 12 | 13 | 14 | 1.0 15 | Thu, 23 Jan 2025 22:47:20 +0900 16 | 1.0.0 17 | 1.0 18 | 15.0 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /bin/create_dmg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ## https://github.com/create-dmg/create-dmg 3 | 4 | create-dmg \ 5 | --icon-size 128 \ 6 | --text-size 16 \ 7 | --icon "TextScanner.app" 200 150 \ 8 | --app-drop-link 450 150 \ 9 | --window-pos 200 200 \ 10 | --window-size 650 376 \ 11 | --background bin/dmg_background.png \ 12 | Installer.dmg $1 13 | -------------------------------------------------------------------------------- /bin/dmg_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/bin/dmg_background.png -------------------------------------------------------------------------------- /bin/generate_appcast: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/bin/generate_appcast -------------------------------------------------------------------------------- /bin/generate_keys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/bin/generate_keys -------------------------------------------------------------------------------- /materials/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/materials/demo.gif -------------------------------------------------------------------------------- /materials/scan_icon.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/materials/scan_icon.ai -------------------------------------------------------------------------------- /materials/scan_icon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kyome22/TextScanner/1db36f9e887796d22c43cd86e28865ac52ee588b/materials/scan_icon.psd --------------------------------------------------------------------------------