Skip to content

Commit 429d935

Browse files
committed
quicklook: improve CE previews and add Evo support
Present readable content and structured metadata for CE and Evo variable files. Render image and picture data directly with pixelated scaling, and provide TI-BASIC Pretty/As-is views with syntax-aware highlighting.
1 parent 2b9ab3d commit 429d935

5 files changed

Lines changed: 750 additions & 200 deletions

File tree

CMakeLists.txt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,31 @@ if(APPLE)
155155
82u 8xu 8cu 8eu 8pu 8yu
156156
8xk 8ck 8ek
157157
8xq 8cq
158+
8xn2 8xl2 8xp2 8xd2
159+
8ci2 8ca2 8xm2 8xy2
160+
8xv2 8xg2 8xs2 8ek2
161+
8xw2 8xz2 8xt2 8xpy2
158162
)
159163

160164
set(TIVARS_QUICKLOOK_EXTENSION_XML "")
161165
set(TIVARS_QUICKLOOK_IMPORTED_ALIAS_UTI_XML "")
162-
set(TIVARS_QUICKLOOK_SUPPORTED_CONTENT_TYPE_XML " <string>${TIVARS_QUICKLOOK_UTI}</string>\n")
166+
set(TIVARS_QUICKLOOK_SUPPORTED_CONTENT_TYPE_XML
167+
" <string>${TIVARS_QUICKLOOK_UTI}</string>\n\
168+
<string>org.revsoft.wabbitemu.group</string>\n\
169+
<string>org.revsoft.wabbitemu.application</string>\n\
170+
<string>org.revsoft.wabbitemu.program</string>\n\
171+
<string>org.revsoft.wabbitemu.picture</string>\n")
163172
foreach(ext IN LISTS TIVARS_QUICKLOOK_EXTENSIONS)
164173
string(APPEND TIVARS_QUICKLOOK_EXTENSION_XML " <string>${ext}</string>\n")
174+
string(APPEND TIVARS_QUICKLOOK_SUPPORTED_CONTENT_TYPE_XML
175+
" <string>com.ti.et.core.datatypes.${ext}</string>\n")
165176
if(ext STREQUAL "8xp")
166177
set(EXTRA_UTTypeConformsTo " <string>org.revsoft.wabbitemu.program</string>\n")
167-
elseif(exp STREQUAL "8xg")
178+
elseif(ext STREQUAL "8xg")
168179
set(EXTRA_UTTypeConformsTo " <string>org.revsoft.wabbitemu.group</string>\n")
169-
elseif(exp STREQUAL "8xi")
180+
elseif(ext STREQUAL "8xi")
170181
set(EXTRA_UTTypeConformsTo " <string>org.revsoft.wabbitemu.picture</string>\n")
171-
elseif(exp STREQUAL "8xk")
182+
elseif(ext STREQUAL "8xk")
172183
set(EXTRA_UTTypeConformsTo " <string>org.revsoft.wabbitemu.application</string>\n")
173184
else()
174185
set(EXTRA_UTTypeConformsTo "")

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ This repo ships a modern macOS Quick Look host app with embedded Preview and Thu
9595
Build it with:
9696
```sh
9797
cmake -S . -B build
98-
cmake --build build --target tivars_quicklook_app
98+
cmake --build build --target tivars_quicklook
9999
```
100100

101101
That produces `build/TIVarsQuickLook.app`, containing:
@@ -111,7 +111,7 @@ qlmanage -r
111111

112112
The CMake build ad hoc-signs the app and both extensions automatically when `codesign` is available.
113113

114-
The Preview extension returns rich HTML previews for parsed variable/flash metadata and readable content when available. The Thumbnail extension renders custom badges/cards keyed off the detected TI file type.
114+
The Preview extension returns rich HTML previews for parsed legacy, Evo, and flash metadata and readable content when available. The Thumbnail extension renders custom badges/cards keyed off the detected TI file type. Evo's `8xn2` through `8xpy2` file extensions are registered alongside the pre-Evo formats.
115115

116116
If macOS does not pick the extensions up immediately, useful diagnostics are:
117117
```sh

quicklook/Preview-Info.plist.in

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -54,37 +54,7 @@
5454
<dict>
5555
<key>QLSupportedContentTypes</key>
5656
<array>
57-
<string>com.adriweb.tivars.calculator-file</string>
58-
<string>org.revsoft.wabbitemu.group</string>
59-
<string>org.revsoft.wabbitemu.application</string>
60-
<string>org.revsoft.wabbitemu.program</string>
61-
<string>org.revsoft.wabbitemu.picture</string>
62-
<string>com.ti.et.core.datatypes.8xg</string>
63-
<string>com.ti.et.core.datatypes.8xi</string>
64-
<string>com.ti.et.core.datatypes.8xk</string>
65-
<string>com.ti.et.core.datatypes.8xn</string>
66-
<string>com.ti.et.core.datatypes.8xl</string>
67-
<string>com.ti.et.core.datatypes.8xm</string>
68-
<string>com.ti.et.core.datatypes.8xp</string>
69-
<string>com.ti.et.core.datatypes.8xy</string>
70-
<string>com.ti.et.core.datatypes.8xs</string>
71-
<string>com.ti.et.core.datatypes.8ci</string>
72-
<string>com.ti.et.core.datatypes.8xd</string>
73-
<string>com.ti.et.core.datatypes.8xc</string>
74-
<string>com.ti.et.core.datatypes.8xw</string>
75-
<string>com.ti.et.core.datatypes.8xz</string>
76-
<string>com.ti.et.core.datatypes.8xt</string>
77-
<string>com.ti.et.core.datatypes.8xv</string>
78-
<string>com.ti.et.core.datatypes.8cg</string>
79-
<string>com.ti.et.core.datatypes.8ca</string>
80-
<string>com.ti.et.core.datatypes.82u</string>
81-
<string>com.ti.et.core.datatypes.8xu</string>
82-
<string>com.ti.et.core.datatypes.8cu</string>
83-
<string>com.ti.et.core.datatypes.8eu</string>
84-
<string>com.ti.et.core.datatypes.8pu</string>
85-
<string>com.ti.et.core.datatypes.8yu</string>
86-
<string>com.ti.et.core.datatypes.8ck</string>
87-
<string>com.ti.et.core.datatypes.8ek</string>
57+
@TIVARS_QUICKLOOK_SUPPORTED_CONTENT_TYPE_XML@
8858
</array>
8959
<key>QLSupportsSearchableItems</key>
9060
<false/>

0 commit comments

Comments
 (0)