iOS capture shortcut — create a Museion post, open it in Textastic #174

Closed
opened 2026-11-05 12:04:57 +01:00 by AlexKucera · 2 comments
Owner

Part of #167

Question

An iOS Shortcut that creates a Museion piece in the iCloud Home and opens it in Textastic — what shape, and does the round-trip verify? Owner asked mid-session 2026-11-05; viable only because the companion pick (#169) put the Home in CloudDocs.

Grounded facts (Textastic v10 manual, integration_other_apps/shortcuts + x-callback-url; Museion source):

  • Textastic exposes two Shortcuts actions — "Get File" and "Open File" (path param; in-app "Copy Path") — plus an x-callback-url API (textastic://x-callback-url/open?location=fullPath…) where fullPath exists explicitly for file-provider paths (Working Copy uses it).
  • Museion's scan is folder-shape tolerant: projects/<name>/<id>/post.md with a bare body scans as First Draft / writer / post (lenient frontmatter), and a bare post gets fully stamped by overwrite on first macOS save ("normalizes bare posts on save", PostStore.swift). ZERO macOS code needed.
  • iOS Shortcuts has native Files actions (Create Folder / Save File) that write into iCloud Drive.
  • The Home must already be in iCloud → blocked by the dogfood migration (map #167's S3 slice).

Folded (settled in the live round unless vetoed): trigger = share sheet + run-with-prompt fallback; body = bare markdown, first line = title; id = timestamp slug (no iOS collision machinery — scan's folder-of-winner dedupe is the safety net); open = one-time "Add External Folder" of iCloud Drive/Museion in Textastic, then the native "Open File" action.

The round's question

Which project does a captured piece land in — dedicated captured, the posts default, or ask-each-time?

[Generated by AI]

Part of #167 ## Question An iOS Shortcut that creates a Museion piece in the iCloud Home and opens it in Textastic — what shape, and does the round-trip verify? Owner asked mid-session 2026-11-05; viable only because the companion pick (#169) put the Home in CloudDocs. Grounded facts (Textastic v10 manual, integration_other_apps/shortcuts + x-callback-url; Museion source): - Textastic exposes two Shortcuts actions — "Get File" and "Open File" (path param; in-app "Copy Path") — plus an x-callback-url API (`textastic://x-callback-url/open?location=fullPath…`) where `fullPath` exists explicitly for file-provider paths (Working Copy uses it). - Museion's scan is folder-shape tolerant: `projects/<name>/<id>/post.md` with a bare body scans as First Draft / writer / post (lenient frontmatter), and a bare post gets fully stamped by overwrite on first macOS save ("normalizes bare posts on save", PostStore.swift). ZERO macOS code needed. - iOS Shortcuts has native Files actions (Create Folder / Save File) that write into iCloud Drive. - The Home must already be in iCloud → blocked by the dogfood migration (map #167's S3 slice). Folded (settled in the live round unless vetoed): trigger = share sheet + run-with-prompt fallback; body = bare markdown, first line = title; id = timestamp slug (no iOS collision machinery — scan's folder-of-winner dedupe is the safety net); open = one-time "Add External Folder" of iCloud Drive/Museion in Textastic, then the native "Open File" action. ## The round's question Which project does a captured piece land in — dedicated `captured`, the `posts` default, or ask-each-time? [Generated by AI]
AlexKucera added the wayfinder:prototypewayfinder:prototype labels 2026-11-05 12:04:57 +01:00
AlexKucera added a new dependency 2026-11-05 12:06:00 +01:00
AlexKucera self-assigned this 2026-11-05 12:07:24 +01:00
Author
Owner

Resolves #174 (child of #167). Round: one structured form, 2026-11-05 — placement answered with the recommendation; folded set unvetoed.

Decision

iOS capture shortcut — recipe pinned. Captures land in a dedicated captured project.

Placement: projects/captured/<slug>/post.md — every iOS capture groups under one library section head (a visible triage inbox); one "Move to Project…" on macOS files it later. The shortcut hardcodes projects/captured/.

The recipe (the asset #138 builds from)

Shortcut "Museion Capture":

  1. Receive input from Share Sheet (text); fallback Ask for Input when run bare.
  2. Coerce to Text — the body IS the input; line 1 = the title (exactly how Museion's scan derives it).
  3. Format Date (current) as yyyy-MM-dd-HHmm → <slug>.
  4. Create Folder iCloud Drive/Museion/projects/captured/<slug> (create projects/captured once at setup if nested creation isn't supported).
  5. Save File: the text → …/<slug>/post.md.
  6. Open File — Textastic's native Shortcuts action, path projects/captured/<slug>/post.md. One-time setup: "Add External Folder…" of iCloud Drive/Museion in Textastic. Fallback if the action can't address the external folder: textastic://x-callback-url/open?location=fullPath&path=<full device path of the piece dir>&name=post.md (the manual's file-provider form, Working Copy's pattern).

Folded (settled, unvetoed)

  • Bare markdown, no frontmatter written on iOS — Museion stamps pass_state/origin/type on the first macOS save ("normalizes bare posts on save", PostStore.swift). Kills YAML/CRLF pitfalls.
  • Timestamp ids can't collide; scan's folder-of-winner dedupe is the safety net.
  • Zero macOS code — folder-shape-tolerant scan (projects/<name>/<id>/post.md, lenient frontmatter → First Draft/writer/post) already lands the piece.
  • Recipe lands in the README companion section riding #172 once verified.

Verification protocol (→ #138's acceptance)

Capture from a Safari share sheet → Files app shows folder + post.md → Textastic opens in place → edit + save → macOS library shows the piece under "captured" as First Draft after sync → open + save in Museion stamps the frontmatter → Textastic still opens the stamped file.

Disposition

Execution: #138 (blocked by this ticket; also wired to #145). The map's hardening fog trigger arms only if this flow surfaces quirks.

[Generated by AI]

Resolves #174 (child of #167). Round: one structured form, 2026-11-05 — placement answered with the recommendation; folded set unvetoed. ## Decision **iOS capture shortcut — recipe pinned. Captures land in a dedicated `captured` project.** Placement: `projects/captured/<slug>/post.md` — every iOS capture groups under one library section head (a visible triage inbox); one "Move to Project…" on macOS files it later. The shortcut hardcodes `projects/captured/`. ## The recipe (the asset #138 builds from) Shortcut "Museion Capture": 1. Receive input from Share Sheet (text); fallback Ask for Input when run bare. 2. Coerce to Text — the body IS the input; line 1 = the title (exactly how Museion's scan derives it). 3. Format Date (current) as `yyyy-MM-dd-HHmm` → `<slug>`. 4. Create Folder `iCloud Drive/Museion/projects/captured/<slug>` (create `projects/captured` once at setup if nested creation isn't supported). 5. Save File: the text → `…/<slug>/post.md`. 6. Open File — Textastic's native Shortcuts action, path `projects/captured/<slug>/post.md`. One-time setup: "Add External Folder…" of `iCloud Drive/Museion` in Textastic. Fallback if the action can't address the external folder: `textastic://x-callback-url/open?location=fullPath&path=<full device path of the piece dir>&name=post.md` (the manual's file-provider form, Working Copy's pattern). ## Folded (settled, unvetoed) - Bare markdown, no frontmatter written on iOS — Museion stamps pass_state/origin/type on the first macOS save ("normalizes bare posts on save", PostStore.swift). Kills YAML/CRLF pitfalls. - Timestamp ids can't collide; scan's folder-of-winner dedupe is the safety net. - Zero macOS code — folder-shape-tolerant scan (`projects/<name>/<id>/post.md`, lenient frontmatter → First Draft/writer/post) already lands the piece. - Recipe lands in the README companion section riding #172 once verified. ## Verification protocol (→ #138's acceptance) Capture from a Safari share sheet → Files app shows folder + post.md → Textastic opens in place → edit + save → macOS library shows the piece under "captured" as First Draft after sync → open + save in Museion stamps the frontmatter → Textastic still opens the stamped file. ## Disposition Execution: #138 (blocked by this ticket; also wired to #145). The map's hardening fog trigger arms only if this flow surfaces quirks. [Generated by AI]
Author
Owner

Follow-up on the recipe (owner question): the timestamped folder is NOT auto-translated into a title-slug folder. The library title comes from the body's first line (folder name never displayed); plain macOS saves write in place and only stamp frontmatter; explicit Rename… is the sole re-slug path — it retitles the body AND moves the folder to the title's slug within the same project (PostStore.swift:346, availableSlug guards collisions). Timestamp ids are fine forever; Rename… on macOS whenever a title-named folder is wanted.

[Generated by AI]

Follow-up on the recipe (owner question): the timestamped folder is NOT auto-translated into a title-slug folder. The library title comes from the body's first line (folder name never displayed); plain macOS saves write in place and only stamp frontmatter; explicit Rename… is the sole re-slug path — it retitles the body AND moves the folder to the title's slug within the same project (PostStore.swift:346, availableSlug guards collisions). Timestamp ids are fine forever; Rename… on macOS whenever a title-named folder is wanted. [Generated by AI]
Sign in to join this conversation.