I can successfully preview a given .bike file with the following preprocessor (<a> links pointing to graphic files pre-processed to <img> elements) if I pipe to mk at the command line:
/opt/homebrew/bin/jaq --from xml --to xml 'walk(
if type == "object" and .t == "a" then
if (.a.href? and (.a.href | test("\\.(png|jpe?g|svg|gif|webp|avif|bmp|tiff?|hei[cf]|ico)$"; "i"))) then
([.c[]? | select(type == "string")] | join("")) as $alt_text |
.t = "img" |
.a.src = .a.href |
.a.alt = $alt_text |
del(.a.href, .c)
else
.
end
else
.
end
)' notes2026-06-22.bike | mk
and in the Marked 3 GUI, as a run command action trigged on .bike extension, this appears to work (with notes2026-06-22.bike | mk deleted from the end, to assume standard input and output), when a .bike file is already loaded, and we click the run command test button which has the tooltip (Apply rules and reload all preview windows).
BUT, if we then close the .bike file, and try to preview it anew through File > Open for example, the result is a Command Error message:
Error: failed to parse: unknown token at 1:1
The relevant log section refers to difficulty accessing a bookmark for the jaq command.
ℹ️: 2026/06/22 11:53:00:330 am | 🔵 [runCommand] About to resolve symlinks for: /opt/homebrew/bin/jaq
ℹ️: 2026/06/22 11:53:00:330 am | 🔵 [runCommand] Resolved executable path: /opt/homebrew/Cellar/jaq/3.0.0/bin/jaq (from /opt/homebrew/bin/jaq)
ℹ️: 2026/06/22 11:53:00:330 am | No bookmark found for /opt/homebrew/bin/jaq, will request access
ℹ️: 2026/06/22 11:53:00:330 am | 🔵 [runCommand] hasWorkingBookmark: 0, executableAccessible: 0
⚠️: 2026/06/22 11:53:00:330 am | 🔵 [runCommand] Could not start accessing bookmark for /opt/homebrew/bin/jaq
ℹ️: 2026/06/22 11:53:00:330 am | 🔵 [runCommand] Executing external binary through shell (no bookmark): /bin/zsh -c "'/opt/homebrew/Cellar/jaq/3.0.0/bin/jaq' '--from' 'xml' '--to' 'xml' 'walk( if type == "object" and .t == "a" then if (.a.href? and (.a.href | test("\\.(png|jpe?g|svg|gif|webp|avif|bmp|tiff?|hei[cf]|ico)$"; "i"))) then ([.c[]? | select(type == "string")] | join("")) as $alt_text | .t = "img" | .a.src = .a.href | .a.alt = $alt_text | del(.a.href, .c) else . end else . end )'"
ℹ️: 2026/06/22 11:53:00:330 am | 🔵 [runCommand] Working directory: /Users/robintrew/DayNotes
ℹ️: 2026/06/22 11:53:00:330 am | 🔵 [runCommand] About to launch task with path: /bin/zsh
ℹ️: 2026/06/22 11:53:00:330 am | 🔵 [runCommand] Executable verified (1361216 bytes on disk), stdin length: 2885
ℹ️: 2026/06/22 11:53:00:330 am | 🔵 [runCommand] Launching NSTask with path: /bin/zsh
ℹ️: 2026/06/22 11:53:00:394 am | 🔵 [runCommand] NSTask finished, exit status: 5, stdout: 0 bytes, stderr: 45 bytes
Any thoughts ?