File Info: metadata templates save, import and list from the File Info menu

File Info's menu saves the fields as an XMP metadata template (into the
Metadata Templates folder next to the preferences, or any file), imports
one with a choice of three merges, lists the saved templates and opens
the folder. The import is one undo step and records nothing when no
field changes.

- file.info.saveTemplate writes the title (when it is not the
  document's name), author, author title, description, keywords,
  rating, copyright status, notice and URL that have a value.
- file.info.applyTemplate reads a file, a saved template or XMP text
  (at most 8 MB) and merges it: replace clears the fields first, keep
  takes each field the template has, append adds keywords and fills
  only empty fields. apply: false returns the merged fields without
  changing the document.
- file.info.templates lists the folder's .xmp files.
- A PDF or .ai also opens with the rating and author title its XMP
  packet gives.

Docs: docs/mcp.md, docs/target-app-parity.md.
This commit is contained in:
dotCooCoo
2026-11-15 11:05:55 -08:00
parent 0c1ac3bdc5
commit a670cd1102
43 changed files with 1273 additions and 18 deletions
+28
View File
@@ -7312,6 +7312,34 @@ written unless the whole batch succeeds puts the saves and exports last, or runs
{"name":"run_command","arguments":{"command":"file.info","params":{"author":"Ada","keywords":"poster, fair","rating":4,"copyrightStatus":"copyrighted","copyrightNotice":"© 2026 Ada"}}}
```
A PDF, `.ai` or `.ait` also opens with the `authorTitle` and `rating` its XMP packet gives (`photoshop:AuthorsPosition`,
`xmp:Rating`, a whole number from 0 to 5).
Metadata templates (the menu at the top of File Info: Save Metadata Template…, Import…, the saved templates and
Templates Folder; https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=260) keep File
Info fields in an XMP file. `file.info.saveTemplate {name?, path?, fields?}` writes the `title` (when it is not the
document's name), `author`, `authorTitle`, `description`, `keywords`, `rating` (from 1), `copyrightStatus`,
`copyrightNotice` and `copyrightUrl` that have a value as an XMP packet, using the properties listed above; the dates
are left out. `fields` takes `file.info`'s editable keys in place of the document's values. `name` saves into the
metadata templates folder as `<name>.xmp` (the folder is made when it is missing; a name with characters file systems reject, a dot at either end, or a
device name such as `CON` is refused, and a template of the same name is replaced), `path` writes that file, and with
neither the reply's `data` is the packet; `name` and `path` together are refused. In the app the folder is
`Metadata Templates` in VectorCraft's settings folder; the web build has none.
`file.info.applyTemplate {path?|name?|data?, mode, apply?, base?}` reads one template (a file, a template in the
folder, or the packet as text; at most 8 MB, more than any saved template holds) and merges it in one undo step, recording nothing when no field changes.
`mode` is VectorCraft's own name for the three ways: `replace` clears the fields a template can hold (not the title)
and takes the template's, `keep` keeps the fields and takes each one the template gives, and `append` keeps the fields,
adds the template's keywords and takes its other fields only where the field is empty. A value `file.info` would
refuse is left out. With `apply: false` nothing changes and the reply is the merged File Info, merged into `base` (the
fields as `file.info` takes them) when given; the File Info dialog uses this for Import. A missing or bad `mode`, a
file that is not XMP and a file over 8 MB are refused. `file.info.templates {create?}` lists the folder's `.xmp` files
(the first 1,000 by name) as `{name, file, path}`, with the `folder` where the caller's file access shows full
paths; `create: true` makes the folder first. `applyTemplate`'s `name` takes either a listed `name` or its `file`.
```json
{"name":"run_command","arguments":{"command":"file.info.applyTemplate","params":{"name":"Studio","mode":"append"}}}
```
## Document Raster Effects Settings
`document.rasterEffectsSettings` holds how raster effects (shadows, glows, blurs, feathers) become images when PDF
+1
View File
@@ -1859,6 +1859,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- PDF export and PDF-compatible `.ai` and `.ait` saves write the document's File Info created date as the file's creation date, or the time of writing when the document has none, and the time of writing as its modification date; the page information mark still prints the time of writing (`crates/engine/src/tests/fileinfo.rs`, `crates/pdf/src/tests.rs`, `crates/pdf/src/tests/marks.rs`).
- PDF export and PDF-compatible `.ai` and `.ait` saves write File Info's copyright notice, URL and status to the XMP packet (`dc:rights`, `xmpRights:WebStatement`, `xmpRights:Marked`), so a PDF or `.ai` opened from its pages keeps them (`crates/pdf/src/tests/file_info.rs`, `crates/engine/src/tests/fileinfo.rs`).
- Opening a PDF or PDF-compatible `.ai` whose XMP packet nests elements more than 256 deep no longer overflows the stack: File Info leaves the packet out and takes the document information dictionary's values (`crates/pdf/src/tests/file_info.rs`).
- File Info has metadata templates: its menu saves the fields as an XMP file (Save Metadata Template…, into the Metadata Templates folder in the settings folder or anywhere), imports one with a choice of clearing the fields first, replacing the ones the template has, or appending to them (VectorCraft's own names for the three ways), lists the saved templates and opens Templates Folder; the import is one undo step (`file.info.saveTemplate`, `file.info.applyTemplate`, `file.info.templates`; `crates/engine/src/tests/fileinfo.rs`, `crates/pdf/src/tests/file_info.rs`, `crates/ui-egui/src/dialogs/file_info.rs`). A PDF or `.ai` also opens with the rating and author title its XMP packet gives.
- `file.print`, `print.preview` and `print.setup` take a print preset by name (`preset`: `[Default]` or a saved preset, in any case): its settings are used instead of the document's, with `settings` over them, `print.setup` saves them with the document, and an unknown name is refused with the list of presets.
- Print's Copies per Sheet (`copiesPerSheet`, `gutter`; off by default) prints as many copies of each artboard, with its bleed and marks, as fit the imageable area, across then down, as one grid placed like a single copy; the preview shows them, and an artboard that does not fit prints one copy per sheet with a warning (#1283).
- Place and the Links panel, Package (placed `.vectorcraft` documents packaged with their own linked files and fonts, relinked to the copies: #777), File Info, Print with print presets, PostScript output and print tiling, slices and Save for Web, Export for Screens and Asset Export, CSS Properties, PNG/PDF/SVG/text clipboard flavours; files copied in a file manager paste as art (SVG, PDF, EMF/WMF, bitmaps) on every desktop platform, and Linux/Wayland reads the compositor's clipboard (#398); on Linux the Paste menu checks the clipboard off the UI thread, so an X11 owner that never answers can't freeze the window (#510); screenshots and other copied pictures paste as embedded images at the view centre everywhere, the web included (#457).