├── .gitignore
├── Code Previewer
├── Base.lproj
│ └── PreviewViewController.xib
├── Code_Previewer.entitlements
├── Common.swift
├── Highlight.js Licence
├── Highlightr Licence
├── Info.plist
└── PreviewViewController.swift
├── Code Thumbnailer
├── Code_Thumbnailer.entitlements
├── Info.plist
└── ThumbnailProvider.swift
├── LICENSE.md
├── PreviewCode.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── swiftpm
│ │ └── Package.resolved
└── xcshareddata
│ └── xcschemes
│ ├── Code Previewer.xcscheme
│ ├── Code Thumbnailer.xcscheme
│ └── PreviewCode.xcscheme
├── PreviewCode
├── AppDelegate.swift
├── Base.lproj
│ └── MainMenu.xib
├── Constants.swift
├── GenericExtensions.swift
├── GenericFontExtensions.swift
├── Info.plist
├── PCImageView.swift
├── PMFont.swift
├── PreviewCode.entitlements
├── PreviewTextView.swift
├── ThemeTableCellView.swift
├── code-sample.txt
├── themes-list.json
└── themes-list.txt
├── PreviewCodeTests
├── Info.plist
└── PreviewCodeTests.swift
├── PreviewCodeUITests
├── Info.plist
└── PreviewCodeUITests.swift
├── README.md
└── qr-code.jpg
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## User settings
6 | xcuserdata/
7 |
8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
9 | *.xcscmblueprint
10 | *.xccheckout
11 |
12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
13 | build/
14 | DerivedData/
15 | *.moved-aside
16 | *.pbxuser
17 | !default.pbxuser
18 | *.mode1v3
19 | !default.mode1v3
20 | *.mode2v3
21 | !default.mode2v3
22 | *.perspectivev3
23 | !default.perspectivev3
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 |
28 | ## App packaging
29 | *.ipa
30 | *.dSYM.zip
31 | *.dSYM
32 |
33 | ## Playgrounds
34 | timeline.xctimeline
35 | playground.xcworkspace
36 |
37 | # Swift Package Manager
38 | #
39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
40 | # Packages/
41 | # Package.pins
42 | # Package.resolved
43 | # *.xcodeproj
44 | #
45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
46 | # hence it is not needed unless you have added a package configuration file to your project
47 | # .swiftpm
48 |
49 | .build/
50 |
51 | # CocoaPods
52 | #
53 | # We recommend against adding the Pods directory to your .gitignore. However
54 | # you should judge for yourself, the pros and cons are mentioned at:
55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
56 | #
57 | # Pods/
58 | #
59 | # Add this line if you want to avoid checking in source code from the Xcode workspace
60 | # *.xcworkspace
61 |
62 | # Carthage
63 | #
64 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
65 | # Carthage/Checkouts
66 |
67 | Carthage/Build/
68 |
69 | # Accio dependency management
70 | Dependencies/
71 | .accio/
72 |
73 | # fastlane
74 | #
75 | # It is recommended to not store the screenshots in the git repo.
76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed.
77 | # For more information about the recommended setup visit:
78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
79 |
80 | fastlane/report.xml
81 | fastlane/Preview.html
82 | fastlane/screenshots/**/*.png
83 | fastlane/test_output
84 |
85 | # Code Injection
86 | #
87 | # After new code Injection tools there's a generated folder /iOSInjectionProject
88 | # https://github.com/johnno1962/injectionforxcode
89 |
90 | iOSInjectionProject/
91 |
--------------------------------------------------------------------------------
/Code Previewer/Base.lproj/PreviewViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/Code Previewer/Code_Previewer.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.application-groups
8 |
9 | $(TeamIdentifierPrefix)suite.preview-code
10 |
11 | com.apple.security.files.user-selected.read-only
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Code Previewer/Common.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * Common.swift
3 | * PreviewCode
4 | * Code common to Code Previewer and Code Thumbnailer
5 | *
6 | * Created by Tony Smith on 30/05/2021.
7 | * Copyright © 2024 Tony Smith. All rights reserved.
8 | */
9 |
10 |
11 | import Foundation
12 | import AppKit
13 | import UniformTypeIdentifiers
14 | import Highlighter
15 |
16 |
17 | // FROM 1.1.0
18 | // Implement as a class
19 | final class Common: NSObject {
20 |
21 | // MARK: - Public Properties
22 |
23 | var themeBackgroundColour: NSColor = NSColor.white
24 | var isThemeDark: Bool = false
25 | var initError: Bool = false
26 |
27 |
28 | // MARK: - Private Properties
29 |
30 | private var font: NSFont? = nil
31 | private var highlighter: Highlighter? = nil
32 | // FROM 1.3.0
33 | private var lineSpacing: CGFloat = BUFFOON_CONSTANTS.DEFAULT_LINE_SPACING
34 | private var fontSize: CGFloat = CGFloat(BUFFOON_CONSTANTS.THEME_PREVIEW_FONT_SIZE)
35 |
36 | /*
37 | Replace the following string with your own team ID. This is used to
38 | identify the app suite and so share preferences set by the main app with
39 | the previewer and thumbnailer extensions.
40 | */
41 | private var appSuiteName: String = MNU_SECRETS.PID
42 |
43 |
44 | // MARK: - Lifecycle Functions
45 |
46 | init(_ isThumbnail: Bool) {
47 |
48 | super.init()
49 |
50 | // Set local values with default properties
51 | var highlightJsThemeName: String = BUFFOON_CONSTANTS.DEFAULT_THEME
52 | var lightThemeName: String = BUFFOON_CONSTANTS.DEFAULT_THEME_LIGHT
53 | var darkThemeName: String = BUFFOON_CONSTANTS.DEFAULT_THEME_DARK
54 | var themeMode: Int = BUFFOON_CONSTANTS.DISPLAY_MODE.AUTO
55 | var fontName: String = BUFFOON_CONSTANTS.DEFAULT_FONT
56 |
57 | // Read in the user preferences to update the above values
58 | if let defaults: UserDefaults = UserDefaults(suiteName: self.appSuiteName + BUFFOON_CONSTANTS.SUITE_NAME) {
59 | if !isThumbnail {
60 | self.fontSize = CGFloat(defaults.float(forKey: BUFFOON_CONSTANTS.PREFS_IDS.PREVIEW_FONT_SIZE))
61 |
62 | // FROM 1.3.0
63 | // Get set theme names for UI mode
64 | lightThemeName = defaults.string(forKey: BUFFOON_CONSTANTS.PREFS_IDS.PREVIEW_LIGHT_NAME) ?? BUFFOON_CONSTANTS.DEFAULT_THEME_LIGHT
65 | darkThemeName = defaults.string(forKey: BUFFOON_CONSTANTS.PREFS_IDS.PREVIEW_DARK_NAME) ?? BUFFOON_CONSTANTS.DEFAULT_THEME_DARK
66 | themeMode = defaults.integer(forKey: BUFFOON_CONSTANTS.PREFS_IDS.PREVIEW_THEME_MODE)
67 |
68 | // FROM 1.3.0
69 | // Get line spacing (not yet exposed in UI)
70 | self.lineSpacing = CGFloat(defaults.float(forKey: BUFFOON_CONSTANTS.PREFS_IDS.PREVIEW_LINE_SPACING))
71 | }
72 |
73 | fontName = defaults.string(forKey: BUFFOON_CONSTANTS.PREFS_IDS.PREVIEW_FONT_NAME) ?? BUFFOON_CONSTANTS.DEFAULT_FONT
74 | }
75 |
76 | // Set instance theme-related properties
77 | if isThumbnail {
78 | // Thumbnails use fixed, light-on-dark values
79 | highlightJsThemeName = setTheme(BUFFOON_CONSTANTS.DEFAULT_THUMB_THEME)
80 | self.fontSize = CGFloat(BUFFOON_CONSTANTS.BASE_THUMBNAIL_FONT_SIZE)
81 | } else {
82 | // Set preview theme details
83 | // FROM 1.3.0 -- adjust by current state or user setting
84 | switch(themeMode) {
85 | case BUFFOON_CONSTANTS.DISPLAY_MODE.LIGHT:
86 | highlightJsThemeName = setTheme(lightThemeName)
87 | self.isThemeDark = false
88 | case BUFFOON_CONSTANTS.DISPLAY_MODE.DARK:
89 | highlightJsThemeName = setTheme(darkThemeName)
90 | self.isThemeDark = true
91 | default:
92 | let isLight: Bool = isMacInLightMode()
93 | highlightJsThemeName = isLight ? setTheme(lightThemeName) : setTheme(darkThemeName)
94 | self.isThemeDark = !isLight
95 | }
96 |
97 | // Just in case the above block reads in zero value for the preview font size
98 | if self.fontSize < BUFFOON_CONSTANTS.FONT_SIZE_OPTIONS[0] ||
99 | self.fontSize > BUFFOON_CONSTANTS.FONT_SIZE_OPTIONS[BUFFOON_CONSTANTS.FONT_SIZE_OPTIONS.count - 1] {
100 | self.fontSize = CGFloat(BUFFOON_CONSTANTS.BASE_PREVIEW_FONT_SIZE)
101 | }
102 | }
103 |
104 | // Generate the font we'll use, at the required size
105 | if let chosenFont: NSFont = NSFont.init(name: fontName, size: self.fontSize) {
106 | self.font = chosenFont
107 | } else {
108 | self.font = NSFont.systemFont(ofSize: self.fontSize)
109 | }
110 |
111 | // Instantiate the instance's highlighter
112 | if let hr: Highlighter = Highlighter.init() {
113 | hr.setTheme(highlightJsThemeName)
114 | hr.theme.setCodeFont(self.font!)
115 |
116 | // Requires HighligherSwift 1.1.3
117 | if !isThumbnail {
118 | hr.theme.lineSpacing = (self.lineSpacing - 1.0) * self.fontSize
119 | }
120 |
121 | self.themeBackgroundColour = hr.theme.themeBackgroundColour
122 | self.highlighter = hr
123 | } else {
124 | // TODO Need a better notification for
125 | // highlighter instantiation errors
126 | self.initError = true
127 | }
128 | }
129 |
130 |
131 | // MARK: - The Primary Function
132 |
133 | /**
134 | Use HightlightSwift to style the source code string.
135 |
136 | - Parameters:
137 | - codeFileString: The raw source code.
138 | - language: The source code language, eg. `swift`.
139 |
140 | - Returns: The rendered source as an NSAttributedString.
141 | */
142 | func getAttributedString(_ codeFileString: String, _ language: String) -> NSAttributedString {
143 |
144 | // Run the specified code string through Highlightr/Highlight.js
145 | var renderedString: NSAttributedString? = nil
146 |
147 | // FROM 1.3.0
148 | //let spacedParaStyle: NSMutableParagraphStyle = NSMutableParagraphStyle.init()
149 | //spacedParaStyle.lineSpacing = (self.lineSpacing - 1.0) * self.fontSize
150 |
151 | if let hr: Highlighter = self.highlighter {
152 | renderedString = hr.highlight(codeFileString, as: language)
153 | }
154 |
155 | // If the rendered string is good, return it
156 | if let ras: NSAttributedString = renderedString {
157 | // Trap any incorrectly parsed language names
158 | if (ras.string != "undefined") {
159 | // FROM 1.2.0
160 | // During debugging, add language name to preview
161 | #if DEBUG
162 | let debugAtts: [NSAttributedString.Key : Any] = [
163 | .foregroundColor: NSColor.red,
164 | .font: self.font!
165 | ]
166 |
167 | let hs: NSMutableAttributedString = NSMutableAttributedString.init(string: "Language: \(language)\n", attributes: debugAtts)
168 | hs.append(ras)
169 | //hs.addParaStyle(with: spacedParaStyle)
170 | return hs as NSAttributedString
171 | #else
172 | return ras
173 | #endif
174 | }
175 | }
176 |
177 | // Return an error message
178 | let errorAtts: [NSAttributedString.Key : Any] = [
179 | .foregroundColor: NSColor.red,
180 | .font: self.font!
181 | ]
182 |
183 | return NSAttributedString.init(string: "Could not render source code in (\(language))",
184 | attributes: errorAtts)
185 | }
186 |
187 |
188 | // MARK: - Utility Functions
189 |
190 | /**
191 | Set key theme parameters.
192 |
193 | We record in prefs a string combinining the theme's Highlight.js name and
194 | its 'mode' (light or dark), so we need to call this function at some
195 | point to extract these two data points.
196 |
197 | **NOTE** This should now be called only **once**, before the code is rendered
198 | to avoid threading race conditions. This is called by `setBaseValues()`
199 | and `AppDelegate` (frequently, once for each theme).
200 |
201 | - Parameters:
202 | - themeData: The PreviewCode theme info string, eg. `dark.an-old-hope`.
203 | */
204 | func updateTheme(_ themeData: String) {
205 |
206 | let themeName: String = setTheme(themeData)
207 | if let highlightr: Highlighter = self.highlighter {
208 | highlightr.setTheme(themeName)
209 | self.themeBackgroundColour = highlightr.theme.themeBackgroundColour
210 | }
211 | }
212 |
213 |
214 | /**
215 | Extract the theme name from the storage string.
216 |
217 | - Parameters:
218 | - themeString: The base theme record, eg. `light.atom-one-light`.
219 |
220 | - Returns: The name of the theme's filem, eg. `atom-one-light`.
221 | */
222 | private func setTheme(_ themeString: String) -> String {
223 |
224 | var themeParts: [String] = themeString.components(separatedBy: ".")
225 |
226 | // Just in case...
227 | if themeParts.count != 2 {
228 | themeParts = ["dark", "agate"]
229 | }
230 |
231 | self.isThemeDark = (themeParts[0] == "dark")
232 | return themeParts[1]
233 | }
234 |
235 |
236 | /**
237 | Determine the source file's language from its UTI.
238 |
239 | For example, `public.swift-source` -> `swift`.
240 |
241 | If `isForTag` is `true`, it returns the actual name of the language,
242 | not the naming used by Highlight.js, which it returns if `isForTag`
243 | is `false`. This is because these are not always the same,
244 | eg. `c++` vs `cpp`, `pascal` vs `delphi`.
245 |
246 | - Parameters:
247 | - sourceFilePath: The path to the source code file.
248 | - isForTag: Are we rendering a thumbnail tag (`true`) or not (`false`).
249 |
250 | - Returns: The source code's language.
251 | */
252 | func getLanguage(_ sourceFilePath: String, _ isForTag: Bool) -> String {
253 |
254 | // FROM 1.2.2 -- make sure these are lowercase
255 | let sourceFileUTI: String = getSourceFileUTI(sourceFilePath).lowercased()
256 | let sourceFileExtension: String = (sourceFilePath as NSString).pathExtension.lowercased()
257 |
258 | // Trap 'non-standard' UTIs
259 | if sourceFileUTI.hasPrefix("com.apple.applescript") { return "applescript" }
260 | if sourceFileUTI == "com.apple.property-list" { return "xml" }
261 | if sourceFileUTI == "public.script" { return "bash" }
262 | if sourceFileUTI == "public.css" { return "css" }
263 | // FROM 1.2.0 -- Present .env files using the bash renderer
264 | if sourceFileUTI == "com.bps.env" { return "bash" }
265 | if sourceFileUTI == "com.bps.conf" { return "makefile" }
266 | if sourceFileUTI.hasSuffix(".terraform-vars") { return "toml" }
267 | // FROM 1.2.4
268 | if sourceFileUTI.hasSuffix(".c-sharp") { return "c#" }
269 | // FROM 1.2.6 -- Assorted Xcode files
270 | if sourceFileUTI.hasSuffix(".entitlements-property-list") { return "xml" }
271 | if sourceFileUTI.hasSuffix(".interfacebuilder.document.cocoa") { return "xml" }
272 | if sourceFileUTI.hasSuffix("interfacebuilder.document.storyboard") { return "xml" }
273 | // FROM 1.3.2 -- Microsoft TypeScript UTI
274 | if sourceFileUTI.hasSuffix(".typescript") { return "typescript" }
275 |
276 | var sourceLanguage: String = BUFFOON_CONSTANTS.DEFAULT_LANGUAGE_UTI
277 | let parts = sourceFileUTI.components(separatedBy: ".")
278 | if parts.count > 0 {
279 | let index: Int = parts.count - 1
280 | var endIndex: Range? = parts[index].range(of: "-source")
281 | if endIndex == nil { endIndex = parts[index].range(of: "-header") }
282 | if endIndex == nil { endIndex = parts[index].range(of: "-script") }
283 |
284 | if let anEndIndex = endIndex {
285 | sourceLanguage = String(parts[index][.. 'objectivec'; are accessed
291 | // as aliases, eg. 'pascal' -> 'delphi'; or all use the same language,
292 | // eg. all shells -> 'bash'
293 | switch(sourceLanguage) {
294 | case "objective-c":
295 | sourceLanguage = isForTag ? "obj-c" : "objectivec"
296 | case "objective-c-plus-plus":
297 | sourceLanguage = isForTag ? "obj-c++" : "objectivec"
298 | case "c-plus-plus":
299 | sourceLanguage = isForTag ? "c++" : "cpp"
300 | case "shell", "zsh", "csh", "ksh", "tsch":
301 | if !isForTag { sourceLanguage = "bash" }
302 | case "pascal":
303 | if !isForTag { sourceLanguage = "delphi" }
304 | case "assembly":
305 | // FROM 1.4.2 -- Correct 'armasm' -> 'arm'
306 | if sourceFileExtension == "s" { sourceLanguage = isForTag ? "ARM" : "arm" }
307 | if sourceFileExtension == "asm" || sourceFileExtension == "nasm" { sourceLanguage = isForTag ? "x86-64" : "x86asm" }
308 | case "nasm-assembly":
309 | sourceLanguage = isForTag ? "x86-64" : "x86asm"
310 | case "6809-assembly":
311 | sourceLanguage = isForTag ? "6809" : "x86asm"
312 | case "latex":
313 | if !isForTag { sourceLanguage = "tex" }
314 | case "csharp":
315 | if isForTag { sourceLanguage = "c#" }
316 | case "fsharp":
317 | if isForTag { sourceLanguage = "f#" }
318 | case "brainfuck":
319 | if isForTag { sourceLanguage = "brainf**k" }
320 | case "terraform":
321 | if !isForTag { sourceLanguage = "go" }
322 | case "make":
323 | sourceLanguage = "makefile"
324 | case "vuejs":
325 | sourceLanguage = "javascript"
326 | default:
327 | // NOP
328 | break
329 | }
330 |
331 | return sourceLanguage
332 | }
333 |
334 |
335 | /**
336 | Get the supplied source file's UTI.
337 |
338 | We'll use it to determine the file's programming language.
339 |
340 | - Parameters:
341 | - sourceFilePath: The path to the source code file.
342 |
343 | - Returns: The source code's UTI.
344 | */
345 | private func getSourceFileUTI(_ sourceFilePath: String) -> String {
346 |
347 | // Create a URL reference to the sample file
348 | var sourceFileUTI: String = ""
349 | let sourceFileURL = URL.init(fileURLWithPath: sourceFilePath)
350 |
351 | do {
352 | // Read back the UTI from the URL
353 | // Use Big Sur's UTType API
354 | if #available(macOS 11, *) {
355 | if let uti: UTType = try sourceFileURL.resourceValues(forKeys: [.contentTypeKey]).contentType {
356 | sourceFileUTI = uti.identifier
357 | }
358 | } else {
359 | // NOTE '.typeIdentifier' yields an optional
360 | if let uti: String = try sourceFileURL.resourceValues(forKeys: [.typeIdentifierKey]).typeIdentifier {
361 | sourceFileUTI = uti
362 | }
363 | }
364 | } catch {
365 | // NOP
366 | }
367 |
368 | return sourceFileUTI
369 | }
370 |
371 |
372 | /**
373 | Determine whether the host Mac is in light mode.
374 | FROM 1.3.0
375 |
376 | - Returns: `true` if the Mac is in light mode, otherwise `false`.
377 | */
378 | private func isMacInLightMode() -> Bool {
379 |
380 | let appearNameString: String = NSApp.effectiveAppearance.name.rawValue
381 | return (appearNameString == "NSAppearanceNameAqua")
382 | }
383 | }
384 |
385 |
386 | /**
387 | Get the encoding of the string formed from data.
388 |
389 | - Returns: The string's encoding or nil.
390 | */
391 |
392 | extension Data {
393 |
394 | var stringEncoding: String.Encoding? {
395 | var nss: NSString? = nil
396 | guard case let rawValue = NSString.stringEncoding(for: self,
397 | encodingOptions: nil,
398 | convertedString: &nss,
399 | usedLossyConversion: nil), rawValue != 0 else { return nil }
400 | return .init(rawValue: rawValue)
401 | }
402 | }
403 |
--------------------------------------------------------------------------------
/Code Previewer/Highlight.js Licence:
--------------------------------------------------------------------------------
1 | Copyright (c) 2006, Ivan Sagalaev
2 | All rights reserved.
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are met:
5 |
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of highlight.js nor the names of its contributors
12 | may be used to endorse or promote products derived from this software
13 | without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/Code Previewer/Highlightr Licence:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 Illanes, Juan Pablo
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Code Previewer/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Code Previewer
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | $(MARKETING_VERSION)
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSExtension
26 |
27 | NSExtensionAttributes
28 |
29 | QLSupportedContentTypes
30 |
31 | public.swift-source
32 | public.python-script
33 | public.c-source
34 | public.c-header
35 | public.c-plus-plus-source
36 | public.c-plus-plus-header
37 | public.objective-c-source
38 | public.objective-c-plus-plus-source
39 | public.fortran-source
40 | public.pascal-source
41 | public.protobuf-source
42 | com.netscape.javascript-source
43 | public.ruby-script
44 | public.perl-script
45 | public.php-script
46 | public.shell-script
47 | public.zsh-script
48 | public.csh-script
49 | public.ksh-script
50 | public.tcsh-script
51 | public.css
52 | public.ada-source
53 | public.assembly-source
54 | com.apple.applescript.text
55 | com.sun.java-source
56 | com.bps.rust-source
57 | com.bps.go-source
58 | com.bps.coffee-source
59 | com.bps.lua-source
60 | com.bps.csharp-source
61 | com.bps.vbscript-source
62 | com.bps.scss-source
63 | com.bps.sql-source
64 | com.bps.arduino-source
65 | com.bps.clojure-source
66 | com.bps.erlang-source
67 | com.bps.latex-source
68 | com.bps.elixir-source
69 | com.bps.haskell-source
70 | com.bps.brainfuck-source
71 | com.bps.actionscript-source
72 | com.bps.twig-source
73 | com.bps.dart-source
74 | com.bps.fsharp-source
75 | com.bps.julia-source
76 | com.bps.lisp-source
77 | com.bps.kotlin-source
78 | com.bps.basic-source
79 | com.bps.terraform-source
80 | com.bps.assembly-source
81 | com.bps.6809-assembly-source
82 | com.bps.env
83 | com.bps.terraform-vars
84 | public.nasm-assembly-source
85 | com.bps.cmake-source
86 | com.bps.asciidoc-source
87 | com.bps.conf
88 | public.lua-script
89 | com.microsoft.c-sharp
90 | com.apple.property-list
91 | public.make-source
92 | com.bps.gml-source
93 | com.bps.vuejs-source
94 | com.apple.xcode.entitlements-property-list
95 | com.apple.interfacebuilder.document.cocoa
96 | com.apple.dt.interfacebuilder.document.storyboard
97 | com.bps.elm-source
98 | com.microsoft.typescript
99 | com.bps.typescript-source
100 |
101 | QLSupportsSearchableItems
102 |
103 |
104 | NSExtensionPointIdentifier
105 | com.apple.quicklook.preview
106 | NSExtensionPrincipalClass
107 | $(PRODUCT_MODULE_NAME).PreviewViewController
108 |
109 | NSHumanReadableCopyright
110 | Copyright © 2024 Tony Smith. All rights reserved.
111 |
112 |
113 |
--------------------------------------------------------------------------------
/Code Previewer/PreviewViewController.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * PreviewViewController.swift
3 | * PreviewCode
4 | *
5 | * Created by Tony Smith on 30/05/2021.
6 | * Copyright © 2024 Tony Smith. All rights reserved.
7 | */
8 |
9 |
10 | import Cocoa
11 | import Quartz
12 |
13 |
14 | class PreviewViewController: NSViewController,
15 | QLPreviewingController {
16 |
17 | // MARK: - Class UI Properties
18 |
19 | @IBOutlet var renderTextView: NSTextView!
20 | @IBOutlet var renderTextScrollView: NSScrollView!
21 | // FROM 1.1.0
22 | @IBOutlet var errorReportField: NSTextField!
23 |
24 |
25 | // MARK: - Public Properties
26 |
27 | override var nibName: NSNib.Name? {
28 | return NSNib.Name("PreviewViewController")
29 | }
30 |
31 |
32 | // MARK: - QLPreviewingController Required Functions
33 |
34 | func preparePreviewOfFile(at url: URL, completionHandler handler: @escaping (Error?) -> Void) {
35 |
36 | /*
37 | * This is the main entry point for macOS' preview system
38 | */
39 |
40 | // Get an error message ready for use
41 | var reportError: NSError? = nil
42 |
43 | // FROM 1.1.0
44 | // Hide the error field
45 | self.renderTextScrollView.isHidden = false
46 | self.errorReportField.isHidden = true
47 | self.errorReportField.stringValue = ""
48 |
49 | // Load and process the source file
50 | if FileManager.default.isReadableFile(atPath: url.path) {
51 | // Only proceed if the file is accessible from here
52 | do {
53 | // Get the file contents as a string
54 | let data: Data = try Data.init(contentsOf: url, options: [.uncached])
55 |
56 | // FROM 1.2.2
57 | // Get the string's encoding, or fail back to .utf8
58 | let encoding: String.Encoding = data.stringEncoding ?? .utf8
59 |
60 | if let codeFileString: String = String.init(data: data, encoding: encoding) {
61 | // Instantiate the common code within the closure
62 | let common: Common = Common.init(false)
63 | if common.initError {
64 | // A key component of Common, eg. 'hightlight.js' is missing,
65 | // so we cannot continue
66 | let error: NSError = setError(BUFFOON_CONSTANTS.ERRORS.CODES.BAD_HIGHLIGHTER)
67 | showError(error)
68 | handler(error)
69 | return
70 | }
71 |
72 | // Set the language
73 | let language: String = common.getLanguage(url.path, false)
74 |
75 | // Get the key string first
76 | let codeAttString: NSAttributedString = common.getAttributedString(codeFileString, language)
77 |
78 | // Set text and scroll view attributes according to style
79 | // TODO Do a better job of checking whether theme is dark or light
80 | self.renderTextView.backgroundColor = common.themeBackgroundColour
81 | self.renderTextScrollView.scrollerKnobStyle = common.isThemeDark ? .light : .dark
82 |
83 | if let renderTextStorage: NSTextStorage = self.renderTextView.textStorage {
84 | /*
85 | * NSTextStorage subclasses that return true from the fixesAttributesLazily
86 | * method should avoid directly calling fixAttributes(in:) or else bracket
87 | * such calls with beginEditing() and endEditing() messages.
88 | */
89 | renderTextStorage.beginEditing()
90 | renderTextStorage.setAttributedString(codeAttString)
91 | renderTextStorage.endEditing()
92 |
93 | // Add the subview to the instance's own view and draw
94 | self.view.display()
95 |
96 | // Call the QLPreviewingController indicating no error
97 | // (argument is nil)
98 | handler(nil)
99 | return
100 | }
101 |
102 | // We couldn't access the preview NSTextView's NSTextStorage
103 | reportError = setError(BUFFOON_CONSTANTS.ERRORS.CODES.BAD_TS_STRING)
104 | } else {
105 | // FROM 1.2.2
106 | // We couldn't convert to data to a valid encoding
107 | let errDesc: String = "\(BUFFOON_CONSTANTS.ERRORS.MESSAGES.BAD_TS_STRING) \(encoding)"
108 | reportError = NSError(domain: BUFFOON_CONSTANTS.PREVIEW_ERR_DOMAIN,
109 | code: BUFFOON_CONSTANTS.ERRORS.CODES.BAD_MD_STRING,
110 | userInfo: [NSLocalizedDescriptionKey: errDesc])
111 | }
112 | } catch {
113 | // We couldn't read the file so set an appropriate error to report back
114 | reportError = setError(BUFFOON_CONSTANTS.ERRORS.CODES.FILE_WONT_OPEN)
115 | }
116 | } else {
117 | // We couldn't access the file so set an appropriate error to report back
118 | reportError = setError(BUFFOON_CONSTANTS.ERRORS.CODES.FILE_INACCESSIBLE)
119 | }
120 |
121 | // Display the error locally in the window
122 | showError(reportError!)
123 |
124 | // Call the QLPreviewingController indicating an error
125 | // (argument is not nil)
126 | handler(reportError)
127 | }
128 |
129 |
130 | func preparePreviewOfSearchableItem(identifier: String, queryString: String?, completionHandler handler: @escaping (Error?) -> Void) {
131 |
132 | // Is this ever called?
133 | NSLog("BUFFOON searchable identifier: \(identifier)")
134 | NSLog("BUFFOON searchable query: " + (queryString ?? "nil"))
135 |
136 | // Hand control back to QuickLook
137 | handler(nil)
138 | }
139 |
140 |
141 | // MARK: - Utility Functions
142 |
143 | /**
144 | Place an error message in its various outlets.
145 |
146 | - parameters:
147 | - error: The error as an NSError.
148 | */
149 | func showError(_ error: NSError) {
150 |
151 | let errString: String = error.userInfo[NSLocalizedDescriptionKey] as! String
152 | self.errorReportField.stringValue = errString
153 | self.errorReportField.isHidden = false
154 | self.renderTextScrollView.isHidden = true
155 | self.view.display()
156 | NSLog("BUFFOON \(errString)")
157 | }
158 |
159 |
160 | /**
161 | Generate an NSError for an internal error, specified by its code.
162 |
163 | Codes are listed in `Constants.swift`
164 |
165 | - Parameters:
166 | - code: The internal error code.
167 |
168 | - Returns: The described error as an NSError.
169 | */
170 | func setError(_ code: Int) -> NSError {
171 |
172 | var errDesc: String
173 |
174 | switch(code) {
175 | case BUFFOON_CONSTANTS.ERRORS.CODES.FILE_INACCESSIBLE:
176 | errDesc = BUFFOON_CONSTANTS.ERRORS.MESSAGES.FILE_INACCESSIBLE
177 | case BUFFOON_CONSTANTS.ERRORS.CODES.FILE_WONT_OPEN:
178 | errDesc = BUFFOON_CONSTANTS.ERRORS.MESSAGES.FILE_WONT_OPEN
179 | case BUFFOON_CONSTANTS.ERRORS.CODES.BAD_TS_STRING:
180 | errDesc = BUFFOON_CONSTANTS.ERRORS.MESSAGES.BAD_TS_STRING
181 | case BUFFOON_CONSTANTS.ERRORS.CODES.BAD_MD_STRING:
182 | errDesc = BUFFOON_CONSTANTS.ERRORS.MESSAGES.BAD_MD_STRING
183 | case BUFFOON_CONSTANTS.ERRORS.CODES.BAD_HIGHLIGHTER:
184 | errDesc = BUFFOON_CONSTANTS.ERRORS.MESSAGES.BAD_HIGHLIGHTER
185 | default:
186 | errDesc = "UNKNOWN ERROR"
187 | }
188 |
189 | return NSError(domain: BUFFOON_CONSTANTS.PREVIEW_ERR_DOMAIN,
190 | code: code,
191 | userInfo: [NSLocalizedDescriptionKey: errDesc])
192 | }
193 |
194 | }
195 |
--------------------------------------------------------------------------------
/Code Thumbnailer/Code_Thumbnailer.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.application-groups
8 |
9 | $(TeamIdentifierPrefix)suite.preview-code
10 |
11 | com.apple.security.files.user-selected.read-only
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Code Thumbnailer/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Code Thumbnailer
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | $(MARKETING_VERSION)
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSExtension
26 |
27 | NSExtensionAttributes
28 |
29 | QLSupportedContentTypes
30 |
31 | public.swift-source
32 | public.python-script
33 | public.c-source
34 | public.c-header
35 | public.c-plus-plus-source
36 | public.c-plus-plus-header
37 | public.objective-c-source
38 | public.objective-c-plus-plus-source
39 | public.fortran-source
40 | public.pascal-source
41 | public.protobuf-source
42 | com.netscape.javascript-source
43 | public.ruby-script
44 | public.perl-script
45 | public.php-script
46 | public.shell-script
47 | public.zsh-script
48 | public.csh-script
49 | public.ksh-script
50 | public.tcsh-script
51 | public.css
52 | public.ada-source
53 | public.assembly-source
54 | com.apple.applescript.text
55 | com.sun.java-source
56 | com.bps.rust-source
57 | com.bps.go-source
58 | com.bps.coffee-source
59 | com.bps.lua-source
60 | com.bps.csharp-source
61 | com.bps.vbscript-source
62 | com.bps.scss-source
63 | com.bps.sql-source
64 | com.bps.arduino-source
65 | com.bps.clojure-source
66 | com.bps.erlang-source
67 | com.bps.latex-source
68 | com.bps.elixir-source
69 | com.bps.haskell-source
70 | com.bps.brainfuck-source
71 | com.bps.actionscript-source
72 | com.bps.twig-source
73 | com.bps.dart-source
74 | com.bps.fsharp-source
75 | com.bps.julia-source
76 | com.bps.lisp-source
77 | com.bps.kotlin-source
78 | com.bps.basic-source
79 | com.bps.terraform-source
80 | com.bps.assembly-source
81 | com.bps.6809-assembly-source
82 | com.bps.env
83 | com.bps.terraform-vars
84 | public.nasm-assembly-source
85 | com.bps.cmake-source
86 | com.bps.asciidoc-source
87 | com.bps.conf
88 | public.lua-script
89 | com.apple.property-list
90 | public.make-source
91 | com.microsoft.c-sharp
92 | com.bps.gml-source
93 | com.bps.vuejs-source
94 | com.apple.xcode.entitlements-property-list
95 | com.apple.interfacebuilder.document.cocoa
96 | com.apple.dt.interfacebuilder.document.storyboard
97 | com.bps.elm-source
98 | com.microsoft.typescript
99 | com.bps.typescript-source
100 |
101 | QLThumbnailMinimumDimension
102 | 32
103 |
104 | NSExtensionPointIdentifier
105 | com.apple.quicklook.thumbnail
106 | NSExtensionPrincipalClass
107 | $(PRODUCT_MODULE_NAME).ThumbnailProvider
108 |
109 | NSHumanReadableCopyright
110 | Copyright © 2024 Tony Smith. All rights reserved.
111 |
112 |
113 |
--------------------------------------------------------------------------------
/Code Thumbnailer/ThumbnailProvider.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * ThumbnailProvider.swift
3 | * PreviewCode
4 | *
5 | * Created by Tony Smith on 04/06/2021.
6 | * Copyright © 2024 Tony Smith. All rights reserved.
7 | */
8 |
9 |
10 | import Foundation
11 | import AppKit
12 | import QuickLookThumbnailing
13 |
14 |
15 | class ThumbnailProvider: QLThumbnailProvider {
16 |
17 | // MARK:- Private Properties
18 |
19 | private enum ThumbnailerError: Error {
20 | case badFileLoad(String)
21 | case badFileUnreadable(String)
22 | case badFileUnsupportedEncoding(String)
23 | case badFileUnsupportedFile(String)
24 | case badGfxBitmap
25 | case badGfxDraw
26 | case badHighlighter
27 | }
28 |
29 |
30 | // MARK:- QLThumbnailProvider Required Functions
31 |
32 | override func provideThumbnail(for request: QLFileThumbnailRequest, _ handler: @escaping (QLThumbnailReply?, Error?) -> Void) {
33 |
34 | /*
35 | * This is the main entry point for macOS' thumbnailing system
36 | */
37 |
38 | // Load the source file using a co-ordinator as we don't know what thread this function
39 | // will be executed in when it's called by macOS' QuickLook code
40 | if FileManager.default.isReadableFile(atPath: request.fileURL.path) {
41 | // Only proceed if the file is accessible from here
42 | do {
43 | // Get the file contents as a string, making sure it's not cached
44 | // as we're not going to read it again any time soon
45 | let data: Data = try Data.init(contentsOf: request.fileURL, options: [.uncached])
46 |
47 | // Get the string's encoding, or fail back to .utf8
48 | let encoding: String.Encoding = data.stringEncoding ?? .utf8
49 |
50 | guard let codeFileString: String = String.init(data: data, encoding: encoding) else {
51 | handler(nil, ThumbnailerError.badFileLoad(request.fileURL.path))
52 | return
53 | }
54 |
55 | // Instantiate the common code within the closure
56 | let common: Common = Common.init(true)
57 | if common.initError {
58 | // A key component of Common, eg. 'hightlight.js' is missing,
59 | // so we cannot continue
60 | handler(nil, ThumbnailerError.badHighlighter)
61 | return
62 | }
63 |
64 | // Only render the lines likely to appear in the thumbnail
65 | let lines: [Substring] = codeFileString.split(separator: "\n", maxSplits: BUFFOON_CONSTANTS.THUMBNAIL_LINE_COUNT + 1, omittingEmptySubsequences: false)
66 | var displayString: String = ""
67 | for i in 0..= BUFFOON_CONSTANTS.THUMBNAIL_LINE_COUNT { break }
70 | displayString += (String(lines[i]) + "\n")
71 | }
72 |
73 | // Set the primary drawing frame and a base font size
74 | let codeFrame: CGRect = NSMakeRect(CGFloat(BUFFOON_CONSTANTS.THUMBNAIL_SIZE.ORIGIN_X),
75 | CGFloat(BUFFOON_CONSTANTS.THUMBNAIL_SIZE.ORIGIN_Y),
76 | CGFloat(BUFFOON_CONSTANTS.THUMBNAIL_SIZE.WIDTH),
77 | CGFloat(BUFFOON_CONSTANTS.THUMBNAIL_SIZE.HEIGHT))
78 |
79 | // Instantiate an NSTextField to display the NSAttributedString render of the code
80 | let language: String = common.getLanguage(request.fileURL.path, false)
81 | let codeTextField: NSTextField = NSTextField.init(frame: codeFrame)
82 | codeTextField.attributedStringValue = common.getAttributedString(displayString, language)
83 |
84 | // Generate the bitmap from the rendered code text view
85 | guard let bodyImageRep: NSBitmapImageRep = codeTextField.bitmapImageRepForCachingDisplay(in: codeFrame) else {
86 | handler(nil, ThumbnailerError.badGfxBitmap)
87 | return
88 | }
89 |
90 | // Draw the code view into the bitmap
91 | codeTextField.cacheDisplay(in: codeFrame, to: bodyImageRep)
92 |
93 | if let image: CGImage = bodyImageRep.cgImage {
94 | // Just in case, make a copy of the cgImage, in case
95 | // `bodyImageReg` is freed
96 | if let cgImage: CGImage = image.copy() {
97 | // Calculate image scaling, frame size, etc.
98 | let thumbnailFrame: CGRect = NSMakeRect(0.0,
99 | 0.0,
100 | CGFloat(BUFFOON_CONSTANTS.THUMBNAIL_SIZE.ASPECT) * request.maximumSize.height,
101 | request.maximumSize.height)
102 |
103 | // NOTE The `+2.0` is a hack to avoid a line above the image
104 | let scaleFrame: CGRect = NSMakeRect(0.0,
105 | 0.0,
106 | thumbnailFrame.width * request.scale,
107 | (thumbnailFrame.height * request.scale) + 2.0)
108 |
109 | // Pass a QLThumbnailReply and no error to the supplied handler
110 | handler(QLThumbnailReply.init(contextSize: thumbnailFrame.size) { (context) -> Bool in
111 | // `scaleFrame` and `cgImage` are immutable
112 | context.draw(cgImage, in: scaleFrame, byTiling: false)
113 | return true
114 | }, nil)
115 | return
116 | }
117 | }
118 |
119 | handler(nil, ThumbnailerError.badGfxDraw)
120 | return
121 | } catch {
122 | // NOP: fall through to error
123 | }
124 | }
125 |
126 | // We didn't draw anything because of 'can't find file' error
127 | handler(nil, ThumbnailerError.badFileUnreadable(request.fileURL.path))
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # MIT License
2 |
3 | ### Copyright © 2024 Tony Smith (@smittytone)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/PreviewCode.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 3B1108B826714ADA00A36A48 /* Highlighter in Frameworks */ = {isa = PBXBuildFile; productRef = 3B1108B726714ADA00A36A48 /* Highlighter */; };
11 | 3B1108BA26714AE700A36A48 /* Highlighter in Frameworks */ = {isa = PBXBuildFile; productRef = 3B1108B926714AE700A36A48 /* Highlighter */; };
12 | 3B1108BC26714AED00A36A48 /* Highlighter in Frameworks */ = {isa = PBXBuildFile; productRef = 3B1108BB26714AED00A36A48 /* Highlighter */; };
13 | 3B271DCA268B0A9B00EFC72C /* themes-list.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B271DC9268B0A9B00EFC72C /* themes-list.json */; };
14 | 3B3F580D29D5892900E227C7 /* PCImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B3F580C29D5892900E227C7 /* PCImageView.swift */; };
15 | 3B669A6C2AFBBFAC005AAFA3 /* new in Resources */ = {isa = PBXBuildFile; fileRef = 3B669A6B2AFBBFAC005AAFA3 /* new */; };
16 | 3B6ABAC52669649500A436AA /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFD785E2663E4C9002AD588 /* Common.swift */; };
17 | 3B6ABACC2669703800A436AA /* PreviewTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B6ABACB2669703800A436AA /* PreviewTextView.swift */; };
18 | 3B7D83D12A8A2FEE008A4B2E /* code-sample.txt in Resources */ = {isa = PBXBuildFile; fileRef = 3B7D83D02A8A2FEE008A4B2E /* code-sample.txt */; };
19 | 3B7D83D52A8A3034008A4B2E /* REPLACE_WITH_YOUR_CODES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B7D83D32A8A3034008A4B2E /* REPLACE_WITH_YOUR_CODES.swift */; };
20 | 3B7D83D62A8A3034008A4B2E /* REPLACE_WITH_YOUR_FUNCTIONS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B7D83D42A8A3034008A4B2E /* REPLACE_WITH_YOUR_FUNCTIONS.swift */; };
21 | 3B7D83D82A8A3069008A4B2E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3B7D83D72A8A3069008A4B2E /* Assets.xcassets */; };
22 | 3B7D83D92A8A306C008A4B2E /* REPLACE_WITH_YOUR_CODES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B7D83D32A8A3034008A4B2E /* REPLACE_WITH_YOUR_CODES.swift */; };
23 | 3B7D83DA2A8A306D008A4B2E /* REPLACE_WITH_YOUR_CODES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B7D83D32A8A3034008A4B2E /* REPLACE_WITH_YOUR_CODES.swift */; };
24 | 3B95C9312666222D00C7CC14 /* Highlight.js Licence in Resources */ = {isa = PBXBuildFile; fileRef = 3B95C92F2666222D00C7CC14 /* Highlight.js Licence */; };
25 | 3B95C9322666222D00C7CC14 /* Highlightr Licence in Resources */ = {isa = PBXBuildFile; fileRef = 3B95C9302666222D00C7CC14 /* Highlightr Licence */; };
26 | 3BA5D03B269081BF00AF4EF2 /* PMFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BA5D03A269081BF00AF4EF2 /* PMFont.swift */; };
27 | 3BAE671B28D4D3AD001532BD /* GenericFontExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BAE671A28D4D3AD001532BD /* GenericFontExtensions.swift */; };
28 | 3BDE3EF6267CE9890037351C /* GenericExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BDE3EF5267CE9890037351C /* GenericExtensions.swift */; };
29 | 3BE0EB9D266A845B00C9924E /* QuickLookThumbnailing.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BE0EB9C266A845B00C9924E /* QuickLookThumbnailing.framework */; };
30 | 3BE0EB9E266A845B00C9924E /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BFD78472663E27D002AD588 /* Quartz.framework */; };
31 | 3BE0EBA1266A845B00C9924E /* ThumbnailProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BE0EBA0266A845B00C9924E /* ThumbnailProvider.swift */; };
32 | 3BE0EBA6266A845B00C9924E /* Code Thumbnailer.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3BE0EB9B266A845B00C9924E /* Code Thumbnailer.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
33 | 3BE0EBAC266A848400C9924E /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFD785E2663E4C9002AD588 /* Common.swift */; };
34 | 3BF52B11266A883F002EC860 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFD78582663E2C9002AD588 /* Constants.swift */; };
35 | 3BFBEC3C2664058400B4E70C /* ThemeTableCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFBEC3B2664058400B4E70C /* ThemeTableCellView.swift */; };
36 | 3BFD78182663E16D002AD588 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFD78172663E16D002AD588 /* AppDelegate.swift */; };
37 | 3BFD781D2663E16E002AD588 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3BFD781B2663E16E002AD588 /* MainMenu.xib */; };
38 | 3BFD78292663E16E002AD588 /* PreviewCodeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFD78282663E16E002AD588 /* PreviewCodeTests.swift */; };
39 | 3BFD78342663E16E002AD588 /* PreviewCodeUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFD78332663E16E002AD588 /* PreviewCodeUITests.swift */; };
40 | 3BFD78482663E27D002AD588 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BFD78472663E27D002AD588 /* Quartz.framework */; };
41 | 3BFD784B2663E27D002AD588 /* PreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFD784A2663E27D002AD588 /* PreviewViewController.swift */; };
42 | 3BFD784E2663E27D002AD588 /* PreviewViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3BFD784C2663E27D002AD588 /* PreviewViewController.xib */; };
43 | 3BFD78532663E27D002AD588 /* Code Previewer.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3BFD78452663E27D002AD588 /* Code Previewer.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
44 | 3BFD78592663E2C9002AD588 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFD78582663E2C9002AD588 /* Constants.swift */; };
45 | 3BFD785A2663E2C9002AD588 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFD78582663E2C9002AD588 /* Constants.swift */; };
46 | 3BFD78602663E4C9002AD588 /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFD785E2663E4C9002AD588 /* Common.swift */; };
47 | /* End PBXBuildFile section */
48 |
49 | /* Begin PBXContainerItemProxy section */
50 | 3BE0EBA4266A845B00C9924E /* PBXContainerItemProxy */ = {
51 | isa = PBXContainerItemProxy;
52 | containerPortal = 3BFD780C2663E16D002AD588 /* Project object */;
53 | proxyType = 1;
54 | remoteGlobalIDString = 3BE0EB9A266A845B00C9924E;
55 | remoteInfo = "Code Thumbnailer";
56 | };
57 | 3BFD78252663E16E002AD588 /* PBXContainerItemProxy */ = {
58 | isa = PBXContainerItemProxy;
59 | containerPortal = 3BFD780C2663E16D002AD588 /* Project object */;
60 | proxyType = 1;
61 | remoteGlobalIDString = 3BFD78132663E16D002AD588;
62 | remoteInfo = PreviewCode;
63 | };
64 | 3BFD78302663E16E002AD588 /* PBXContainerItemProxy */ = {
65 | isa = PBXContainerItemProxy;
66 | containerPortal = 3BFD780C2663E16D002AD588 /* Project object */;
67 | proxyType = 1;
68 | remoteGlobalIDString = 3BFD78132663E16D002AD588;
69 | remoteInfo = PreviewCode;
70 | };
71 | 3BFD78512663E27D002AD588 /* PBXContainerItemProxy */ = {
72 | isa = PBXContainerItemProxy;
73 | containerPortal = 3BFD780C2663E16D002AD588 /* Project object */;
74 | proxyType = 1;
75 | remoteGlobalIDString = 3BFD78442663E27D002AD588;
76 | remoteInfo = "Code Previewer";
77 | };
78 | /* End PBXContainerItemProxy section */
79 |
80 | /* Begin PBXCopyFilesBuildPhase section */
81 | 3BFD78572663E27D002AD588 /* Embed Foundation Extensions */ = {
82 | isa = PBXCopyFilesBuildPhase;
83 | buildActionMask = 2147483647;
84 | dstPath = "";
85 | dstSubfolderSpec = 13;
86 | files = (
87 | 3BE0EBA6266A845B00C9924E /* Code Thumbnailer.appex in Embed Foundation Extensions */,
88 | 3BFD78532663E27D002AD588 /* Code Previewer.appex in Embed Foundation Extensions */,
89 | );
90 | name = "Embed Foundation Extensions";
91 | runOnlyForDeploymentPostprocessing = 0;
92 | };
93 | /* End PBXCopyFilesBuildPhase section */
94 |
95 | /* Begin PBXFileReference section */
96 | 3B271DC9268B0A9B00EFC72C /* themes-list.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "themes-list.json"; sourceTree = ""; };
97 | 3B34F5022BE0380200CB8679 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = ""; };
98 | 3B3F580C29D5892900E227C7 /* PCImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PCImageView.swift; sourceTree = ""; };
99 | 3B669A6B2AFBBFAC005AAFA3 /* new */ = {isa = PBXFileReference; lastKnownFileType = folder; name = new; path = "../../../Library/CloudStorage/OneDrive-Personal/Programming/PreviewCode/new"; sourceTree = ""; };
100 | 3B6ABACB2669703800A436AA /* PreviewTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewTextView.swift; sourceTree = ""; };
101 | 3B7D83D02A8A2FEE008A4B2E /* code-sample.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "code-sample.txt"; sourceTree = ""; };
102 | 3B7D83D32A8A3034008A4B2E /* REPLACE_WITH_YOUR_CODES.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = REPLACE_WITH_YOUR_CODES.swift; path = "/Users/smitty/Library/CloudStorage/OneDrive-Personal/Programming/PreviewApps/REPLACE_WITH_YOUR_CODES.swift"; sourceTree = ""; };
103 | 3B7D83D42A8A3034008A4B2E /* REPLACE_WITH_YOUR_FUNCTIONS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = REPLACE_WITH_YOUR_FUNCTIONS.swift; path = "/Users/smitty/Library/CloudStorage/OneDrive-Personal/Programming/PreviewApps/REPLACE_WITH_YOUR_FUNCTIONS.swift"; sourceTree = ""; };
104 | 3B7D83D72A8A3069008A4B2E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = "/Users/smitty/Library/CloudStorage/OneDrive-Personal/Programming/PreviewCode/Assets.xcassets"; sourceTree = ""; };
105 | 3B95C92F2666222D00C7CC14 /* Highlight.js Licence */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Highlight.js Licence"; sourceTree = ""; };
106 | 3B95C9302666222D00C7CC14 /* Highlightr Licence */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Highlightr Licence"; sourceTree = ""; };
107 | 3BA5D03A269081BF00AF4EF2 /* PMFont.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PMFont.swift; sourceTree = ""; };
108 | 3BAE671A28D4D3AD001532BD /* GenericFontExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GenericFontExtensions.swift; sourceTree = ""; };
109 | 3BB8E9102935FF7E00C6D452 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; };
110 | 3BDE3EF5267CE9890037351C /* GenericExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GenericExtensions.swift; sourceTree = ""; };
111 | 3BE0EB9B266A845B00C9924E /* Code Thumbnailer.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Code Thumbnailer.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
112 | 3BE0EB9C266A845B00C9924E /* QuickLookThumbnailing.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLookThumbnailing.framework; path = System/Library/Frameworks/QuickLookThumbnailing.framework; sourceTree = SDKROOT; };
113 | 3BE0EBA0266A845B00C9924E /* ThumbnailProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThumbnailProvider.swift; sourceTree = ""; };
114 | 3BE0EBA2266A845B00C9924E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
115 | 3BE0EBA3266A845B00C9924E /* Code_Thumbnailer.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Code_Thumbnailer.entitlements; sourceTree = ""; };
116 | 3BFBEC3B2664058400B4E70C /* ThemeTableCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeTableCellView.swift; sourceTree = ""; };
117 | 3BFD78142663E16D002AD588 /* PreviewCode.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PreviewCode.app; sourceTree = BUILT_PRODUCTS_DIR; };
118 | 3BFD78172663E16D002AD588 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
119 | 3BFD781C2663E16E002AD588 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
120 | 3BFD781E2663E16E002AD588 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
121 | 3BFD781F2663E16E002AD588 /* PreviewCode.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PreviewCode.entitlements; sourceTree = ""; };
122 | 3BFD78242663E16E002AD588 /* PreviewCodeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PreviewCodeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
123 | 3BFD78282663E16E002AD588 /* PreviewCodeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewCodeTests.swift; sourceTree = ""; };
124 | 3BFD782A2663E16E002AD588 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
125 | 3BFD782F2663E16E002AD588 /* PreviewCodeUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PreviewCodeUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
126 | 3BFD78332663E16E002AD588 /* PreviewCodeUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewCodeUITests.swift; sourceTree = ""; };
127 | 3BFD78352663E16E002AD588 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
128 | 3BFD78452663E27D002AD588 /* Code Previewer.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Code Previewer.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
129 | 3BFD78472663E27D002AD588 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; };
130 | 3BFD784A2663E27D002AD588 /* PreviewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewViewController.swift; sourceTree = ""; };
131 | 3BFD784D2663E27D002AD588 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/PreviewViewController.xib; sourceTree = ""; };
132 | 3BFD784F2663E27D002AD588 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
133 | 3BFD78502663E27D002AD588 /* Code_Previewer.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Code_Previewer.entitlements; sourceTree = ""; };
134 | 3BFD78582663E2C9002AD588 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; };
135 | 3BFD785E2663E4C9002AD588 /* Common.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = ""; };
136 | /* End PBXFileReference section */
137 |
138 | /* Begin PBXFrameworksBuildPhase section */
139 | 3BE0EB98266A845B00C9924E /* Frameworks */ = {
140 | isa = PBXFrameworksBuildPhase;
141 | buildActionMask = 2147483647;
142 | files = (
143 | 3BE0EB9D266A845B00C9924E /* QuickLookThumbnailing.framework in Frameworks */,
144 | 3B1108BC26714AED00A36A48 /* Highlighter in Frameworks */,
145 | 3BE0EB9E266A845B00C9924E /* Quartz.framework in Frameworks */,
146 | );
147 | runOnlyForDeploymentPostprocessing = 0;
148 | };
149 | 3BFD78112663E16D002AD588 /* Frameworks */ = {
150 | isa = PBXFrameworksBuildPhase;
151 | buildActionMask = 2147483647;
152 | files = (
153 | 3B1108B826714ADA00A36A48 /* Highlighter in Frameworks */,
154 | );
155 | runOnlyForDeploymentPostprocessing = 0;
156 | };
157 | 3BFD78212663E16E002AD588 /* Frameworks */ = {
158 | isa = PBXFrameworksBuildPhase;
159 | buildActionMask = 2147483647;
160 | files = (
161 | );
162 | runOnlyForDeploymentPostprocessing = 0;
163 | };
164 | 3BFD782C2663E16E002AD588 /* Frameworks */ = {
165 | isa = PBXFrameworksBuildPhase;
166 | buildActionMask = 2147483647;
167 | files = (
168 | );
169 | runOnlyForDeploymentPostprocessing = 0;
170 | };
171 | 3BFD78422663E27D002AD588 /* Frameworks */ = {
172 | isa = PBXFrameworksBuildPhase;
173 | buildActionMask = 2147483647;
174 | files = (
175 | 3B1108BA26714AE700A36A48 /* Highlighter in Frameworks */,
176 | 3BFD78482663E27D002AD588 /* Quartz.framework in Frameworks */,
177 | );
178 | runOnlyForDeploymentPostprocessing = 0;
179 | };
180 | /* End PBXFrameworksBuildPhase section */
181 |
182 | /* Begin PBXGroup section */
183 | 3B7D83D22A8A301F008A4B2E /* YOU MIUST SUPPLY */ = {
184 | isa = PBXGroup;
185 | children = (
186 | 3B7D83D42A8A3034008A4B2E /* REPLACE_WITH_YOUR_FUNCTIONS.swift */,
187 | 3B7D83D32A8A3034008A4B2E /* REPLACE_WITH_YOUR_CODES.swift */,
188 | 3B7D83D72A8A3069008A4B2E /* Assets.xcassets */,
189 | 3B669A6B2AFBBFAC005AAFA3 /* new */,
190 | );
191 | name = "YOU MIUST SUPPLY";
192 | sourceTree = "";
193 | };
194 | 3BB8E90F2935FF6C00C6D452 /* Misc */ = {
195 | isa = PBXGroup;
196 | children = (
197 | 3BB8E9102935FF7E00C6D452 /* README.md */,
198 | 3B34F5022BE0380200CB8679 /* LICENSE.md */,
199 | );
200 | name = Misc;
201 | sourceTree = "";
202 | };
203 | 3BE0EB9F266A845B00C9924E /* Code Thumbnailer */ = {
204 | isa = PBXGroup;
205 | children = (
206 | 3BE0EBA0266A845B00C9924E /* ThumbnailProvider.swift */,
207 | 3BE0EBA2266A845B00C9924E /* Info.plist */,
208 | 3BE0EBA3266A845B00C9924E /* Code_Thumbnailer.entitlements */,
209 | );
210 | path = "Code Thumbnailer";
211 | sourceTree = "";
212 | };
213 | 3BFD780B2663E16D002AD588 = {
214 | isa = PBXGroup;
215 | children = (
216 | 3BFD78162663E16D002AD588 /* PreviewCode */,
217 | 3BFD78492663E27D002AD588 /* Code Previewer */,
218 | 3BE0EB9F266A845B00C9924E /* Code Thumbnailer */,
219 | 3BFD78272663E16E002AD588 /* PreviewCodeTests */,
220 | 3BFD78322663E16E002AD588 /* PreviewCodeUITests */,
221 | 3BFD78462663E27D002AD588 /* Frameworks */,
222 | 3BB8E90F2935FF6C00C6D452 /* Misc */,
223 | 3BFD78152663E16D002AD588 /* Products */,
224 | );
225 | sourceTree = "";
226 | };
227 | 3BFD78152663E16D002AD588 /* Products */ = {
228 | isa = PBXGroup;
229 | children = (
230 | 3BFD78142663E16D002AD588 /* PreviewCode.app */,
231 | 3BFD78242663E16E002AD588 /* PreviewCodeTests.xctest */,
232 | 3BFD782F2663E16E002AD588 /* PreviewCodeUITests.xctest */,
233 | 3BFD78452663E27D002AD588 /* Code Previewer.appex */,
234 | 3BE0EB9B266A845B00C9924E /* Code Thumbnailer.appex */,
235 | );
236 | name = Products;
237 | sourceTree = "";
238 | };
239 | 3BFD78162663E16D002AD588 /* PreviewCode */ = {
240 | isa = PBXGroup;
241 | children = (
242 | 3BFD78582663E2C9002AD588 /* Constants.swift */,
243 | 3BFD78172663E16D002AD588 /* AppDelegate.swift */,
244 | 3BFBEC3B2664058400B4E70C /* ThemeTableCellView.swift */,
245 | 3B6ABACB2669703800A436AA /* PreviewTextView.swift */,
246 | 3B3F580C29D5892900E227C7 /* PCImageView.swift */,
247 | 3BA5D03A269081BF00AF4EF2 /* PMFont.swift */,
248 | 3BDE3EF5267CE9890037351C /* GenericExtensions.swift */,
249 | 3BAE671A28D4D3AD001532BD /* GenericFontExtensions.swift */,
250 | 3BFD781B2663E16E002AD588 /* MainMenu.xib */,
251 | 3BFD781E2663E16E002AD588 /* Info.plist */,
252 | 3B271DC9268B0A9B00EFC72C /* themes-list.json */,
253 | 3B7D83D02A8A2FEE008A4B2E /* code-sample.txt */,
254 | 3BFD781F2663E16E002AD588 /* PreviewCode.entitlements */,
255 | 3B7D83D22A8A301F008A4B2E /* YOU MIUST SUPPLY */,
256 | );
257 | path = PreviewCode;
258 | sourceTree = "";
259 | };
260 | 3BFD78272663E16E002AD588 /* PreviewCodeTests */ = {
261 | isa = PBXGroup;
262 | children = (
263 | 3BFD78282663E16E002AD588 /* PreviewCodeTests.swift */,
264 | 3BFD782A2663E16E002AD588 /* Info.plist */,
265 | );
266 | path = PreviewCodeTests;
267 | sourceTree = "";
268 | };
269 | 3BFD78322663E16E002AD588 /* PreviewCodeUITests */ = {
270 | isa = PBXGroup;
271 | children = (
272 | 3BFD78332663E16E002AD588 /* PreviewCodeUITests.swift */,
273 | 3BFD78352663E16E002AD588 /* Info.plist */,
274 | );
275 | path = PreviewCodeUITests;
276 | sourceTree = "";
277 | };
278 | 3BFD78462663E27D002AD588 /* Frameworks */ = {
279 | isa = PBXGroup;
280 | children = (
281 | 3BFD78472663E27D002AD588 /* Quartz.framework */,
282 | 3BE0EB9C266A845B00C9924E /* QuickLookThumbnailing.framework */,
283 | );
284 | name = Frameworks;
285 | sourceTree = "";
286 | };
287 | 3BFD78492663E27D002AD588 /* Code Previewer */ = {
288 | isa = PBXGroup;
289 | children = (
290 | 3BFD784A2663E27D002AD588 /* PreviewViewController.swift */,
291 | 3BFD785E2663E4C9002AD588 /* Common.swift */,
292 | 3BFD784C2663E27D002AD588 /* PreviewViewController.xib */,
293 | 3BFD784F2663E27D002AD588 /* Info.plist */,
294 | 3BFD78502663E27D002AD588 /* Code_Previewer.entitlements */,
295 | 3B95C92F2666222D00C7CC14 /* Highlight.js Licence */,
296 | 3B95C9302666222D00C7CC14 /* Highlightr Licence */,
297 | );
298 | path = "Code Previewer";
299 | sourceTree = "";
300 | };
301 | /* End PBXGroup section */
302 |
303 | /* Begin PBXNativeTarget section */
304 | 3BE0EB9A266A845B00C9924E /* Code Thumbnailer */ = {
305 | isa = PBXNativeTarget;
306 | buildConfigurationList = 3BE0EBA9266A845B00C9924E /* Build configuration list for PBXNativeTarget "Code Thumbnailer" */;
307 | buildPhases = (
308 | 3BE0EB97266A845B00C9924E /* Sources */,
309 | 3BE0EB98266A845B00C9924E /* Frameworks */,
310 | 3BE0EB99266A845B00C9924E /* Resources */,
311 | );
312 | buildRules = (
313 | );
314 | dependencies = (
315 | );
316 | name = "Code Thumbnailer";
317 | packageProductDependencies = (
318 | 3B1108BB26714AED00A36A48 /* Highlighter */,
319 | );
320 | productName = "Code Thumbnailer";
321 | productReference = 3BE0EB9B266A845B00C9924E /* Code Thumbnailer.appex */;
322 | productType = "com.apple.product-type.app-extension";
323 | };
324 | 3BFD78132663E16D002AD588 /* PreviewCode */ = {
325 | isa = PBXNativeTarget;
326 | buildConfigurationList = 3BFD78382663E16E002AD588 /* Build configuration list for PBXNativeTarget "PreviewCode" */;
327 | buildPhases = (
328 | 3BFD78102663E16D002AD588 /* Sources */,
329 | 3BFD78112663E16D002AD588 /* Frameworks */,
330 | 3BFD78122663E16D002AD588 /* Resources */,
331 | 3BFD78572663E27D002AD588 /* Embed Foundation Extensions */,
332 | );
333 | buildRules = (
334 | );
335 | dependencies = (
336 | 3BFD78522663E27D002AD588 /* PBXTargetDependency */,
337 | 3BE0EBA5266A845B00C9924E /* PBXTargetDependency */,
338 | );
339 | name = PreviewCode;
340 | packageProductDependencies = (
341 | 3B1108B726714ADA00A36A48 /* Highlighter */,
342 | );
343 | productName = PreviewCode;
344 | productReference = 3BFD78142663E16D002AD588 /* PreviewCode.app */;
345 | productType = "com.apple.product-type.application";
346 | };
347 | 3BFD78232663E16E002AD588 /* PreviewCodeTests */ = {
348 | isa = PBXNativeTarget;
349 | buildConfigurationList = 3BFD783B2663E16E002AD588 /* Build configuration list for PBXNativeTarget "PreviewCodeTests" */;
350 | buildPhases = (
351 | 3BFD78202663E16E002AD588 /* Sources */,
352 | 3BFD78212663E16E002AD588 /* Frameworks */,
353 | 3BFD78222663E16E002AD588 /* Resources */,
354 | );
355 | buildRules = (
356 | );
357 | dependencies = (
358 | 3BFD78262663E16E002AD588 /* PBXTargetDependency */,
359 | );
360 | name = PreviewCodeTests;
361 | productName = PreviewCodeTests;
362 | productReference = 3BFD78242663E16E002AD588 /* PreviewCodeTests.xctest */;
363 | productType = "com.apple.product-type.bundle.unit-test";
364 | };
365 | 3BFD782E2663E16E002AD588 /* PreviewCodeUITests */ = {
366 | isa = PBXNativeTarget;
367 | buildConfigurationList = 3BFD783E2663E16E002AD588 /* Build configuration list for PBXNativeTarget "PreviewCodeUITests" */;
368 | buildPhases = (
369 | 3BFD782B2663E16E002AD588 /* Sources */,
370 | 3BFD782C2663E16E002AD588 /* Frameworks */,
371 | 3BFD782D2663E16E002AD588 /* Resources */,
372 | );
373 | buildRules = (
374 | );
375 | dependencies = (
376 | 3BFD78312663E16E002AD588 /* PBXTargetDependency */,
377 | );
378 | name = PreviewCodeUITests;
379 | productName = PreviewCodeUITests;
380 | productReference = 3BFD782F2663E16E002AD588 /* PreviewCodeUITests.xctest */;
381 | productType = "com.apple.product-type.bundle.ui-testing";
382 | };
383 | 3BFD78442663E27D002AD588 /* Code Previewer */ = {
384 | isa = PBXNativeTarget;
385 | buildConfigurationList = 3BFD78542663E27D002AD588 /* Build configuration list for PBXNativeTarget "Code Previewer" */;
386 | buildPhases = (
387 | 3BFD78412663E27D002AD588 /* Sources */,
388 | 3BFD78422663E27D002AD588 /* Frameworks */,
389 | 3BFD78432663E27D002AD588 /* Resources */,
390 | );
391 | buildRules = (
392 | );
393 | dependencies = (
394 | );
395 | name = "Code Previewer";
396 | packageProductDependencies = (
397 | 3B1108B926714AE700A36A48 /* Highlighter */,
398 | );
399 | productName = "Code Previewer";
400 | productReference = 3BFD78452663E27D002AD588 /* Code Previewer.appex */;
401 | productType = "com.apple.product-type.app-extension";
402 | };
403 | /* End PBXNativeTarget section */
404 |
405 | /* Begin PBXProject section */
406 | 3BFD780C2663E16D002AD588 /* Project object */ = {
407 | isa = PBXProject;
408 | attributes = {
409 | BuildIndependentTargetsInParallel = YES;
410 | LastSwiftUpdateCheck = 1250;
411 | LastUpgradeCheck = 1530;
412 | TargetAttributes = {
413 | 3BE0EB9A266A845B00C9924E = {
414 | CreatedOnToolsVersion = 12.5;
415 | };
416 | 3BFD78132663E16D002AD588 = {
417 | CreatedOnToolsVersion = 12.5;
418 | };
419 | 3BFD78232663E16E002AD588 = {
420 | CreatedOnToolsVersion = 12.5;
421 | TestTargetID = 3BFD78132663E16D002AD588;
422 | };
423 | 3BFD782E2663E16E002AD588 = {
424 | CreatedOnToolsVersion = 12.5;
425 | TestTargetID = 3BFD78132663E16D002AD588;
426 | };
427 | 3BFD78442663E27D002AD588 = {
428 | CreatedOnToolsVersion = 12.5;
429 | };
430 | };
431 | };
432 | buildConfigurationList = 3BFD780F2663E16D002AD588 /* Build configuration list for PBXProject "PreviewCode" */;
433 | compatibilityVersion = "Xcode 9.3";
434 | developmentRegion = en;
435 | hasScannedForEncodings = 0;
436 | knownRegions = (
437 | en,
438 | Base,
439 | );
440 | mainGroup = 3BFD780B2663E16D002AD588;
441 | packageReferences = (
442 | 3B1108B626714ADA00A36A48 /* XCRemoteSwiftPackageReference "HighlighterSwift" */,
443 | );
444 | productRefGroup = 3BFD78152663E16D002AD588 /* Products */;
445 | projectDirPath = "";
446 | projectRoot = "";
447 | targets = (
448 | 3BFD78132663E16D002AD588 /* PreviewCode */,
449 | 3BFD78442663E27D002AD588 /* Code Previewer */,
450 | 3BE0EB9A266A845B00C9924E /* Code Thumbnailer */,
451 | 3BFD78232663E16E002AD588 /* PreviewCodeTests */,
452 | 3BFD782E2663E16E002AD588 /* PreviewCodeUITests */,
453 | );
454 | };
455 | /* End PBXProject section */
456 |
457 | /* Begin PBXResourcesBuildPhase section */
458 | 3BE0EB99266A845B00C9924E /* Resources */ = {
459 | isa = PBXResourcesBuildPhase;
460 | buildActionMask = 2147483647;
461 | files = (
462 | );
463 | runOnlyForDeploymentPostprocessing = 0;
464 | };
465 | 3BFD78122663E16D002AD588 /* Resources */ = {
466 | isa = PBXResourcesBuildPhase;
467 | buildActionMask = 2147483647;
468 | files = (
469 | 3B669A6C2AFBBFAC005AAFA3 /* new in Resources */,
470 | 3B271DCA268B0A9B00EFC72C /* themes-list.json in Resources */,
471 | 3B7D83D12A8A2FEE008A4B2E /* code-sample.txt in Resources */,
472 | 3B7D83D82A8A3069008A4B2E /* Assets.xcassets in Resources */,
473 | 3BFD781D2663E16E002AD588 /* MainMenu.xib in Resources */,
474 | );
475 | runOnlyForDeploymentPostprocessing = 0;
476 | };
477 | 3BFD78222663E16E002AD588 /* Resources */ = {
478 | isa = PBXResourcesBuildPhase;
479 | buildActionMask = 2147483647;
480 | files = (
481 | );
482 | runOnlyForDeploymentPostprocessing = 0;
483 | };
484 | 3BFD782D2663E16E002AD588 /* Resources */ = {
485 | isa = PBXResourcesBuildPhase;
486 | buildActionMask = 2147483647;
487 | files = (
488 | );
489 | runOnlyForDeploymentPostprocessing = 0;
490 | };
491 | 3BFD78432663E27D002AD588 /* Resources */ = {
492 | isa = PBXResourcesBuildPhase;
493 | buildActionMask = 2147483647;
494 | files = (
495 | 3B95C9322666222D00C7CC14 /* Highlightr Licence in Resources */,
496 | 3B95C9312666222D00C7CC14 /* Highlight.js Licence in Resources */,
497 | 3BFD784E2663E27D002AD588 /* PreviewViewController.xib in Resources */,
498 | );
499 | runOnlyForDeploymentPostprocessing = 0;
500 | };
501 | /* End PBXResourcesBuildPhase section */
502 |
503 | /* Begin PBXSourcesBuildPhase section */
504 | 3BE0EB97266A845B00C9924E /* Sources */ = {
505 | isa = PBXSourcesBuildPhase;
506 | buildActionMask = 2147483647;
507 | files = (
508 | 3BE0EBAC266A848400C9924E /* Common.swift in Sources */,
509 | 3BE0EBA1266A845B00C9924E /* ThumbnailProvider.swift in Sources */,
510 | 3B7D83D92A8A306C008A4B2E /* REPLACE_WITH_YOUR_CODES.swift in Sources */,
511 | 3BF52B11266A883F002EC860 /* Constants.swift in Sources */,
512 | );
513 | runOnlyForDeploymentPostprocessing = 0;
514 | };
515 | 3BFD78102663E16D002AD588 /* Sources */ = {
516 | isa = PBXSourcesBuildPhase;
517 | buildActionMask = 2147483647;
518 | files = (
519 | 3BFD78182663E16D002AD588 /* AppDelegate.swift in Sources */,
520 | 3BAE671B28D4D3AD001532BD /* GenericFontExtensions.swift in Sources */,
521 | 3BFBEC3C2664058400B4E70C /* ThemeTableCellView.swift in Sources */,
522 | 3BA5D03B269081BF00AF4EF2 /* PMFont.swift in Sources */,
523 | 3B6ABACC2669703800A436AA /* PreviewTextView.swift in Sources */,
524 | 3BDE3EF6267CE9890037351C /* GenericExtensions.swift in Sources */,
525 | 3B3F580D29D5892900E227C7 /* PCImageView.swift in Sources */,
526 | 3B6ABAC52669649500A436AA /* Common.swift in Sources */,
527 | 3B7D83D52A8A3034008A4B2E /* REPLACE_WITH_YOUR_CODES.swift in Sources */,
528 | 3BFD78592663E2C9002AD588 /* Constants.swift in Sources */,
529 | 3B7D83D62A8A3034008A4B2E /* REPLACE_WITH_YOUR_FUNCTIONS.swift in Sources */,
530 | );
531 | runOnlyForDeploymentPostprocessing = 0;
532 | };
533 | 3BFD78202663E16E002AD588 /* Sources */ = {
534 | isa = PBXSourcesBuildPhase;
535 | buildActionMask = 2147483647;
536 | files = (
537 | 3BFD78292663E16E002AD588 /* PreviewCodeTests.swift in Sources */,
538 | );
539 | runOnlyForDeploymentPostprocessing = 0;
540 | };
541 | 3BFD782B2663E16E002AD588 /* Sources */ = {
542 | isa = PBXSourcesBuildPhase;
543 | buildActionMask = 2147483647;
544 | files = (
545 | 3BFD78342663E16E002AD588 /* PreviewCodeUITests.swift in Sources */,
546 | );
547 | runOnlyForDeploymentPostprocessing = 0;
548 | };
549 | 3BFD78412663E27D002AD588 /* Sources */ = {
550 | isa = PBXSourcesBuildPhase;
551 | buildActionMask = 2147483647;
552 | files = (
553 | 3BFD78602663E4C9002AD588 /* Common.swift in Sources */,
554 | 3BFD784B2663E27D002AD588 /* PreviewViewController.swift in Sources */,
555 | 3B7D83DA2A8A306D008A4B2E /* REPLACE_WITH_YOUR_CODES.swift in Sources */,
556 | 3BFD785A2663E2C9002AD588 /* Constants.swift in Sources */,
557 | );
558 | runOnlyForDeploymentPostprocessing = 0;
559 | };
560 | /* End PBXSourcesBuildPhase section */
561 |
562 | /* Begin PBXTargetDependency section */
563 | 3BE0EBA5266A845B00C9924E /* PBXTargetDependency */ = {
564 | isa = PBXTargetDependency;
565 | target = 3BE0EB9A266A845B00C9924E /* Code Thumbnailer */;
566 | targetProxy = 3BE0EBA4266A845B00C9924E /* PBXContainerItemProxy */;
567 | };
568 | 3BFD78262663E16E002AD588 /* PBXTargetDependency */ = {
569 | isa = PBXTargetDependency;
570 | target = 3BFD78132663E16D002AD588 /* PreviewCode */;
571 | targetProxy = 3BFD78252663E16E002AD588 /* PBXContainerItemProxy */;
572 | };
573 | 3BFD78312663E16E002AD588 /* PBXTargetDependency */ = {
574 | isa = PBXTargetDependency;
575 | target = 3BFD78132663E16D002AD588 /* PreviewCode */;
576 | targetProxy = 3BFD78302663E16E002AD588 /* PBXContainerItemProxy */;
577 | };
578 | 3BFD78522663E27D002AD588 /* PBXTargetDependency */ = {
579 | isa = PBXTargetDependency;
580 | target = 3BFD78442663E27D002AD588 /* Code Previewer */;
581 | targetProxy = 3BFD78512663E27D002AD588 /* PBXContainerItemProxy */;
582 | };
583 | /* End PBXTargetDependency section */
584 |
585 | /* Begin PBXVariantGroup section */
586 | 3BFD781B2663E16E002AD588 /* MainMenu.xib */ = {
587 | isa = PBXVariantGroup;
588 | children = (
589 | 3BFD781C2663E16E002AD588 /* Base */,
590 | );
591 | name = MainMenu.xib;
592 | sourceTree = "";
593 | };
594 | 3BFD784C2663E27D002AD588 /* PreviewViewController.xib */ = {
595 | isa = PBXVariantGroup;
596 | children = (
597 | 3BFD784D2663E27D002AD588 /* Base */,
598 | );
599 | name = PreviewViewController.xib;
600 | sourceTree = "";
601 | };
602 | /* End PBXVariantGroup section */
603 |
604 | /* Begin XCBuildConfiguration section */
605 | 3BE0EBA7266A845B00C9924E /* Debug */ = {
606 | isa = XCBuildConfiguration;
607 | buildSettings = {
608 | CODE_SIGN_ENTITLEMENTS = "Code Thumbnailer/Code_Thumbnailer.entitlements";
609 | CODE_SIGN_IDENTITY = "Apple Development";
610 | CODE_SIGN_STYLE = Manual;
611 | CURRENT_PROJECT_VERSION = "${CURRENT_PROJECT_VERSION}";
612 | DEAD_CODE_STRIPPING = YES;
613 | DEVELOPMENT_TEAM = Y5J3K52DNA;
614 | ENABLE_HARDENED_RUNTIME = YES;
615 | GCC_PREPROCESSOR_DEFINITIONS = (
616 | "DEBUG=1",
617 | "$(inherited)",
618 | );
619 | INFOPLIST_FILE = "Code Thumbnailer/Info.plist";
620 | LD_RUNPATH_SEARCH_PATHS = (
621 | "$(inherited)",
622 | "@executable_path/../Frameworks",
623 | "@executable_path/../../../../Frameworks",
624 | );
625 | MACOSX_DEPLOYMENT_TARGET = 10.15;
626 | MARKETING_VERSION = "$(MARKETING_VERSION)";
627 | OTHER_SWIFT_FLAGS = "";
628 | PRODUCT_BUNDLE_IDENTIFIER = "com.bps.PreviewCode.Code-Thumbnailer";
629 | PRODUCT_NAME = "$(TARGET_NAME)";
630 | PROVISIONING_PROFILE_SPECIFIER = "";
631 | SKIP_INSTALL = YES;
632 | SWIFT_VERSION = 5.0;
633 | };
634 | name = Debug;
635 | };
636 | 3BE0EBA8266A845B00C9924E /* Release */ = {
637 | isa = XCBuildConfiguration;
638 | buildSettings = {
639 | CODE_SIGN_ENTITLEMENTS = "Code Thumbnailer/Code_Thumbnailer.entitlements";
640 | CODE_SIGN_IDENTITY = "Apple Development";
641 | CODE_SIGN_STYLE = Manual;
642 | CURRENT_PROJECT_VERSION = "${CURRENT_PROJECT_VERSION}";
643 | DEAD_CODE_STRIPPING = YES;
644 | DEVELOPMENT_TEAM = Y5J3K52DNA;
645 | ENABLE_HARDENED_RUNTIME = YES;
646 | GCC_PREPROCESSOR_DEFINITIONS = "";
647 | INFOPLIST_FILE = "Code Thumbnailer/Info.plist";
648 | LD_RUNPATH_SEARCH_PATHS = (
649 | "$(inherited)",
650 | "@executable_path/../Frameworks",
651 | "@executable_path/../../../../Frameworks",
652 | );
653 | MACOSX_DEPLOYMENT_TARGET = 10.15;
654 | MARKETING_VERSION = "$(MARKETING_VERSION)";
655 | OTHER_SWIFT_FLAGS = "";
656 | PRODUCT_BUNDLE_IDENTIFIER = "com.bps.PreviewCode.Code-Thumbnailer";
657 | PRODUCT_NAME = "$(TARGET_NAME)";
658 | PROVISIONING_PROFILE_SPECIFIER = "";
659 | SKIP_INSTALL = YES;
660 | SWIFT_VERSION = 5.0;
661 | };
662 | name = Release;
663 | };
664 | 3BFD78362663E16E002AD588 /* Debug */ = {
665 | isa = XCBuildConfiguration;
666 | buildSettings = {
667 | ALWAYS_SEARCH_USER_PATHS = NO;
668 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
669 | CLANG_ANALYZER_NONNULL = YES;
670 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
671 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
672 | CLANG_CXX_LIBRARY = "libc++";
673 | CLANG_ENABLE_MODULES = YES;
674 | CLANG_ENABLE_OBJC_ARC = YES;
675 | CLANG_ENABLE_OBJC_WEAK = YES;
676 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
677 | CLANG_WARN_BOOL_CONVERSION = YES;
678 | CLANG_WARN_COMMA = YES;
679 | CLANG_WARN_CONSTANT_CONVERSION = YES;
680 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
681 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
682 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
683 | CLANG_WARN_EMPTY_BODY = YES;
684 | CLANG_WARN_ENUM_CONVERSION = YES;
685 | CLANG_WARN_INFINITE_RECURSION = YES;
686 | CLANG_WARN_INT_CONVERSION = YES;
687 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
688 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
689 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
690 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
691 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
692 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
693 | CLANG_WARN_STRICT_PROTOTYPES = YES;
694 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
695 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
696 | CLANG_WARN_UNREACHABLE_CODE = YES;
697 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
698 | COPY_PHASE_STRIP = NO;
699 | CURRENT_PROJECT_VERSION = 91;
700 | DEAD_CODE_STRIPPING = YES;
701 | DEBUG_INFORMATION_FORMAT = dwarf;
702 | ENABLE_STRICT_OBJC_MSGSEND = YES;
703 | ENABLE_TESTABILITY = YES;
704 | ENABLE_USER_SCRIPT_SANDBOXING = YES;
705 | GCC_C_LANGUAGE_STANDARD = gnu11;
706 | GCC_DYNAMIC_NO_PIC = NO;
707 | GCC_NO_COMMON_BLOCKS = YES;
708 | GCC_OPTIMIZATION_LEVEL = 0;
709 | GCC_PREPROCESSOR_DEFINITIONS = (
710 | "DEBUG=1",
711 | "$(inherited)",
712 | );
713 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
714 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
715 | GCC_WARN_UNDECLARED_SELECTOR = YES;
716 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
717 | GCC_WARN_UNUSED_FUNCTION = YES;
718 | GCC_WARN_UNUSED_VARIABLE = YES;
719 | MACOSX_DEPLOYMENT_TARGET = 10.15;
720 | MARKETING_VERSION = 1.3.4;
721 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
722 | MTL_FAST_MATH = YES;
723 | ONLY_ACTIVE_ARCH = YES;
724 | SDKROOT = macosx;
725 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
726 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
727 | VERSIONING_SYSTEM = "apple-generic";
728 | };
729 | name = Debug;
730 | };
731 | 3BFD78372663E16E002AD588 /* Release */ = {
732 | isa = XCBuildConfiguration;
733 | buildSettings = {
734 | ALWAYS_SEARCH_USER_PATHS = NO;
735 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
736 | CLANG_ANALYZER_NONNULL = YES;
737 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
738 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
739 | CLANG_CXX_LIBRARY = "libc++";
740 | CLANG_ENABLE_MODULES = YES;
741 | CLANG_ENABLE_OBJC_ARC = YES;
742 | CLANG_ENABLE_OBJC_WEAK = YES;
743 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
744 | CLANG_WARN_BOOL_CONVERSION = YES;
745 | CLANG_WARN_COMMA = YES;
746 | CLANG_WARN_CONSTANT_CONVERSION = YES;
747 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
748 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
749 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
750 | CLANG_WARN_EMPTY_BODY = YES;
751 | CLANG_WARN_ENUM_CONVERSION = YES;
752 | CLANG_WARN_INFINITE_RECURSION = YES;
753 | CLANG_WARN_INT_CONVERSION = YES;
754 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
755 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
756 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
757 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
758 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
759 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
760 | CLANG_WARN_STRICT_PROTOTYPES = YES;
761 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
762 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
763 | CLANG_WARN_UNREACHABLE_CODE = YES;
764 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
765 | COPY_PHASE_STRIP = NO;
766 | CURRENT_PROJECT_VERSION = 91;
767 | DEAD_CODE_STRIPPING = YES;
768 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
769 | ENABLE_NS_ASSERTIONS = NO;
770 | ENABLE_STRICT_OBJC_MSGSEND = YES;
771 | ENABLE_USER_SCRIPT_SANDBOXING = YES;
772 | GCC_C_LANGUAGE_STANDARD = gnu11;
773 | GCC_NO_COMMON_BLOCKS = YES;
774 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
775 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
776 | GCC_WARN_UNDECLARED_SELECTOR = YES;
777 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
778 | GCC_WARN_UNUSED_FUNCTION = YES;
779 | GCC_WARN_UNUSED_VARIABLE = YES;
780 | MACOSX_DEPLOYMENT_TARGET = 10.15;
781 | MARKETING_VERSION = 1.3.4;
782 | MTL_ENABLE_DEBUG_INFO = NO;
783 | MTL_FAST_MATH = YES;
784 | SDKROOT = macosx;
785 | SWIFT_COMPILATION_MODE = wholemodule;
786 | SWIFT_OPTIMIZATION_LEVEL = "-O";
787 | VERSIONING_SYSTEM = "apple-generic";
788 | };
789 | name = Release;
790 | };
791 | 3BFD78392663E16E002AD588 /* Debug */ = {
792 | isa = XCBuildConfiguration;
793 | buildSettings = {
794 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
795 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
796 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
797 | CODE_SIGN_ENTITLEMENTS = PreviewCode/PreviewCode.entitlements;
798 | CODE_SIGN_IDENTITY = "Apple Development";
799 | CODE_SIGN_STYLE = Manual;
800 | COMBINE_HIDPI_IMAGES = YES;
801 | CURRENT_PROJECT_VERSION = "${CURRENT_PROJECT_VERSION}";
802 | DEAD_CODE_STRIPPING = YES;
803 | DEVELOPMENT_TEAM = Y5J3K52DNA;
804 | ENABLE_HARDENED_RUNTIME = YES;
805 | GCC_PREPROCESSOR_DEFINITIONS = (
806 | "DEBUG=1",
807 | "$(inherited)",
808 | "TARGET_IS_PC=1",
809 | );
810 | INFOPLIST_FILE = PreviewCode/Info.plist;
811 | INFOPLIST_KEY_CFBundleDisplayName = PreviewCode;
812 | INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Tony Smith. All rights reserved.";
813 | INFOPLIST_KEY_NSMainNibFile = MainMenu;
814 | LD_RUNPATH_SEARCH_PATHS = (
815 | "$(inherited)",
816 | "@executable_path/../Frameworks",
817 | );
818 | MACOSX_DEPLOYMENT_TARGET = 10.15;
819 | MARKETING_VERSION = "$(MARKETING_VERSION)";
820 | OTHER_LDFLAGS = "";
821 | OTHER_SWIFT_FLAGS = "-D TARGET_IS_PC";
822 | PRODUCT_BUNDLE_IDENTIFIER = com.bps.PreviewCode;
823 | PRODUCT_NAME = "$(TARGET_NAME)";
824 | PROVISIONING_PROFILE_SPECIFIER = "";
825 | SWIFT_VERSION = 5.0;
826 | };
827 | name = Debug;
828 | };
829 | 3BFD783A2663E16E002AD588 /* Release */ = {
830 | isa = XCBuildConfiguration;
831 | buildSettings = {
832 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
833 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
834 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
835 | CODE_SIGN_ENTITLEMENTS = PreviewCode/PreviewCode.entitlements;
836 | CODE_SIGN_IDENTITY = "Apple Development";
837 | CODE_SIGN_STYLE = Manual;
838 | COMBINE_HIDPI_IMAGES = YES;
839 | CURRENT_PROJECT_VERSION = "${CURRENT_PROJECT_VERSION}";
840 | DEAD_CODE_STRIPPING = YES;
841 | DEVELOPMENT_TEAM = Y5J3K52DNA;
842 | ENABLE_HARDENED_RUNTIME = YES;
843 | GCC_PREPROCESSOR_DEFINITIONS = "TARGET_IS_PC=1";
844 | INFOPLIST_FILE = PreviewCode/Info.plist;
845 | INFOPLIST_KEY_CFBundleDisplayName = PreviewCode;
846 | INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Tony Smith. All rights reserved.";
847 | INFOPLIST_KEY_NSMainNibFile = MainMenu;
848 | LD_RUNPATH_SEARCH_PATHS = (
849 | "$(inherited)",
850 | "@executable_path/../Frameworks",
851 | );
852 | MACOSX_DEPLOYMENT_TARGET = 10.15;
853 | MARKETING_VERSION = "$(MARKETING_VERSION)";
854 | ONLY_ACTIVE_ARCH = NO;
855 | OTHER_LDFLAGS = "";
856 | OTHER_SWIFT_FLAGS = "-D TARGET_IS_PC";
857 | PRODUCT_BUNDLE_IDENTIFIER = com.bps.PreviewCode;
858 | PRODUCT_NAME = "$(TARGET_NAME)";
859 | PROVISIONING_PROFILE_SPECIFIER = "";
860 | SWIFT_VERSION = 5.0;
861 | };
862 | name = Release;
863 | };
864 | 3BFD783C2663E16E002AD588 /* Debug */ = {
865 | isa = XCBuildConfiguration;
866 | buildSettings = {
867 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
868 | BUNDLE_LOADER = "$(TEST_HOST)";
869 | CODE_SIGN_STYLE = Automatic;
870 | COMBINE_HIDPI_IMAGES = YES;
871 | DEAD_CODE_STRIPPING = YES;
872 | DEVELOPMENT_TEAM = Y5J3K52DNA;
873 | INFOPLIST_FILE = PreviewCodeTests/Info.plist;
874 | LD_RUNPATH_SEARCH_PATHS = (
875 | "$(inherited)",
876 | "@executable_path/../Frameworks",
877 | "@loader_path/../Frameworks",
878 | );
879 | MACOSX_DEPLOYMENT_TARGET = 11.3;
880 | PRODUCT_BUNDLE_IDENTIFIER = com.bps.PreviewCodeTests;
881 | PRODUCT_NAME = "$(TARGET_NAME)";
882 | SWIFT_VERSION = 5.0;
883 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PreviewCode.app/Contents/MacOS/PreviewCode";
884 | };
885 | name = Debug;
886 | };
887 | 3BFD783D2663E16E002AD588 /* Release */ = {
888 | isa = XCBuildConfiguration;
889 | buildSettings = {
890 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
891 | BUNDLE_LOADER = "$(TEST_HOST)";
892 | CODE_SIGN_STYLE = Automatic;
893 | COMBINE_HIDPI_IMAGES = YES;
894 | DEAD_CODE_STRIPPING = YES;
895 | DEVELOPMENT_TEAM = Y5J3K52DNA;
896 | INFOPLIST_FILE = PreviewCodeTests/Info.plist;
897 | LD_RUNPATH_SEARCH_PATHS = (
898 | "$(inherited)",
899 | "@executable_path/../Frameworks",
900 | "@loader_path/../Frameworks",
901 | );
902 | MACOSX_DEPLOYMENT_TARGET = 11.3;
903 | PRODUCT_BUNDLE_IDENTIFIER = com.bps.PreviewCodeTests;
904 | PRODUCT_NAME = "$(TARGET_NAME)";
905 | SWIFT_VERSION = 5.0;
906 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PreviewCode.app/Contents/MacOS/PreviewCode";
907 | };
908 | name = Release;
909 | };
910 | 3BFD783F2663E16E002AD588 /* Debug */ = {
911 | isa = XCBuildConfiguration;
912 | buildSettings = {
913 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
914 | CODE_SIGN_STYLE = Automatic;
915 | COMBINE_HIDPI_IMAGES = YES;
916 | DEAD_CODE_STRIPPING = YES;
917 | DEVELOPMENT_TEAM = Y5J3K52DNA;
918 | INFOPLIST_FILE = PreviewCodeUITests/Info.plist;
919 | LD_RUNPATH_SEARCH_PATHS = (
920 | "$(inherited)",
921 | "@executable_path/../Frameworks",
922 | "@loader_path/../Frameworks",
923 | );
924 | PRODUCT_BUNDLE_IDENTIFIER = com.bps.PreviewCodeUITests;
925 | PRODUCT_NAME = "$(TARGET_NAME)";
926 | SWIFT_VERSION = 5.0;
927 | TEST_TARGET_NAME = PreviewCode;
928 | };
929 | name = Debug;
930 | };
931 | 3BFD78402663E16E002AD588 /* Release */ = {
932 | isa = XCBuildConfiguration;
933 | buildSettings = {
934 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
935 | CODE_SIGN_STYLE = Automatic;
936 | COMBINE_HIDPI_IMAGES = YES;
937 | DEAD_CODE_STRIPPING = YES;
938 | DEVELOPMENT_TEAM = Y5J3K52DNA;
939 | INFOPLIST_FILE = PreviewCodeUITests/Info.plist;
940 | LD_RUNPATH_SEARCH_PATHS = (
941 | "$(inherited)",
942 | "@executable_path/../Frameworks",
943 | "@loader_path/../Frameworks",
944 | );
945 | PRODUCT_BUNDLE_IDENTIFIER = com.bps.PreviewCodeUITests;
946 | PRODUCT_NAME = "$(TARGET_NAME)";
947 | SWIFT_VERSION = 5.0;
948 | TEST_TARGET_NAME = PreviewCode;
949 | };
950 | name = Release;
951 | };
952 | 3BFD78552663E27D002AD588 /* Debug */ = {
953 | isa = XCBuildConfiguration;
954 | buildSettings = {
955 | CODE_SIGN_ENTITLEMENTS = "Code Previewer/Code_Previewer.entitlements";
956 | CODE_SIGN_IDENTITY = "Apple Development";
957 | CODE_SIGN_STYLE = Manual;
958 | CURRENT_PROJECT_VERSION = "${CURRENT_PROJECT_VERSION}";
959 | DEAD_CODE_STRIPPING = YES;
960 | DEVELOPMENT_TEAM = Y5J3K52DNA;
961 | ENABLE_HARDENED_RUNTIME = YES;
962 | INFOPLIST_FILE = "Code Previewer/Info.plist";
963 | LD_RUNPATH_SEARCH_PATHS = (
964 | "$(inherited)",
965 | "@executable_path/../Frameworks",
966 | "@executable_path/../../../../Frameworks",
967 | );
968 | LIBRARY_SEARCH_PATHS = "";
969 | MACOSX_DEPLOYMENT_TARGET = 10.15;
970 | MARKETING_VERSION = "$(MARKETING_VERSION)";
971 | OTHER_LDFLAGS = (
972 | "$(inherited)",
973 | "-ObjC",
974 | );
975 | "OTHER_LDFLAGS[arch=*]" = "$(inherited)";
976 | PRODUCT_BUNDLE_IDENTIFIER = "com.bps.PreviewCode.Code-Previewer";
977 | PRODUCT_NAME = "$(TARGET_NAME)";
978 | PROVISIONING_PROFILE_SPECIFIER = "";
979 | SKIP_INSTALL = YES;
980 | SWIFT_VERSION = 5.0;
981 | };
982 | name = Debug;
983 | };
984 | 3BFD78562663E27D002AD588 /* Release */ = {
985 | isa = XCBuildConfiguration;
986 | buildSettings = {
987 | CODE_SIGN_ENTITLEMENTS = "Code Previewer/Code_Previewer.entitlements";
988 | CODE_SIGN_IDENTITY = "Apple Development";
989 | CODE_SIGN_STYLE = Manual;
990 | CURRENT_PROJECT_VERSION = "${CURRENT_PROJECT_VERSION}";
991 | DEAD_CODE_STRIPPING = YES;
992 | DEVELOPMENT_TEAM = Y5J3K52DNA;
993 | ENABLE_HARDENED_RUNTIME = YES;
994 | INFOPLIST_FILE = "Code Previewer/Info.plist";
995 | LD_RUNPATH_SEARCH_PATHS = (
996 | "$(inherited)",
997 | "@executable_path/../Frameworks",
998 | "@executable_path/../../../../Frameworks",
999 | );
1000 | LIBRARY_SEARCH_PATHS = "";
1001 | MACOSX_DEPLOYMENT_TARGET = 10.15;
1002 | MARKETING_VERSION = "$(MARKETING_VERSION)";
1003 | OTHER_LDFLAGS = (
1004 | "$(inherited)",
1005 | "-ObjC",
1006 | );
1007 | PRODUCT_BUNDLE_IDENTIFIER = "com.bps.PreviewCode.Code-Previewer";
1008 | PRODUCT_NAME = "$(TARGET_NAME)";
1009 | PROVISIONING_PROFILE_SPECIFIER = "";
1010 | SKIP_INSTALL = YES;
1011 | SWIFT_VERSION = 5.0;
1012 | };
1013 | name = Release;
1014 | };
1015 | /* End XCBuildConfiguration section */
1016 |
1017 | /* Begin XCConfigurationList section */
1018 | 3BE0EBA9266A845B00C9924E /* Build configuration list for PBXNativeTarget "Code Thumbnailer" */ = {
1019 | isa = XCConfigurationList;
1020 | buildConfigurations = (
1021 | 3BE0EBA7266A845B00C9924E /* Debug */,
1022 | 3BE0EBA8266A845B00C9924E /* Release */,
1023 | );
1024 | defaultConfigurationIsVisible = 0;
1025 | defaultConfigurationName = Release;
1026 | };
1027 | 3BFD780F2663E16D002AD588 /* Build configuration list for PBXProject "PreviewCode" */ = {
1028 | isa = XCConfigurationList;
1029 | buildConfigurations = (
1030 | 3BFD78362663E16E002AD588 /* Debug */,
1031 | 3BFD78372663E16E002AD588 /* Release */,
1032 | );
1033 | defaultConfigurationIsVisible = 0;
1034 | defaultConfigurationName = Release;
1035 | };
1036 | 3BFD78382663E16E002AD588 /* Build configuration list for PBXNativeTarget "PreviewCode" */ = {
1037 | isa = XCConfigurationList;
1038 | buildConfigurations = (
1039 | 3BFD78392663E16E002AD588 /* Debug */,
1040 | 3BFD783A2663E16E002AD588 /* Release */,
1041 | );
1042 | defaultConfigurationIsVisible = 0;
1043 | defaultConfigurationName = Release;
1044 | };
1045 | 3BFD783B2663E16E002AD588 /* Build configuration list for PBXNativeTarget "PreviewCodeTests" */ = {
1046 | isa = XCConfigurationList;
1047 | buildConfigurations = (
1048 | 3BFD783C2663E16E002AD588 /* Debug */,
1049 | 3BFD783D2663E16E002AD588 /* Release */,
1050 | );
1051 | defaultConfigurationIsVisible = 0;
1052 | defaultConfigurationName = Release;
1053 | };
1054 | 3BFD783E2663E16E002AD588 /* Build configuration list for PBXNativeTarget "PreviewCodeUITests" */ = {
1055 | isa = XCConfigurationList;
1056 | buildConfigurations = (
1057 | 3BFD783F2663E16E002AD588 /* Debug */,
1058 | 3BFD78402663E16E002AD588 /* Release */,
1059 | );
1060 | defaultConfigurationIsVisible = 0;
1061 | defaultConfigurationName = Release;
1062 | };
1063 | 3BFD78542663E27D002AD588 /* Build configuration list for PBXNativeTarget "Code Previewer" */ = {
1064 | isa = XCConfigurationList;
1065 | buildConfigurations = (
1066 | 3BFD78552663E27D002AD588 /* Debug */,
1067 | 3BFD78562663E27D002AD588 /* Release */,
1068 | );
1069 | defaultConfigurationIsVisible = 0;
1070 | defaultConfigurationName = Release;
1071 | };
1072 | /* End XCConfigurationList section */
1073 |
1074 | /* Begin XCRemoteSwiftPackageReference section */
1075 | 3B1108B626714ADA00A36A48 /* XCRemoteSwiftPackageReference "HighlighterSwift" */ = {
1076 | isa = XCRemoteSwiftPackageReference;
1077 | repositoryURL = "https://github.com/smittytone/HighlighterSwift.git";
1078 | requirement = {
1079 | branch = develop;
1080 | kind = branch;
1081 | };
1082 | };
1083 | /* End XCRemoteSwiftPackageReference section */
1084 |
1085 | /* Begin XCSwiftPackageProductDependency section */
1086 | 3B1108B726714ADA00A36A48 /* Highlighter */ = {
1087 | isa = XCSwiftPackageProductDependency;
1088 | package = 3B1108B626714ADA00A36A48 /* XCRemoteSwiftPackageReference "HighlighterSwift" */;
1089 | productName = Highlighter;
1090 | };
1091 | 3B1108B926714AE700A36A48 /* Highlighter */ = {
1092 | isa = XCSwiftPackageProductDependency;
1093 | package = 3B1108B626714ADA00A36A48 /* XCRemoteSwiftPackageReference "HighlighterSwift" */;
1094 | productName = Highlighter;
1095 | };
1096 | 3B1108BB26714AED00A36A48 /* Highlighter */ = {
1097 | isa = XCSwiftPackageProductDependency;
1098 | package = 3B1108B626714ADA00A36A48 /* XCRemoteSwiftPackageReference "HighlighterSwift" */;
1099 | productName = Highlighter;
1100 | };
1101 | /* End XCSwiftPackageProductDependency section */
1102 | };
1103 | rootObject = 3BFD780C2663E16D002AD588 /* Project object */;
1104 | }
1105 |
--------------------------------------------------------------------------------
/PreviewCode.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PreviewCode.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/PreviewCode.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "originHash" : "d6c981f093ab3c2621a052af876be1b634b864498115af3fb574de4e387f229a",
3 | "pins" : [
4 | {
5 | "identity" : "highlighterswift",
6 | "kind" : "remoteSourceControl",
7 | "location" : "https://github.com/smittytone/HighlighterSwift.git",
8 | "state" : {
9 | "branch" : "develop",
10 | "revision" : "7faedca3fe85b807848f8ac9729427a1abcf8a90"
11 | }
12 | }
13 | ],
14 | "version" : 3
15 | }
16 |
--------------------------------------------------------------------------------
/PreviewCode.xcodeproj/xcshareddata/xcschemes/Code Previewer.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
6 |
9 |
10 |
16 |
22 |
23 |
24 |
30 |
36 |
37 |
38 |
39 |
40 |
45 |
46 |
47 |
48 |
60 |
62 |
68 |
69 |
70 |
71 |
79 |
81 |
87 |
88 |
89 |
90 |
92 |
93 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/PreviewCode.xcodeproj/xcshareddata/xcschemes/Code Thumbnailer.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
6 |
9 |
10 |
16 |
22 |
23 |
24 |
30 |
36 |
37 |
38 |
39 |
40 |
45 |
46 |
47 |
48 |
63 |
65 |
71 |
72 |
73 |
74 |
78 |
79 |
80 |
81 |
89 |
91 |
97 |
98 |
99 |
100 |
102 |
103 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/PreviewCode.xcodeproj/xcshareddata/xcschemes/PreviewCode.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
11 |
14 |
15 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
33 |
39 |
40 |
41 |
42 |
43 |
48 |
49 |
51 |
57 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
81 |
83 |
89 |
90 |
91 |
92 |
98 |
100 |
106 |
107 |
108 |
109 |
111 |
112 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/PreviewCode/Constants.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * Constants.swift
3 | * PreviewCode
4 | *
5 | * Created by Tony Smith on 30/05/2021.
6 | * Copyright © 2024 Tony Smith. All rights reserved.
7 | */
8 |
9 | import Foundation
10 |
11 |
12 | /*
13 | * Combine the app's various constants into a struct
14 | */
15 | struct BUFFOON_CONSTANTS {
16 |
17 | struct ERRORS {
18 |
19 | struct CODES {
20 | static let NONE = 0
21 | static let FILE_INACCESSIBLE = 400
22 | static let FILE_WONT_OPEN = 401
23 | static let BAD_MD_STRING = 402
24 | static let BAD_TS_STRING = 403
25 | static let BAD_HIGHLIGHTER = 404
26 | }
27 |
28 | struct MESSAGES {
29 | static let NO_ERROR = "No error"
30 | static let FILE_INACCESSIBLE = "Can't access file"
31 | static let FILE_WONT_OPEN = "Can't open file"
32 | static let BAD_MD_STRING = "Source code uses an unsupported encoding"
33 | static let BAD_TS_STRING = "Can't access NSTextView's TextStorage"
34 | static let BAD_HIGHLIGHTER = "Can’t set up the highlighting engine"
35 | }
36 | }
37 |
38 | struct THUMBNAIL_SIZE {
39 |
40 | static let ORIGIN_X = 0
41 | static let ORIGIN_Y = 0
42 | static let WIDTH = 768
43 | static let HEIGHT = 1024
44 | static let ASPECT = 0.75
45 | static let TAG_HEIGHT = 204.8
46 | }
47 |
48 | struct DISPLAY_MODE {
49 |
50 | static let ALL = 0
51 | static let DARK = 1
52 | static let LIGHT = 2
53 | // FROM 1.3.0
54 | static let AUTO = 3
55 |
56 | }
57 |
58 | static let BASE_PREVIEW_FONT_SIZE = 16.0
59 | static let BASE_THUMBNAIL_FONT_SIZE = 18.0
60 | static let THEME_PREVIEW_FONT_SIZE = 7.0
61 |
62 | static let FONT_SIZE_OPTIONS: [CGFloat] = [10.0, 12.0, 14.0, 16.0, 18.0, 24.0, 28.0]
63 |
64 | static let DEFAULT_THEME = "dark.agate"
65 | // FROM 1.2.1 -- Change default font: Courier not included with macOS now
66 | static let DEFAULT_FONT = "Menlo-Regular"
67 | static let DEFAULT_FONT_NAME = "Menlo"
68 | static let DEFAULT_LANGUAGE_UTI = "swift-source"
69 | static let DEFAULT_LANGUAGE = "swift"
70 | static let DEFAULT_THUMB_THEME = "light.atom-one-light"
71 |
72 | static let FILE_CODE_SAMPLE = "code-sample"
73 | static let FILE_THEME_LIST = "themes-list"
74 |
75 | static let TAG_TEXT_SIZE = 180
76 | static let TAG_TEXT_MIN_SIZE = 118
77 |
78 | static let SUITE_NAME = ".suite.preview-code"
79 | static let APP_STORE = "https://apps.apple.com/gb/app/previewcode/id1571797683"
80 | static let MAIN_URL = "https://smittytone.net/previewcode/index.html"
81 |
82 | // FROM 1.1.1
83 | static let THUMBNAIL_LINE_COUNT = 38
84 |
85 | // FROM 1.2.5
86 | struct APP_URLS {
87 |
88 | static let PM = "https://apps.apple.com/us/app/previewmarkdown/id1492280469?ls=1"
89 | static let PC = "https://apps.apple.com/us/app/previewcode/id1571797683?ls=1"
90 | static let PY = "https://apps.apple.com/us/app/previewyaml/id1564574724?ls=1"
91 | static let PJ = "https://apps.apple.com/us/app/previewjson/id6443584377?ls=1"
92 | static let PT = "https://apps.apple.com/us/app/previewtext/id1660037028?ls=1"
93 | }
94 |
95 | // FROM 1.2.7
96 | struct PREFS_IDS {
97 |
98 | static let MAIN_WHATS_NEW = "com-bps-previewcode-do-show-whats-new-"
99 |
100 | static let PREVIEW_FONT_SIZE = "com-bps-previewcode-base-font-size"
101 | static let PREVIEW_FONT_NAME = "com-bps-previewcode-base-font-name"
102 | static let PREVIEW_THEME_NAME = "com-bps-previewcode-theme-name"
103 | static let PREVIEW_USE_LIGHT = "com-bps-previewcode-do-use-light"
104 | static let PREVIEW_LINE_SPACING = "com-bps-previewcode-line-spacing"
105 | // FROM 1.3.0
106 | static let PREVIEW_LIGHT_NAME = "com-bps-previewcode-light-theme-name"
107 | static let PREVIEW_DARK_NAME = "com-bps-previewcode-dark-theme-name"
108 | static let PREVIEW_THEME_MODE = "com-bps-previewcode-theme-mode"
109 |
110 | static let THUMB_FONT_SIZE = "com-bps-previewcode-thumb-font-size"
111 |
112 | }
113 |
114 | static let PREVIEW_ERR_DOMAIN = "com.bps.PreviewCode.Code-Previewer"
115 |
116 | // FROM 1.3.0
117 | static let DEFAULT_THEME_LIGHT = "light.atom-one-light"
118 | static let DEFAULT_THEME_DARK = "dark.atom-one-dark"
119 | static let DEFAULT_LINE_SPACING = 1.0
120 |
121 | }
122 |
--------------------------------------------------------------------------------
/PreviewCode/GenericExtensions.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * GenericExtensions.swift
3 | * PreviewApps
4 | *
5 | * These functions can be used by all PreviewApps
6 | *
7 | * Created by Tony Smith on 18/06/2021.
8 | * Copyright © 2024 Tony Smith. All rights reserved.
9 | */
10 |
11 |
12 | import Foundation
13 | import Cocoa
14 | import WebKit
15 | import UniformTypeIdentifiers
16 |
17 |
18 | extension AppDelegate {
19 |
20 | // MARK: - Process Handling Functions
21 |
22 | /**
23 | Generic macOS process creation and run function.
24 |
25 | Make sure we clear the preference flag for this minor version, so that
26 | the sheet is not displayed next time the app is run (unless the version changes)
27 |
28 | - Parameters:
29 | - app: The location of the app.
30 | - with: Array of arguments to pass to the app.
31 |
32 | - Returns: `true` if the operation was successful, otherwise `false`.
33 | */
34 | internal func runProcess(app path: String, with args: [String]) -> Bool {
35 |
36 | let task: Process = Process()
37 | task.executableURL = URL.init(fileURLWithPath: path)
38 | task.arguments = args
39 |
40 | // Pipe out the output to avoid putting it in the log
41 | let outputPipe = Pipe()
42 | task.standardOutput = outputPipe
43 | task.standardError = outputPipe
44 |
45 | do {
46 | try task.run()
47 | } catch {
48 | return false
49 | }
50 |
51 | // Block until the task has completed (short tasks ONLY)
52 | task.waitUntilExit()
53 |
54 | if !task.isRunning {
55 | if (task.terminationStatus != 0) {
56 | // Command failed -- collect the output if there is any
57 | let outputHandle = outputPipe.fileHandleForReading
58 | var outString: String = ""
59 | if let line = String(data: outputHandle.availableData, encoding: String.Encoding.utf8) {
60 | outString = line
61 | }
62 |
63 | if outString.count > 0 {
64 | print("\(outString)")
65 | } else {
66 | print("Error", "Exit code \(task.terminationStatus)")
67 | }
68 | return false
69 | }
70 | }
71 |
72 | return true
73 | }
74 |
75 |
76 | // MARK: - Misc Functions
77 |
78 | /**
79 | Present an error message specific to sending feedback.
80 |
81 | This is called from multiple locations: if the initial request can't be created,
82 | there was a send failure, or a server error.
83 | */
84 | internal func sendFeedbackError() {
85 |
86 | let alert: NSAlert = showAlert("Feedback Could Not Be Sent",
87 | "Unfortunately, your comments could not be send at this time. Please try again later.")
88 | alert.beginSheetModal(for: self.reportWindow) { (resp) in
89 | self.window.endSheet(self.reportWindow)
90 | self.showPanelGenerators()
91 | }
92 | }
93 |
94 |
95 | /**
96 | Generic alert generator.
97 |
98 | - Parameters:
99 | - head: The alert's title.
100 | - message: The alert's message.
101 | - addOkButton: Should we add an OK button?
102 |
103 | - Returns: The NSAlert.
104 | */
105 | internal func showAlert(_ head: String, _ message: String, _ addOkButton: Bool = true) -> NSAlert {
106 |
107 | let alert: NSAlert = NSAlert()
108 | alert.messageText = head
109 | alert.informativeText = message
110 | if addOkButton { alert.addButton(withTitle: "OK") }
111 | return alert
112 | }
113 |
114 |
115 | /**
116 | Build a basic 'major.manor' version string for prefs usage.
117 |
118 | - Returns: The version string.
119 | */
120 | internal func getVersion() -> String {
121 |
122 | let version: String = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String
123 | let parts: [String] = (version as NSString).components(separatedBy: ".")
124 | return parts[0] + "-" + parts[1]
125 | }
126 |
127 |
128 | /**
129 | Build a date string string for feedback usage.
130 |
131 | - Returns: The date string.
132 | */
133 | internal func getDateForFeedback() -> String {
134 |
135 | let date: Date = Date()
136 | let dateFormatter: DateFormatter = DateFormatter()
137 | dateFormatter.locale = Locale(identifier: "en_US_POSIX")
138 | dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"
139 | dateFormatter.timeZone = TimeZone(secondsFromGMT: 0)
140 | return dateFormatter.string(from: date)
141 | }
142 |
143 |
144 | /**
145 | Build a user-agent string string for feedback usage.
146 |
147 | - Returns: The user-agent string.
148 | */
149 | internal func getUserAgentForFeedback() -> String {
150 |
151 | // Refactor code out into separate function for clarity
152 |
153 | let sysVer: OperatingSystemVersion = ProcessInfo.processInfo.operatingSystemVersion
154 | let bundle: Bundle = Bundle.main
155 | let app: String = bundle.object(forInfoDictionaryKey: "CFBundleExecutable") as! String
156 | let version: String = bundle.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String
157 | let build: String = bundle.object(forInfoDictionaryKey: "CFBundleVersion") as! String
158 | return "\(app)/\(version)-\(build) (macOS/\(sysVer.majorVersion).\(sysVer.minorVersion).\(sysVer.patchVersion))"
159 | }
160 |
161 |
162 | /**
163 | Read back the host system's registered UTI for the specified file.
164 |
165 | This is not PII. It used solely for debugging purposes
166 |
167 | - Parameters:
168 | - filename: The file we'll use to get the UTI.
169 |
170 | - Returns: The file's UTI.
171 | */
172 | internal func getLocalFileUTI(_ filename: String) -> String {
173 |
174 | var localUTI: String = "NONE"
175 | let samplePath = Bundle.main.resourcePath! + "/" + filename
176 |
177 | if FileManager.default.fileExists(atPath: samplePath) {
178 | // Create a URL reference to the sample file
179 | let sampleURL = URL.init(fileURLWithPath: samplePath)
180 |
181 | do {
182 | // Read back the UTI from the URL
183 | // Use Big Sur's UTType API
184 | if #available(macOS 11, *) {
185 | if let uti: UTType = try sampleURL.resourceValues(forKeys: [.contentTypeKey]).contentType {
186 | localUTI = uti.identifier
187 | }
188 | } else {
189 | // NOTE '.typeIdentifier' yields an optional
190 | if let uti: String = try sampleURL.resourceValues(forKeys: [.typeIdentifierKey]).typeIdentifier {
191 | localUTI = uti
192 | }
193 | }
194 | } catch {
195 | // NOP
196 | }
197 | }
198 |
199 | return localUTI
200 | }
201 |
202 |
203 | /**
204 | Disable all panel-opening menu items.
205 | */
206 | internal func hidePanelGenerators() {
207 |
208 | self.helpMenuReportBug.isEnabled = false
209 | self.helpMenuWhatsNew.isEnabled = false
210 | self.mainMenuSettings.isEnabled = false
211 | }
212 |
213 |
214 | /**
215 | Enable all panel-opening menu items.
216 | */
217 | internal func showPanelGenerators() {
218 |
219 | self.helpMenuReportBug.isEnabled = true
220 | self.helpMenuWhatsNew.isEnabled = true
221 | self.mainMenuSettings.isEnabled = true
222 | }
223 |
224 |
225 | /**
226 | Get system and state information and record it for use during run.
227 | */
228 | internal func recordSystemState() {
229 |
230 | // First ensure we are running on Mojave or above - Dark Mode is not supported by earlier versons
231 | let sysVer: OperatingSystemVersion = ProcessInfo.processInfo.operatingSystemVersion
232 | self.isMontereyPlus = (sysVer.majorVersion >= 12)
233 | }
234 |
235 |
236 | /**
237 | Determine whether the host Mac is in light mode.
238 |
239 | - Returns: `true` if the Mac is in light mode, otherwise `false`.
240 | */
241 | internal func isMacInLightMode() -> Bool {
242 |
243 | let appearNameString: String = NSApp.effectiveAppearance.name.rawValue
244 | return (appearNameString == "NSAppearanceNameAqua")
245 | }
246 |
247 |
248 | // MARK: - URLSession Delegate Functions
249 |
250 | func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) {
251 |
252 | // Some sort of connection error - report it
253 | self.connectionProgress.stopAnimation(self)
254 | sendFeedbackError()
255 | }
256 |
257 |
258 | func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
259 |
260 | // The operation to send the comment completed
261 | self.connectionProgress.stopAnimation(self)
262 | if let _ = error {
263 | // An error took place - report it
264 | sendFeedbackError()
265 | } else {
266 | // The comment was submitted successfully
267 | let alert: NSAlert = showAlert("Thanks For Your Feedback!",
268 | "Your comments have been received and we’ll take a look at them shortly.")
269 | alert.beginSheetModal(for: self.reportWindow) { (resp) in
270 | // Close the feedback window when the modal alert returns
271 | let _: Timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: false) { timer in
272 | self.window.endSheet(self.reportWindow)
273 | self.showPanelGenerators()
274 | }
275 | }
276 | }
277 | }
278 |
279 |
280 | // MARK: - WKWebNavigation Delegate Functions
281 |
282 | func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
283 |
284 | // Asynchronously show the sheet once the HTML has loaded
285 | // (triggered by delegate method)
286 |
287 | if let nav = self.whatsNewNav {
288 | if nav == navigation {
289 | // Display the sheet
290 | // FROM 1.3.2 -- add timer to prevent 'white flash'
291 | Timer.scheduledTimer(withTimeInterval: 0.05, repeats: false) { timer in
292 | timer.invalidate()
293 | self.window.beginSheet(self.whatsNewWindow, completionHandler: nil)
294 | }
295 | }
296 | }
297 | }
298 | }
299 |
300 |
301 | extension NSApplication {
302 |
303 | func isMacInLightMode() -> Bool {
304 |
305 | return (self.effectiveAppearance.name.rawValue == "NSAppearanceNameAqua")
306 | }
307 | }
308 |
--------------------------------------------------------------------------------
/PreviewCode/GenericFontExtensions.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * GenericFontExtensions.swift
3 | * PreviewApps
4 | *
5 | * These functions can be used by all PreviewApps
6 | *
7 | * Created by Tony Smith on 18/06/2021.
8 | * Copyright © 2024 Tony Smith. All rights reserved.
9 | */
10 |
11 |
12 | import Foundation
13 | import Cocoa
14 | import WebKit
15 | import UniformTypeIdentifiers
16 |
17 |
18 | extension AppDelegate {
19 |
20 | // MARK: - Font Management
21 |
22 | /**
23 | Build a list of available fonts.
24 |
25 | Should be called asynchronously. Two sets created: monospace fonts and regular fonts.
26 | Requires 'bodyFonts' and 'codeFonts' to be set as instance properties.
27 | Comment out either of these, as required.
28 |
29 | The final font lists each comprise pairs of strings: the font's PostScript name
30 | then its display name.
31 | */
32 | internal func asyncGetFonts() {
33 |
34 | var cf: [PMFont] = []
35 | let monoTrait: UInt = NSFontTraitMask.fixedPitchFontMask.rawValue
36 | let fm: NSFontManager = NSFontManager.shared
37 | let families: [String] = fm.availableFontFamilies
38 | for family in families {
39 | // Remove known unwanted fonts
40 | if family.hasPrefix(".") || family == "Apple Braille" || family == "Apple Color Emoji" {
41 | continue
42 | }
43 |
44 | // For each family, examine its fonts for suitable ones
45 | if let fonts: [[Any]] = fm.availableMembers(ofFontFamily: family) {
46 | // This will hold a font family: individual fonts will be added to
47 | // the 'styles' array
48 | var familyRecord: PMFont = PMFont.init()
49 | familyRecord.displayName = family
50 |
51 | for font: [Any] in fonts {
52 | let fontTraits: UInt = font[3] as! UInt
53 | if monoTrait & fontTraits != 0 {
54 | // The font is good to use, so add it to the list
55 | var fontRecord: PMFont = PMFont.init()
56 | fontRecord.postScriptName = font[0] as! String
57 | fontRecord.styleName = font[1] as! String
58 | fontRecord.traits = fontTraits
59 |
60 | if familyRecord.styles == nil {
61 | familyRecord.styles = []
62 | }
63 |
64 | familyRecord.styles!.append(fontRecord)
65 | }
66 | }
67 |
68 | if familyRecord.styles != nil && familyRecord.styles!.count > 0 {
69 | cf.append(familyRecord)
70 | }
71 | }
72 | }
73 |
74 | DispatchQueue.main.async {
75 | self.codeFonts = cf
76 | }
77 | }
78 |
79 |
80 | /**
81 | Build and enable the font style popup.
82 |
83 | - Parameters:
84 | - styleName: The name of currently selected style, or nil to select the first one.
85 | */
86 | internal func setStylePopup(_ styleToSelect: String? = nil) {
87 |
88 | if let selectedFamily: String = self.codeFontPopup.titleOfSelectedItem {
89 | self.codeStylePopup.removeAllItems()
90 | for family: PMFont in self.codeFonts {
91 | if selectedFamily == family.displayName {
92 | if let styles: [PMFont] = family.styles {
93 | self.codeStylePopup.isEnabled = true
94 | for style: PMFont in styles {
95 | self.codeStylePopup.addItem(withTitle: style.styleName)
96 | }
97 |
98 | if styleToSelect != nil {
99 | // Select an existing style, if we can
100 | // NOTE This will deselect the menu if the selected font lacks the
101 | // currently selected file, eg. we go from Roboto Mono ExtraLight
102 | // to Andale (Regular only). So check and select the first style
103 | // on the list if that happens.
104 | self.codeStylePopup.selectItem(withTitle: styleToSelect!)
105 | if self.codeStylePopup.indexOfSelectedItem == -1 {
106 | self.codeStylePopup.selectItem(at: 0)
107 | }
108 | } else {
109 | // No style passed? Pick the first on the list (usually Regular)
110 | self.codeStylePopup.selectItem(at: 0)
111 | }
112 |
113 | return
114 | }
115 | }
116 | }
117 | }
118 |
119 | // FROM 1.2.5
120 | // No style selected? Choose the default
121 | if self.codeStylePopup.indexOfSelectedItem == -1 {
122 | self.codeStylePopup.selectItem(at: 0)
123 | }
124 | }
125 |
126 |
127 | /**
128 | Select the font popup using the stored PostScript name
129 | of the user's chosen font.
130 |
131 | - Parameters:
132 | - postScriptName: The PostScript name of the font.
133 | */
134 | internal func selectFontByPostScriptName(_ postScriptName: String) {
135 |
136 | for family: PMFont in self.codeFonts {
137 | if let styles: [PMFont] = family.styles {
138 | for style: PMFont in styles {
139 | if style.postScriptName == postScriptName {
140 | self.codeFontPopup.selectItem(withTitle: family.displayName)
141 | setStylePopup(style.styleName)
142 | }
143 | }
144 | }
145 | }
146 | }
147 |
148 |
149 | /**
150 | Get the PostScript name from the selected family and style.
151 |
152 | - Returns: The PostScript name as a string, or nil.
153 | */
154 | internal func getPostScriptName() -> String? {
155 |
156 | if let selectedFont: String = self.codeFontPopup.titleOfSelectedItem {
157 | let selectedStyle: Int = codeStylePopup.indexOfSelectedItem
158 | for family: PMFont in self.codeFonts {
159 | if family.displayName == selectedFont {
160 | if let styles: [PMFont] = family.styles {
161 | let font: PMFont = styles[selectedStyle]
162 | return font.postScriptName
163 | }
164 | }
165 | }
166 | }
167 |
168 | return nil
169 | }
170 | }
171 |
--------------------------------------------------------------------------------
/PreviewCode/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | $(MARKETING_VERSION)
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | ITSAppUsesNonExemptEncryption
24 |
25 | LSApplicationCategoryType
26 | public.app-category.developer-tools
27 | LSMinimumSystemVersion
28 | $(MACOSX_DEPLOYMENT_TARGET)
29 | NSHumanReadableCopyright
30 | Copyright © 2024 Tony Smith. All rights reserved.
31 | NSMainNibFile
32 | MainMenu
33 | NSPrincipalClass
34 | NSApplication
35 | UTExportedTypeDeclarations
36 |
37 |
38 | UTTypeConformsTo
39 |
40 | public.source-code
41 | public.content
42 | public.data
43 |
44 | UTTypeDescription
45 | Rust Source
46 | UTTypeIcons
47 |
48 | UTTypeIdentifier
49 | com.bps.rust-source
50 | UTTypeTagSpecification
51 |
52 | public.filename-extension
53 |
54 | rust
55 | rs
56 |
57 |
58 |
59 |
60 | UTTypeConformsTo
61 |
62 | public.source-code
63 | public.content
64 | public.data
65 |
66 | UTTypeDescription
67 | Go Source
68 | UTTypeIcons
69 |
70 | UTTypeIdentifier
71 | com.bps.go-source
72 | UTTypeTagSpecification
73 |
74 | public.filename-extension
75 |
76 | go
77 |
78 |
79 |
80 |
81 | UTTypeConformsTo
82 |
83 | public.source-code
84 | public.content
85 | public.data
86 |
87 | UTTypeDescription
88 | CoffeeScript Source
89 | UTTypeIcons
90 |
91 | UTTypeIdentifier
92 | com.bps.coffee-source
93 | UTTypeTagSpecification
94 |
95 | public.filename-extension
96 |
97 | coffeescript
98 | coffee
99 | litcoffee
100 |
101 |
102 |
103 |
104 | UTTypeConformsTo
105 |
106 | public.source-code
107 | public.content
108 | public.data
109 |
110 | UTTypeDescription
111 | Lua Source
112 | UTTypeIcons
113 |
114 | UTTypeIdentifier
115 | com.bps.lua-source
116 | UTTypeTagSpecification
117 |
118 | public.filename-extension
119 |
120 | lua
121 |
122 |
123 |
124 |
125 | UTTypeConformsTo
126 |
127 | public.source-code
128 | public.content
129 | public.data
130 |
131 | UTTypeDescription
132 | C# Source
133 | UTTypeIcons
134 |
135 | UTTypeIdentifier
136 | com.bps.csharp-source
137 | UTTypeTagSpecification
138 |
139 | public.filename-extension
140 |
141 | c-sharp
142 | csharp
143 | cs
144 | csx
145 |
146 |
147 |
148 |
149 | UTTypeConformsTo
150 |
151 | public.source-code
152 | public.content
153 | public.data
154 |
155 | UTTypeDescription
156 | VBScript Source
157 | UTTypeIcons
158 |
159 | UTTypeIdentifier
160 | com.bps.vbscript-source
161 | UTTypeTagSpecification
162 |
163 | public.filename-extension
164 |
165 | vbscript
166 | vbs
167 | vbe
168 | wsc
169 | wsf
170 |
171 |
172 |
173 |
174 | UTTypeConformsTo
175 |
176 | public.source-code
177 | public.content
178 | public.data
179 |
180 | UTTypeDescription
181 | SQL Source
182 | UTTypeIcons
183 |
184 | UTTypeIdentifier
185 | com.bps.sql-source
186 | UTTypeTagSpecification
187 |
188 | public.filename-extension
189 |
190 | sql
191 |
192 |
193 |
194 |
195 | UTTypeConformsTo
196 |
197 | public.source-code
198 | public.content
199 | public.data
200 |
201 | UTTypeDescription
202 | SCSS Source
203 | UTTypeIcons
204 |
205 | UTTypeIdentifier
206 | com.bps.scss-source
207 | UTTypeTagSpecification
208 |
209 | public.filename-extension
210 |
211 | scss
212 | sass
213 |
214 |
215 |
216 |
217 | UTTypeConformsTo
218 |
219 | public.source-code
220 | public.content
221 | public.data
222 |
223 | UTTypeDescription
224 | Arduino Source
225 | UTTypeIcons
226 |
227 | UTTypeIdentifier
228 | com.bps.arduino-source
229 | UTTypeTagSpecification
230 |
231 | public.filename-extension
232 |
233 | arduino
234 | ino
235 |
236 |
237 |
238 |
239 | UTTypeConformsTo
240 |
241 | public.source-code
242 | public.content
243 | public.data
244 |
245 | UTTypeDescription
246 | Clojure Source
247 | UTTypeIcons
248 |
249 | UTTypeIdentifier
250 | com.bps.clojure-source
251 | UTTypeTagSpecification
252 |
253 | public.filename-extension
254 |
255 | clojure
256 | clj
257 | cljs
258 | cljc
259 |
260 |
261 |
262 |
263 | UTTypeConformsTo
264 |
265 | public.source-code
266 | public.content
267 | public.data
268 |
269 | UTTypeDescription
270 | Erlang Source
271 | UTTypeIcons
272 |
273 | UTTypeIdentifier
274 | com.bps.erlang-source
275 | UTTypeTagSpecification
276 |
277 | public.filename-extension
278 |
279 | erlang
280 | erl
281 | hrl
282 |
283 |
284 |
285 |
286 | UTTypeConformsTo
287 |
288 | public.source-code
289 | public.content
290 | public.data
291 |
292 | UTTypeDescription
293 | LaTEX Markup
294 | UTTypeIcons
295 |
296 | UTTypeIdentifier
297 | com.bps.latex-source
298 | UTTypeTagSpecification
299 |
300 | public.filename-extension
301 |
302 | latex
303 | tex
304 |
305 |
306 |
307 |
308 | UTTypeConformsTo
309 |
310 | public.source-code
311 | public.content
312 | public.data
313 |
314 | UTTypeDescription
315 | Elixir Source
316 | UTTypeIcons
317 |
318 | UTTypeIdentifier
319 | com.bps.elixir-source
320 | UTTypeTagSpecification
321 |
322 | public.filename-extension
323 |
324 | elixir
325 | ex
326 | exs
327 |
328 |
329 |
330 |
331 | UTTypeConformsTo
332 |
333 | public.source-code
334 | public.content
335 | public.data
336 |
337 | UTTypeDescription
338 | Haskell Source
339 | UTTypeIcons
340 |
341 | UTTypeIdentifier
342 | com.bps.haskell-source
343 | UTTypeTagSpecification
344 |
345 | public.filename-extension
346 |
347 | haskell
348 | hs
349 | lhs
350 |
351 |
352 |
353 |
354 | UTTypeConformsTo
355 |
356 | public.source-code
357 | public.content
358 | public.data
359 |
360 | UTTypeDescription
361 | Brainfuck Source
362 | UTTypeIcons
363 |
364 | UTTypeIdentifier
365 | com.bps.brainfuck-source
366 | UTTypeTagSpecification
367 |
368 | public.filename-extension
369 |
370 | brainfuck
371 | b
372 | bf
373 |
374 |
375 |
376 |
377 | UTTypeConformsTo
378 |
379 | public.source-code
380 | public.content
381 | public.data
382 |
383 | UTTypeDescription
384 | ActionScript Source
385 | UTTypeIcons
386 |
387 | UTTypeIdentifier
388 | com.bps.actionscript-source
389 | UTTypeTagSpecification
390 |
391 | public.filename-extension
392 |
393 | actionscript
394 |
395 | public.mime-type
396 |
397 | application/ecmascript
398 |
399 |
400 |
401 |
402 | UTTypeConformsTo
403 |
404 | public.source-code
405 | public.content
406 | public.data
407 |
408 | UTTypeDescription
409 | Twig File
410 | UTTypeIcons
411 |
412 | UTTypeIdentifier
413 | com.bps.twig-source
414 | UTTypeTagSpecification
415 |
416 | public.filename-extension
417 |
418 | twig
419 |
420 |
421 |
422 |
423 | UTTypeConformsTo
424 |
425 | public.source-code
426 | public.content
427 | public.data
428 |
429 | UTTypeDescription
430 | Dart Source
431 | UTTypeIcons
432 |
433 | UTTypeIdentifier
434 | com.bps.dart-source
435 | UTTypeTagSpecification
436 |
437 | public.filename-extension
438 |
439 | dart
440 |
441 |
442 |
443 |
444 | UTTypeConformsTo
445 |
446 | public.source-code
447 | public.content
448 | public.data
449 |
450 | UTTypeDescription
451 | F# Source
452 | UTTypeIcons
453 |
454 | UTTypeIdentifier
455 | com.bps.fsharp-source
456 | UTTypeTagSpecification
457 |
458 | public.filename-extension
459 |
460 | f-sharp
461 | fsharp
462 | fsscript
463 | fsi
464 | fsx
465 |
466 |
467 |
468 |
469 | UTTypeConformsTo
470 |
471 | public.source-code
472 | public.content
473 | public.data
474 |
475 | UTTypeDescription
476 | Julia Source
477 | UTTypeIcons
478 |
479 | UTTypeIdentifier
480 | com.bps.julia-source
481 | UTTypeTagSpecification
482 |
483 | public.filename-extension
484 |
485 | julia
486 | jl
487 |
488 |
489 |
490 |
491 | UTTypeConformsTo
492 |
493 | public.source-code
494 | public.content
495 | public.data
496 |
497 | UTTypeDescription
498 | Lisp Source
499 | UTTypeIcons
500 |
501 | UTTypeIdentifier
502 | com.bps.lisp-source
503 | UTTypeTagSpecification
504 |
505 | public.filename-extension
506 |
507 | lisp
508 | lsp
509 | fasl
510 |
511 |
512 |
513 |
514 | UTTypeConformsTo
515 |
516 | public.source-code
517 | public.content
518 | public.data
519 |
520 | UTTypeDescription
521 | Kotlin Source
522 | UTTypeIcons
523 |
524 | UTTypeIdentifier
525 | com.bps.kotlin-source
526 | UTTypeTagSpecification
527 |
528 | public.filename-extension
529 |
530 | kotlin
531 | kt
532 | kts
533 | ktm
534 |
535 |
536 |
537 |
538 | UTTypeConformsTo
539 |
540 | public.source-code
541 | public.content
542 | public.data
543 |
544 | UTTypeDescription
545 | BASIC Source
546 | UTTypeIcons
547 |
548 | UTTypeIdentifier
549 | com.bps.basic-source
550 | UTTypeTagSpecification
551 |
552 | public.filename-extension
553 |
554 | basic
555 | bas
556 |
557 |
558 |
559 |
560 | UTTypeConformsTo
561 |
562 | public.source-code
563 | public.content
564 | public.data
565 |
566 | UTTypeDescription
567 | Terraform Variables File
568 | UTTypeIcons
569 |
570 | UTTypeIdentifier
571 | com.bps.terraform-vars
572 | UTTypeTagSpecification
573 |
574 | public.filename-extension
575 |
576 | tfvars
577 |
578 |
579 |
580 |
581 | UTTypeConformsTo
582 |
583 | public.source-code
584 | public.content
585 | public.data
586 |
587 | UTTypeDescription
588 | Terraform Source
589 | UTTypeIcons
590 |
591 | UTTypeIdentifier
592 | com.bps.terraform-source
593 | UTTypeTagSpecification
594 |
595 | public.filename-extension
596 |
597 | terraform
598 | tf
599 |
600 |
601 |
602 |
603 | UTTypeConformsTo
604 |
605 | public.source-code
606 | public.content
607 | public.data
608 |
609 | UTTypeDescription
610 | Assembly
611 | UTTypeIcons
612 |
613 | UTTypeIdentifier
614 | com.bps.assembly-source
615 | UTTypeTagSpecification
616 |
617 | public.filename-extension
618 |
619 | asm
620 |
621 |
622 |
623 |
624 | UTTypeConformsTo
625 |
626 | public.source-code
627 | public.content
628 | public.data
629 |
630 | UTTypeDescription
631 | CMake File
632 | UTTypeIdentifier
633 | com.bps.cmake-source
634 | UTTypeTagSpecification
635 |
636 | public.filename-extension
637 |
638 | cmake
639 |
640 |
641 |
642 |
643 | UTTypeConformsTo
644 |
645 | public.source-code
646 | public.content
647 | public.data
648 |
649 | UTTypeDescription
650 | 6809 Assembly
651 | UTTypeIcons
652 |
653 | UTTypeIdentifier
654 | com.bps.6809-assembly-source
655 | UTTypeTagSpecification
656 |
657 | public.filename-extension
658 |
659 | asm6809
660 |
661 |
662 |
663 |
664 | UTTypeConformsTo
665 |
666 | public.source-code
667 | public.content
668 | public.data
669 |
670 | UTTypeDescription
671 | Environment File
672 | UTTypeIcons
673 |
674 | UTTypeIdentifier
675 | com.bps.env
676 | UTTypeTagSpecification
677 |
678 | public.filename-extension
679 |
680 | env
681 |
682 |
683 |
684 |
685 | UTTypeConformsTo
686 |
687 | public.source-code
688 | public.content
689 | public.data
690 |
691 | UTTypeDescription
692 | AsciiDoc Markup
693 | UTTypeIcons
694 |
695 | UTTypeIdentifier
696 | com.bps.asciidoc-source
697 | UTTypeTagSpecification
698 |
699 | public.filename-extension
700 |
701 | asciidoc
702 | adoc
703 | asc
704 |
705 |
706 |
707 |
708 | UTTypeConformsTo
709 |
710 | public.source-code
711 | public.content
712 | public.data
713 |
714 | UTTypeDescription
715 | Configuration File
716 | UTTypeIdentifier
717 | com.bps.conf
718 | UTTypeTagSpecification
719 |
720 | public.filename-extension
721 |
722 | conf
723 | ini
724 | cfg
725 | cnf
726 | cf
727 | rc
728 |
729 |
730 |
731 |
732 | UTTypeConformsTo
733 |
734 | public.source-code
735 | public.content
736 | public.data
737 |
738 | UTTypeDescription
739 | GML
740 | UTTypeIcons
741 |
742 | UTTypeIdentifier
743 | com.bps.gml-source
744 | UTTypeTagSpecification
745 |
746 | public.filename-extension
747 |
748 | gml
749 |
750 |
751 |
752 |
753 | UTTypeConformsTo
754 |
755 | public.source-code
756 | public.content
757 | public.data
758 |
759 | UTTypeDescription
760 | VueJS
761 | UTTypeIcons
762 |
763 | UTTypeIdentifier
764 | com.bps.vuejs-source
765 | UTTypeTagSpecification
766 |
767 | public.filename-extension
768 |
769 | vue
770 |
771 |
772 |
773 |
774 | UTTypeConformsTo
775 |
776 | public.source-code
777 |
778 | UTTypeDescription
779 | Elm Source
780 | UTTypeIcons
781 |
782 | UTTypeIdentifier
783 | com.bps.elm-source
784 | UTTypeTagSpecification
785 |
786 | public.filename-extension
787 |
788 | elm
789 |
790 |
791 |
792 |
793 | UTTypeConformsTo
794 |
795 | public.data
796 | public.content
797 | public.source-code
798 |
799 | UTTypeDescription
800 | Typescript
801 | UTTypeIcons
802 |
803 | UTTypeIdentifier
804 | com.bps.typescript-source
805 | UTTypeTagSpecification
806 |
807 | public.filename-extension
808 |
809 | typescript
810 |
811 |
812 |
813 |
814 | UTImportedTypeDeclarations
815 |
816 |
817 | UTTypeConformsTo
818 |
819 | public.source-code
820 |
821 | UTTypeDescription
822 | Swift
823 | UTTypeIcons
824 |
825 | UTTypeIdentifier
826 | public.swift-source
827 | UTTypeTagSpecification
828 |
829 | public.filename-extension
830 |
831 | swift
832 |
833 |
834 |
835 |
836 | UTTypeConformsTo
837 |
838 | public.source-code
839 |
840 | UTTypeDescription
841 | C
842 | UTTypeIcons
843 |
844 | UTTypeIdentifier
845 | public.c-source
846 | UTTypeTagSpecification
847 |
848 | public.filename-extension
849 |
850 | c
851 |
852 |
853 |
854 |
855 | UTTypeConformsTo
856 |
857 | public.source-code
858 |
859 | UTTypeDescription
860 | C Header
861 | UTTypeIcons
862 |
863 | UTTypeIdentifier
864 | public.c-header
865 | UTTypeTagSpecification
866 |
867 | public.filename-extension
868 |
869 | h
870 |
871 |
872 |
873 |
874 | UTTypeConformsTo
875 |
876 | public.source-code
877 |
878 | UTTypeDescription
879 | C++
880 | UTTypeIcons
881 |
882 | UTTypeIdentifier
883 | public.c-plus-plus-source
884 | UTTypeTagSpecification
885 |
886 | public.filename-extension
887 |
888 | cpp
889 |
890 |
891 |
892 |
893 | UTTypeConformsTo
894 |
895 | public.source-code
896 |
897 | UTTypeDescription
898 | C++ Header
899 | UTTypeIcons
900 |
901 | UTTypeIdentifier
902 | public.c-plus-plus-header
903 | UTTypeTagSpecification
904 |
905 | public.filename-extension
906 |
907 | hpp
908 |
909 |
910 |
911 |
912 | UTTypeConformsTo
913 |
914 | public.source-code
915 |
916 | UTTypeDescription
917 | Objective C
918 | UTTypeIcons
919 |
920 | UTTypeIdentifier
921 | public.objective-c-source
922 | UTTypeTagSpecification
923 |
924 | public.filename-extension
925 |
926 | m
927 |
928 |
929 |
930 |
931 | UTTypeConformsTo
932 |
933 | public.source-code
934 |
935 | UTTypeDescription
936 | Objective C++
937 | UTTypeIcons
938 |
939 | UTTypeIdentifier
940 | public.objective-c-plus-plus-source
941 | UTTypeTagSpecification
942 |
943 | public.filename-extension
944 |
945 | mm
946 |
947 |
948 |
949 |
950 | UTTypeConformsTo
951 |
952 | public.source-code
953 |
954 | UTTypeDescription
955 | Fortran
956 | UTTypeIcons
957 |
958 | UTTypeIdentifier
959 | public.fortran-source
960 | UTTypeTagSpecification
961 |
962 | public.filename-extension
963 |
964 | for
965 |
966 |
967 |
968 |
969 | UTTypeConformsTo
970 |
971 | public.script
972 |
973 | UTTypeDescription
974 | AppleScript
975 | UTTypeIcons
976 |
977 | UTTypeIdentifier
978 | com.apple.applescript.text
979 | UTTypeTagSpecification
980 |
981 | public.filename-extension
982 |
983 | .applescript
984 |
985 |
986 |
987 |
988 | UTTypeConformsTo
989 |
990 | public.executable
991 | public.source-code
992 |
993 | UTTypeDescription
994 | JavaScript
995 | UTTypeIcons
996 |
997 | UTTypeIdentifier
998 | com.netscape.javascript-source
999 | UTTypeTagSpecification
1000 |
1001 | public.filename-extension
1002 |
1003 | js
1004 |
1005 |
1006 |
1007 |
1008 | UTTypeConformsTo
1009 |
1010 | public.shell-script
1011 |
1012 | UTTypeDescription
1013 | Python
1014 | UTTypeIcons
1015 |
1016 | UTTypeIdentifier
1017 | public.python-script
1018 | UTTypeTagSpecification
1019 |
1020 | public.filename-extension
1021 |
1022 | py
1023 |
1024 |
1025 |
1026 |
1027 | UTTypeConformsTo
1028 |
1029 | public.shell-script
1030 |
1031 | UTTypeDescription
1032 | PHP
1033 | UTTypeIcons
1034 |
1035 | UTTypeIdentifier
1036 | public.php-script
1037 | UTTypeTagSpecification
1038 |
1039 | public.filename-extension
1040 |
1041 | php
1042 |
1043 |
1044 |
1045 |
1046 | UTTypeConformsTo
1047 |
1048 | public.shell-script
1049 |
1050 | UTTypeDescription
1051 | Perl
1052 | UTTypeIcons
1053 |
1054 | UTTypeIdentifier
1055 | public.perl-script
1056 | UTTypeTagSpecification
1057 |
1058 | public.filename-extension
1059 |
1060 | perl
1061 |
1062 |
1063 |
1064 |
1065 | UTTypeConformsTo
1066 |
1067 | public.shell-script
1068 |
1069 | UTTypeDescription
1070 | Ruby
1071 | UTTypeIcons
1072 |
1073 | UTTypeIdentifier
1074 | public.ruby-script
1075 | UTTypeTagSpecification
1076 |
1077 | public.filename-extension
1078 |
1079 | rb
1080 |
1081 |
1082 |
1083 |
1084 | UTTypeDescription
1085 | Bash Shell
1086 | UTTypeIcons
1087 |
1088 | UTTypeIdentifier
1089 | public.shell-script
1090 | UTTypeTagSpecification
1091 |
1092 | public.filename-extension
1093 |
1094 | sh
1095 |
1096 |
1097 |
1098 |
1099 | UTTypeConformsTo
1100 |
1101 | public.source-code
1102 |
1103 | UTTypeDescription
1104 | Java
1105 | UTTypeIcons
1106 |
1107 | UTTypeIdentifier
1108 | com.sun.java-source
1109 | UTTypeTagSpecification
1110 |
1111 | public.filename-extension
1112 |
1113 | java
1114 |
1115 |
1116 |
1117 |
1118 | UTTypeConformsTo
1119 |
1120 | public.source-code
1121 |
1122 | UTTypeDescription
1123 | Ada
1124 | UTTypeIcons
1125 |
1126 | UTTypeIdentifier
1127 | public.ada-source
1128 | UTTypeTagSpecification
1129 |
1130 | public.filename-extension
1131 |
1132 | ads
1133 | adb
1134 |
1135 |
1136 |
1137 |
1138 | UTTypeConformsTo
1139 |
1140 | public.shell-script
1141 |
1142 | UTTypeDescription
1143 | C Shell
1144 | UTTypeIcons
1145 |
1146 | UTTypeIdentifier
1147 | public.csh-script
1148 | UTTypeTagSpecification
1149 |
1150 | public.filename-extension
1151 |
1152 | csh
1153 |
1154 |
1155 |
1156 |
1157 | UTTypeConformsTo
1158 |
1159 | public.shell-script
1160 |
1161 | UTTypeDescription
1162 | Korn Shell
1163 | UTTypeIcons
1164 |
1165 | UTTypeIdentifier
1166 | public.ksh-script
1167 | UTTypeTagSpecification
1168 |
1169 | public.filename-extension
1170 |
1171 | ksh
1172 |
1173 |
1174 |
1175 |
1176 | UTTypeConformsTo
1177 |
1178 | public.shell-script
1179 |
1180 | UTTypeDescription
1181 | T Shell
1182 | UTTypeIcons
1183 |
1184 | UTTypeIdentifier
1185 | public.tcsh-script
1186 | UTTypeTagSpecification
1187 |
1188 | public.filename-extension
1189 |
1190 | tsch
1191 |
1192 |
1193 |
1194 |
1195 | UTTypeConformsTo
1196 |
1197 | public.shell-script
1198 |
1199 | UTTypeDescription
1200 | Z Shell
1201 | UTTypeIcons
1202 |
1203 | UTTypeIdentifier
1204 | public.zsh-script
1205 | UTTypeTagSpecification
1206 |
1207 | public.filename-extension
1208 |
1209 | zsh
1210 |
1211 |
1212 |
1213 |
1214 | UTTypeConformsTo
1215 |
1216 | public.data
1217 | public.contet
1218 |
1219 | UTTypeDescription
1220 | CSS
1221 | UTTypeIcons
1222 |
1223 | UTTypeIdentifier
1224 | public.css
1225 | UTTypeTagSpecification
1226 |
1227 | public.filename-extension
1228 |
1229 | css
1230 |
1231 |
1232 |
1233 |
1234 | UTTypeConformsTo
1235 |
1236 | public.source-code
1237 |
1238 | UTTypeDescription
1239 | Pascal
1240 | UTTypeIcons
1241 |
1242 | UTTypeIdentifier
1243 | public.pascal-source
1244 | UTTypeTagSpecification
1245 |
1246 | public.filename-extension
1247 |
1248 | pas
1249 |
1250 |
1251 |
1252 |
1253 | UTTypeConformsTo
1254 |
1255 | public.source-code
1256 |
1257 | UTTypeDescription
1258 | Protobuf
1259 | UTTypeIcons
1260 |
1261 | UTTypeIdentifier
1262 | public.protobuf-source
1263 | UTTypeTagSpecification
1264 |
1265 | public.filename-extension
1266 |
1267 | proto
1268 |
1269 |
1270 |
1271 |
1272 | UTTypeConformsTo
1273 |
1274 | public.source-code
1275 |
1276 | UTTypeDescription
1277 | x86-64 Assembler
1278 | UTTypeIcons
1279 |
1280 | UTTypeIdentifier
1281 | public.nasm-assembly-source
1282 | UTTypeTagSpecification
1283 |
1284 | public.filename-extension
1285 |
1286 | asm
1287 | nasm
1288 |
1289 |
1290 |
1291 |
1292 | UTTypeConformsTo
1293 |
1294 | public.source-code
1295 |
1296 | UTTypeDescription
1297 | ARM Assembler
1298 | UTTypeIcons
1299 |
1300 | UTTypeIdentifier
1301 | public.assembly-source
1302 | UTTypeTagSpecification
1303 |
1304 | public.filename-extension
1305 |
1306 | s
1307 | S
1308 |
1309 |
1310 |
1311 |
1312 | UTTypeConformsTo
1313 |
1314 | public.script
1315 |
1316 | UTTypeDescription
1317 | Makefile
1318 | UTTypeIcons
1319 |
1320 | UTTypeIdentifier
1321 | public.make-source
1322 | UTTypeTagSpecification
1323 |
1324 |
1325 |
1326 | UTTypeConformsTo
1327 |
1328 | public.data
1329 |
1330 | UTTypeDescription
1331 | Entitlements
1332 | UTTypeIconFile
1333 |
1334 | UTTypeIcons
1335 |
1336 | UTTypeIdentifier
1337 | com.apple.xcode.entitlements-property-list
1338 | UTTypeTagSpecification
1339 |
1340 | public.filename-extension
1341 |
1342 | entitlements
1343 |
1344 |
1345 |
1346 |
1347 | UTTypeConformsTo
1348 |
1349 | public.data, public.content
1350 |
1351 | UTTypeDescription
1352 | NIB
1353 | UTTypeIdentifier
1354 | com.apple.interfacebuilder.document.cocoa
1355 | UTTypeTagSpecification
1356 |
1357 | public.filename-extension
1358 |
1359 | xib
1360 |
1361 |
1362 |
1363 |
1364 | UTTypeConformsTo
1365 |
1366 |
1367 |
1368 | UTTypeDescription
1369 | Storyboard
1370 | UTTypeIdentifier
1371 | com.apple.dt.interfacebuilder.document.storyboard
1372 | UTTypeTagSpecification
1373 |
1374 | public.filename-extension
1375 |
1376 | storyboard
1377 |
1378 |
1379 |
1380 |
1381 | UTTypeConformsTo
1382 |
1383 | public.data
1384 | public.content
1385 | public.text
1386 | public.source-code
1387 | public.script
1388 |
1389 | UTTypeDescription
1390 | MSTypeScript
1391 | UTTypeIcons
1392 |
1393 | UTTypeIdentifier
1394 | com.microsoft.typescript
1395 | UTTypeTagSpecification
1396 |
1397 | public.filename-extension
1398 |
1399 | ts
1400 | tsx
1401 | typescript
1402 |
1403 |
1404 |
1405 |
1406 |
1407 |
1408 |
--------------------------------------------------------------------------------
/PreviewCode/PCImageView.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * PCImageView.swift
3 | * PreviewCode
4 | *
5 | * Created by Tony Smith on 18/06/2021.
6 | * Copyright © 2024 Tony Smith. All rights reserved.
7 | */
8 |
9 |
10 | import Cocoa
11 |
12 |
13 | /**
14 | A very basic subclass so we can dfraw a line around theme mode icons in Preferences.
15 | */
16 |
17 | class PCImageView: NSImageView {
18 |
19 | // MARK: - Private Properties
20 |
21 | private var outline: Bool = false
22 |
23 |
24 | // MARK: - Public Properties
25 |
26 | var isOutlined: Bool {
27 | get {
28 | return self.outline
29 | }
30 | set(newValue) {
31 | self.outline = newValue
32 | self.needsDisplay = true
33 | }
34 | }
35 |
36 |
37 | // MARK: - Public Functions
38 |
39 | override func draw(_ dirtyRect: NSRect) {
40 |
41 | super.draw(dirtyRect)
42 |
43 | if let gc: NSGraphicsContext = NSGraphicsContext.current {
44 | // Lock the context
45 | gc.saveGraphicsState()
46 |
47 | // Set the colours we'll be using
48 | if self.outline {
49 | NSColor.controlAccentColor.setStroke()
50 | self.alphaValue = 1.0
51 | } else {
52 | NSColor.clear.setStroke()
53 | self.alphaValue = 0.6
54 | }
55 |
56 | // Make the outline
57 | let highlightPath: NSBezierPath = NSBezierPath(roundedRect: self.bounds,
58 | xRadius: 4.0,
59 | yRadius: 4.0)
60 | highlightPath.lineWidth = 2.0
61 | highlightPath.stroke()
62 |
63 | // Unlock the context
64 | gc.restoreGraphicsState()
65 | }
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/PreviewCode/PMFont.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * PMFont.swift
3 | * PreviewApps
4 | *
5 | * Created by Tony Smith on 02/07/2021.
6 | * Copyright © 2024 Tony Smith. All rights reserved.
7 | */
8 |
9 |
10 | import Foundation
11 |
12 | /**
13 | Internal font record structure.
14 | */
15 |
16 | struct PMFont {
17 |
18 | var postScriptName: String = "" // Individual font PostScript name - font records only
19 | var displayName: String = "" // Font family menu display name - family records only
20 | var styleName: String = "" // Individual font style name - font records only
21 | var traits: UInt = 0
22 | var styles: [PMFont]? = nil
23 | }
24 |
--------------------------------------------------------------------------------
/PreviewCode/PreviewCode.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.application-groups
8 |
9 | $(TeamIdentifierPrefix)suite.preview-code
10 |
11 | com.apple.security.automation.apple-events
12 |
13 | com.apple.security.files.user-selected.read-only
14 |
15 | com.apple.security.network.client
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/PreviewCode/PreviewTextView.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * PreviewTextView.swift
3 | * PreviewCode
4 | *
5 | * Created by Tony Smith on 03/06/2021.
6 | * Copyright © 2024 Tony Smith. All rights reserved.
7 | */
8 |
9 |
10 | import Cocoa
11 |
12 |
13 | /**
14 | A very basic subclass so we can adjust the cursor hovering over theme previews.
15 | */
16 |
17 | class PreviewTextView: NSTextView {
18 |
19 | override func mouseMoved(with event: NSEvent) {
20 |
21 | // Re-set the cursor to an arrow on mouse movement
22 | NSCursor.arrow.set()
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/PreviewCode/ThemeTableCellView.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * ThemeTableCellView.swift
3 | * PreviewCode
4 | *
5 | * Created by Tony Smith on 30/05/2021.
6 | * Copyright © 2024 Tony Smith. All rights reserved.
7 | */
8 |
9 |
10 | import Cocoa
11 |
12 |
13 | /**
14 | A very basic subclass so we can store useful info within the cell.
15 | */
16 |
17 | class ThemeTableCellView: NSTableCellView {
18 |
19 | // MARK: - Class UI Properies
20 |
21 | @IBOutlet var themePreviewTitle: NSTextField!
22 |
23 |
24 | // MARK: - Public Properties
25 |
26 | // Record the table row the cell view is placed at
27 | var themeIndex: Int = -1
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/PreviewCode/code-sample.txt:
--------------------------------------------------------------------------------
1 |
2 | import Foundation
3 |
4 | @objc class Person: Entity {
5 | var name: String!
6 | var age: Int!
7 |
8 | init(name: String, age: Int) {
9 | /* /* ... */ */
10 | }
11 |
12 | // Return a descriptive string for this person
13 | func description(offset: Int = 0) -> String {
14 | return "\(name) is \(age + offset) years old"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/PreviewCode/themes-list.json:
--------------------------------------------------------------------------------
1 | {"themes":[{"css":"a11y-dark","name":"A11Y Dark","dark":true},{"css":"a11y-light","name":"A11Y Light","dark":false},{"css":"agate","name":"Agate","dark":true},{"css":"an-old-hope","name":"An Old Hope","dark":true},{"css":"androidstudio","name":"Android Studio","dark":true},{"css":"arduino-light","name":"Arduino Light","dark":false},{"css":"arta","name":"Arta","dark":true},{"css":"ascetic","name":"Ascetic","dark":false},{"css":"atelier-cave-dark","name":"Atelier Cave Dark","dark":true},{"css":"atelier-cave-light","name":"Atelier Cave Light","dark":false},{"css":"atelier-dune-dark","name":"Atelier Dune Dark","dark":true},{"css":"atelier-dune-light","name":"Atelier Dune Light","dark":false},{"css":"atelier-estuary-dark","name":"Atelier Estuary Dark","dark":true},{"css":"atelier-estuary-light","name":"Atelier Estuary Light","dark":false},{"css":"atelier-forest-dark","name":"Atelier Forest Dark","dark":true},{"css":"atelier-forest-light","name":"Atelier Forest Light","dark":false},{"css":"atelier-heath-dark","name":"Atelier Heath Dark","dark":true},{"css":"atelier-heath-light","name":"Atelier Heath Light","dark":false},{"css":"atelier-lakeside-dark","name":"Atelier Lakeside Dark","dark":true},{"css":"atelier-lakeside-light","name":"Atelier Lakeside Light","dark":false},{"css":"atelier-plateau-dark","name":"Atelier Plateau Dark","dark":true},{"css":"atelier-plateau-light","name":"Atelier Plateau Light","dark":false},{"css":"atelier-savanna-dark","name":"Atelier Savanna Dark","dark":true},{"css":"atelier-savanna-light","name":"Atelier Savanna Light","dark":false},{"css":"atelier-seaside-dark","name":"Atelier Seaside Dark","dark":true},{"css":"atelier-seaside-light","name":"Atelier Seaside Light","dark":false},{"css":"atelier-sulphurpool-dark","name":"Atelier Sulphurpool Dark","dark":true},{"css":"atelier-sulphurpool-light","name":"Atelier Sulphurpool Light","dark":false},{"css":"atom-one-dark-reasonable","name":"Atom One Dark Reasonable","dark":true},{"css":"atom-one-dark","name":"Atom One Dark","dark":true},{"css":"atom-one-light","name":"Atom One Light","dark":false},{"css":"brown-paper","name":"Brown Paper","dark":false},{"css":"codepen-embed","name":"Codepen Embed","dark":true},{"css":"color-brewer","name":"Color Brewer","dark":false},{"css":"darcula","name":"Darcula","dark":true},{"css":"dark","name":"Dark","dark":true},{"css":"default","name":"Default","dark":false},{"css":"docco","name":"Docco","dark":false},{"css":"dracula","name":"Dracula","dark":true},{"css":"far","name":"Far","dark":false},{"css":"foundation","name":"Foundation","dark":false},{"css":"github-gist","name":"Github Gist","dark":false},{"css":"github","name":"Github","dark":false},{"css":"gml","name":"Gml","dark":true},{"css":"googlecode","name":"Googlecode","dark":false},{"css":"grayscale","name":"Grayscale","dark":false},{"css":"gruvbox-dark","name":"Gruvbox Dark","dark":true},{"css":"gruvbox-light","name":"Gruvbox Light","dark":false},{"css":"hopscotch","name":"Hopscotch","dark":true},{"css":"hybrid","name":"Hybrid","dark":true},{"css":"idea","name":"Idea","dark":false},{"css":"ir-black","name":"IR Black","dark":true},{"css":"isbl-editor-dark","name":"ISBL Editor Dark","dark":true},{"css":"isbl-editor-light","name":"ISBL Editor Light","dark":false},{"css":"kimbie-dark","name":"Kimbie Dark","dark":true},{"css":"kimbie-light","name":"Kimbie Light","dark":false},{"css":"lightfair","name":"Lightfair","dark":false},{"css":"lioshi","name":"Lioshi","dark":true},{"css":"magula","name":"Magula","dark":false},{"css":"mono-blue","name":"Mono Blue","dark":false},{"css":"monokai-sublime","name":"Monokai Sublime","dark":true},{"css":"monokai","name":"Monokai","dark":true},{"css":"night-owl","name":"Night Owl","dark":true},{"css":"nnfx-dark","name":"Nnfx Dark","dark":true},{"css":"nnfx-light","name":"Nnfx Light","dark":false},{"css":"nord","name":"Nord","dark":true},{"css":"obsidian","name":"Obsidian","dark":true},{"css":"ocean","name":"Ocean","dark":true},{"css":"paraiso-dark","name":"Paraiso Dark","dark":true},{"css":"paraiso-light","name":"Paraiso Light","dark":false},{"css":"pojoaque","name":"Pojoaque","dark":true},{"css":"purebasic","name":"Purebasic","dark":false},{"css":"qtcreator_dark","name":"QT Creator Dark","dark":true},{"css":"qtcreator_light","name":"QT Creator Light","dark":false},{"css":"railscasts","name":"Railscasts","dark":true},{"css":"rainbow","name":"Rainbow","dark":true},{"css":"routeros","name":"Routeros","dark":false},{"css":"school-book","name":"School Book","dark":false},{"css":"shades-of-purple","name":"Shades of Purple","dark":true},{"css":"silk-dark","name":"Silk Dark","dark":true},{"css":"silk-light","name":"Silk Light","dark":false},{"css":"snazzy","name":"Snazzy","dark":true},{"css":"solarized-dark","name":"Solarized Dark","dark":true},{"css":"solarized-light","name":"Solarized Light","dark":false},{"css":"srcery","name":"Srcery","dark":true},{"css":"stackoverflow-dark","name":"Stackoverflow Dark","dark":true},{"css":"stackoverflow-light","name":"Stackoverflow Light","dark":false},{"css":"sunburst","name":"Sunburst","dark":true},{"css":"tomorrow-night-blue","name":"Tomorrow Night Blue","dark":true},{"css":"tomorrow-night-bright","name":"Tomorrow Night Bright","dark":true},{"css":"tomorrow-night-eighties","name":"Tomorrow Night Eighties","dark":true},{"css":"tomorrow-night","name":"Tomorrow Night","dark":true},{"css":"tomorrow","name":"Tomorrow","dark":false},{"css":"vs","name":"VS","dark":false},{"css":"vs2015","name":"VS2015","dark":true},{"css":"vulcan","name":"Vulcan","dark":true},{"css":"xcode","name":"Xcode","dark":false},{"css":"xcode-dusk","name":"Xcode Dusk","dark":true},{"css":"xt256","name":"XT256","dark":true},{"css":"zenburn","name":"Zenburn","dark":true}]}
2 |
--------------------------------------------------------------------------------
/PreviewCode/themes-list.txt:
--------------------------------------------------------------------------------
1 | dark.a11y-dark.css
2 | light.a11y-light.css
3 | dark.agate.css
4 | dark.an-old-hope.css
5 | dark.androidstudio.css
6 | light.arduino-light.css
7 | dark.arta.css
8 | light.ascetic.css
9 | dark.atelier-cave-dark.css
10 | light.atelier-cave-light.css
11 | dark.atelier-dune-dark.css
12 | light.atelier-dune-light.css
13 | dark.atelier-estuary-dark.css
14 | light.atelier-estuary-light.css
15 | dark.atelier-forest-dark.css
16 | light.atelier-forest-light.css
17 | dark.atelier-heath-dark.css
18 | light.atelier-heath-light.css
19 | dark.atelier-lakeside-dark.css
20 | light.atelier-lakeside-light.css
21 | dark.atelier-plateau-dark.css
22 | light.atelier-plateau-light.css
23 | dark.atelier-savanna-dark.css
24 | light.atelier-savanna-light.css
25 | dark.atelier-seaside-dark.css
26 | light.atelier-seaside-light.css
27 | dark.atelier-sulphurpool-dark.css
28 | light.atelier-sulphurpool-light.css
29 | dark.atom-one-dark-reasonable.css
30 | dark.atom-one-dark.css
31 | light.atom-one-light.css
32 | light.brown-paper.css
33 | dark.codepen-embed.css
34 | light.color-brewer.css
35 | dark.darcula.css
36 | dark.dark.css
37 | light.default.css
38 | light.docco.css
39 | dark.dracula.css
40 | light.far.css
41 | light.foundation.css
42 | light.github-gist.css
43 | light.github.css
44 | dark.gml.css
45 | light.googlecode.css
46 | light.grayscale.css
47 | dark.gruvbox-dark.css
48 | light.gruvbox-light.css
49 | dark.hopscotch.css
50 | dark.hybrid.css
51 | light.idea.css
52 | dark.ir-black.css
53 | dark.isbl-editor-dark.css
54 | light.isbl-editor-light.css
55 | dark.kimbie-dark.css
56 | light.kimbie-light.css
57 | light.lightfair.css
58 | dark.lioshi.css
59 | light.magula.css
60 | light.mono-blue.css
61 | dark.monokai-sublime.css
62 | dark.monokai.css
63 | dark.night-owl.css
64 | dark.nnfx-dark.css
65 | light.nnfx-light.css
66 | dark.nord.css
67 | dark.obsidian.css
68 | dark.ocean.css
69 | dark.paraiso-dark.css
70 | light.paraiso-light.css
71 | dark.pojoaque.css
72 | light.purebasic.css
73 | dark.qtcreator_dark.css
74 | light.qtcreator_light.css
75 | dark.railscasts.css
76 | dark.rainbow.css
77 | light.routeros.css
78 | light.school-book.css
79 | dark.shades-of-purple.css
80 | dark.silk-dark.css
81 | light.silk-light.css
82 | dark.snazzy.css
83 | dark.solarized-dark.css
84 | light.solarized-light.css
85 | dark.srcery.css
86 | dark.stackoverflow-dark.css
87 | light.stackoverflow-light.css
88 | dark.sunburst.css
89 | dark.tomorrow-night-blue.css
90 | dark.tomorrow-night-bright.css
91 | dark.tomorrow-night-eighties.css
92 | dark.tomorrow-night.css
93 | light.tomorrow.css
94 | light.vs.css
95 | dark.vs2015.css
96 | dark.vulcan.css
97 | light.xcode.css
98 | dark.xcode-dusk.css
99 | dark.xt256.css
100 | dark.zenburn.css
101 |
--------------------------------------------------------------------------------
/PreviewCodeTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 88
21 |
22 |
23 |
--------------------------------------------------------------------------------
/PreviewCodeTests/PreviewCodeTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PreviewCodeTests.swift
3 | // PreviewCodeTests
4 | //
5 | // Created by Tony Smith on 30/05/2021.
6 | //
7 |
8 | import XCTest
9 | @testable import PreviewCode
10 |
11 | class PreviewCodeTests: XCTestCase {
12 |
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() throws {
27 | // This is an example of a performance test case.
28 | self.measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/PreviewCodeUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 88
21 |
22 |
23 |
--------------------------------------------------------------------------------
/PreviewCodeUITests/PreviewCodeUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PreviewCodeUITests.swift
3 | // PreviewCodeUITests
4 | //
5 | // Created by Tony Smith on 30/05/2021.
6 | //
7 |
8 | import XCTest
9 |
10 | class PreviewCodeUITests: XCTestCase {
11 |
12 | override func setUpWithError() throws {
13 | // Put setup code here. This method is called before the invocation of each test method in the class.
14 |
15 | // In UI tests it is usually best to stop immediately when a failure occurs.
16 | continueAfterFailure = false
17 |
18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
19 | }
20 |
21 | override func tearDownWithError() throws {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | func testExample() throws {
26 | // UI tests must launch the application that they test.
27 | let app = XCUIApplication()
28 | app.launch()
29 |
30 | // Use recording to get started writing UI tests.
31 | // Use XCTAssert and related functions to verify your tests produce the correct results.
32 | }
33 |
34 | func testLaunchPerformance() throws {
35 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
36 | // This measures how long it takes to launch your application.
37 | measure(metrics: [XCTApplicationLaunchMetric()]) {
38 | XCUIApplication().launch()
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PreviewCode 1.3.4
2 |
3 | *PreviewCode* provides macOS QuickLook file previews and Finder icon thumbnails for more than 50 programming and scripting languages, header files, and data files.
4 |
5 | It is not exhaustive, nor is it intended to be. It is, however, intended to support [the most popular languages](#languages) used by Mac-based developers, whether for use on a Mac or on other platforms.
6 |
7 | 
8 |
9 | ## Installation and Usage ##
10 |
11 | Just run the host app once to register the extensions — you can quit the app as soon as it has launched. We recommend logging out of your Mac and back in again at this point. Now you can preview source code files using QuickLook (select an icon and hit Space), and Finder’s preview pane and **Info** panels.
12 |
13 | You can disable and re-enable the Code Previewer and Code Thumbnailer extensions at any time in **System Preferences > Extensions > Quick Look**.
14 |
15 | ### Adjusting the Preview
16 |
17 | Open the main app and click on **Show Preview Preferences**, or select **Preferences...** from the **PreviewCode** menu.
18 |
19 | You can select from a range of text sizes, choose a monospace font, select the font’s style — regular, bold, italic, etc. — choose your preferred line spacing, and pick which theme you would like previews to use. One hundred themes are included, and you can view all of them, or just dark or light ones.
20 |
21 | *PreviewCode* will allow you to select a dark theme or a light one. These will be applied whatever UI mode your Mac is set to. If you select auto mode, you choose two themes, one light, the other dark. These will be applied automatically based on the current UI mode.
22 |
23 | ## Languages
24 |
25 | ### Compiled Languages
26 |
27 | - ActionScript (`.actionscript`)
28 | - Ada (`.ads`, `.adb`)
29 | - AppleScript (`.applescript`)
30 | - Arduino (`.arduino`, `.ino`)
31 | - Basic (`.basic`, `.bas`)
32 | - Brainfuck (`.brainfuck`, `.b`, `.bf`)
33 | - C (`.c`, `.h`)
34 | - C++ (`.cpp`, `.hpp`)
35 | - C# (`.csx`, `.cs`, `.c-sharp`, `.csharp`)
36 | - Clojure (`.clojure`, `.clj`, `.cljc`, `.cljs`)
37 | - CoffeeScript (`.coffee`, `.coffeescript`, `.litcoffee`)
38 | - Dart (`.dart`)
39 | - Elixir (`.elxir`, `.ex`, `.exs`)
40 | - Elm (`.elm`)
41 | - Erlang (`.erlang`, `.erl`, `.hrl`)
42 | - Fortran (`.for`)
43 | - F# (`.fsharp`, `.f-sharp`, `.fsi`, `.fsx`, `.fsscript`)
44 | - Go (`.go`)
45 | - GameMaker Language (`.gml`)
46 | - Haskell (`.haskell`, `.hs`, `.lhs`)
47 | - Java (`.java`)
48 | - JavaScript (`.js`)
49 | - Julia (`.julia`, `.jl`)
50 | - Kotlin (`.kotlin`, `.kt`, `.ktm`, `.kts`)
51 | - Lisp (`.lisp`, `.lsp`, `.fasl`)
52 | - Lua (`.lua`)
53 | - Objective-C (`.m`)
54 | - Pascal (`.pas`)
55 | - Perl (`.perl`)
56 | - PHP (`.php`)
57 | - Python (`.py`)
58 | - Ruby (`.rb`)
59 | - Rust (`.rs`, `.rust`)
60 | - Swift (`.swift`)
61 | - TypeScript (`.typescript`, `.tsx`)
62 | - Visual Basic Script (`.vbscript`, `.vbe`, `.vbs`, `.wsc`, `.wsf`)
63 | - Vue.js (`.vue`)
64 |
65 | ### Shell Scripting
66 |
67 | - Bash (`.sh`)
68 | - C Shell (`.csh`)
69 | - Korn Shell (`.ksh`)
70 | - TCSH (`.tsch`)
71 | - Z Shell (`.zsh`)
72 |
73 | ### Assembly
74 |
75 | - ARM Assembler (`.s`)
76 | - x86-64 Assembler (`.asm`, `.nasm`)
77 |
78 | ### Others
79 |
80 | - AsciiDoc (`.asciidoc`, `.adoc`, `.asc`)
81 | - Config files (`.conf`, `.cf`, `.cfg`, `.ini`, `.rc`)
82 | - Cmake files (`.cmake`)
83 | - CSS (`.css`)
84 | - Environment (`.env`)
85 | - LaTex (`.latex`, `.tex`)
86 | - Makefiles (`makefile`)
87 | - Apple Property list files (`.plist`)
88 | - Apple Entitlements files (`.entitlements`)
89 | - Apple Xcode NIB files (`.xib`)
90 | - Apple Xcode storyboard files (`.storyboard`)
91 | - Protobuf (`.proto`)
92 | - SASS/SCSS (`.scss`, `.sass`)
93 | - SQL script (`.sql`)
94 | - Terraform source file (`.tf`, `.terraform`)
95 | - Terraform variable file (`.tfvars`)
96 | - Twig (`.twig`)
97 |
98 | ## Known Issues ##
99 |
100 | - *PreviewCode* will not render Clojure `.edn` files. This is because the `.edn` file extension is pre-set on macOS to an Adobe digital rights management product.
101 | - *PreviewCode* will not render TypeScript `.ts` files. This is because the `.ts` file extension is pre-set on macOS to MPEG-2 transport stream video files. The `.tsx` and `.typescript` extensions are supported.
102 | - *PreviewCode* will not render Elixir `.exs` files if GarageBand and/or Logic Pro is installed on your Mac. This is because these apps use this file extension for EXS24 instrument files.
103 | - Previews displayed on external displays, or on Macs with connected to multiple monitors, may intermittently not be scrollable if you’re using a third-party mouse. Workaround: a MacBook’s built-in trackpad will be able to scroll.
104 | - Deselecting code in the preview is not immediate: the highlight clears after ~1s. We are investigating fixes.
105 |
106 | ## Source Code
107 |
108 | This repository contains the primary source code for *PreviewCode*. Certain graphical assets, code components and data files are not included. To build *PreviewCode* from scratch, you will need to add these files yourself or remove them from your fork.
109 |
110 | The files `REPLACE_WITH_YOUR_FUNCTIONS` and `REPLACE_WITH_YOUR_CODES` must be replaced with your own files. The former will contain your `sendFeedback(_ feedback: String) -> URLSessionTask?` function. The latter your Developer Team ID, used as the App Suite identifier prefix.
111 |
112 | You will need to generate your own `Assets.xcassets` file containing the app icon, `app_logo.png` and theme screenshots.
113 |
114 | You will need to create your own `new` directory containing your own `new.html` file.
115 |
116 | ## Acknowledgements
117 |
118 | *PreviewCode* makes use of [HighlighterSwift](https://github.com/smittytone/HighlighterSwift) which provides a Swift wrapper for [Highlight.js](https://github.com/highlightjs/highlight.js) and is derived from [Highlightr](https://github.com/raspu/Highlightr).
119 |
120 | ## Release Notes ##
121 |
122 | - 1.3.4 *14 September 2024*
123 | - Improve preference change handling.
124 | - Update highlighting code.
125 | - 1.3.3 *13 May 2024*
126 | - Revise thumbnailer to improve memory utilization and efficiency.
127 | - 1.3.2 *15 November 2023*
128 | - Add the `com.microsoft.typescript` UTI.
129 | - Fix missing **What’s New** dialog.
130 | - Fix **What’s New** dialog ‘white flash’ in dark mode.
131 | - 1.3.1 *14 August 2023*
132 | - Non-shipping release: repo/code reorganisation.
133 | - 1.3.0 *31 May 2023*
134 | - Support automatic dark/light theme application by macOS UI mode.
135 | - Add line spacing control.
136 | - 1.2.7 *31 March 2023*
137 | - Support `.elm` Elm files.
138 | - Stop *PreviewCode* attempting to preview `.scpt` binary applescript files.
139 | - Under-the-hood improvements
140 | - 1.2.6 *18 March 2023*
141 | - Allow text to be selected in previews.
142 | - Support `.gml` GML (GameMaker Language) files.
143 | - Support `.vue` Vue.js files.
144 | - Support `.entitlements`, `.xib`, `.storyboard` Xcode files.
145 | - Update to use HighlighterSwift 1.1.1.
146 | - 1.2.5 *21 January 2023*
147 | - Add link to [PreviewText](https://smittytone.net/previewtext/index.html).
148 | - Better menu handling when panels are visible.
149 | - Better app exit management.
150 | - 1.2.4 *14 December 2022*
151 | - Add `com.microsoft.c-sharp` UTI.
152 | - Support makefiles.
153 | - 1.2.3 *2 October 2022*
154 | - Add link to [PreviewJson](https://smittytone.net/previewjson/index.html).
155 | - 1.2.2 *26 August 2022*
156 | - Add `public.lua-script` UTI.
157 | - Support XML `.plist` files.
158 | - Initial support for non-utf8 source code file encodings.
159 | - 1.2.1 *7 August 2022*
160 | - Support the `.cs` C# extension.
161 | - Fix ARM assembly file display.
162 | - Fix operation of Preferences’ font style popup.
163 | - 1.2.0 *26 April 2022*
164 | - Update to use HighlighterSwift 1.1.0.
165 | - Support environment `.env` files.
166 | - Support CMake `.cmake` files.
167 | - Support Terraform variable `.tfvars` files.
168 | - Support AsciiDoc `.adoc`, `.asciidoc` and `.asc` files.
169 | - Support `.conf`, `.cf`, `.cfg`, `.ini` and `.rc` config files
170 | - Fix Haskell `.hsl` extension.
171 | - Fix x86 `.nasm` preview.
172 | - Change ActionScript supported extension to `.actionscript` to avoid clash with AppleSingle `.as`.
173 | - Remove Lisp `.cl` — clash with OpenCL source.
174 | - Remove Lisp `.l` — clash with Lex source.
175 | - Remove F# `.fs` — clash with OpenGL Fragment Shader source.
176 | - Remove Dylan `.dylan` and `.lid` extensions.
177 | - 1.1.1 *19 November 2021*
178 | - Support HashiCorp Terraform `.tf` files.
179 | - Disable file-type thumbnail tags under macOS 12 Monterey to avoid clash with system-added tags.
180 | - 1.1.0 *28 July 2021*
181 | - Improved font selection code.
182 | - Separate font style selection.
183 | - Accelerate loading of the **Preferences** panel, especially on Intel Macs.
184 | - Code streamlining.
185 | - Fixed a rare bug in the previewer error reporting code.
186 | - Apple wants links to other apps to be App Store links. So be it. What Apple wants, Apple gets.
187 | - 1.0.0 *16 June 2021*
188 | - Initial public release.
189 |
190 | ## Copyright and Credits ##
191 |
192 | Primary app code and UI design © 2024, Tony Smith.
193 |
194 | Code portions © 2016 Juan Pablo Illanes.
Code portions © 2006-22 Ivan Sagalaev.
195 |
--------------------------------------------------------------------------------
/qr-code.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/smittytone/PreviewCode/c04bf9cc10fae17951416fd01774d16480992542/qr-code.jpg
--------------------------------------------------------------------------------