mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-31 13:17:19 -06:00
Export: names typed into file names follow Windows' naming rules
Export for Screens, Batch over data sets, Save for Web and the Libraries panel name files after text the person typed: a prefix, a suffix, a name pattern, the name of an artboard, asset, layer, slice, data set or library, or the document's title. The prefix, the suffix, name patterns and Batch's data set names had only /, \ and : replaced, so on Windows a name holding <, >, ", |, ?, * or a control character failed to save, and Save for Web without a path named its files after the document's title as it was. A row folder name could end in a period, which Windows does not allow, and names such as CON, NUL, COM1 or LPT1, which Windows reserves for devices, were written as they were. file_part, which Export for Screens' prefix and suffix and Batch's data set names use, now writes all of those characters as -, and name patterns use it in place of their own copy. A new safe_file_name runs a whole file or folder name through file_part, removes trailing periods and spaces, and adds - after a device name that is the whole name or comes before its first period (CON.png becomes CON-.png). Export for Screens uses it for each file, folder and zip it names, and keeps item names distinct after it. Save for Web uses it for slice images and, without a path, for files named after the title. Library files use it too. This happens on every platform. Other names are written as before, except where a changed name now equals another item's name, which then gets a number added. Docs: docs/mcp.md, docs/target-app-parity.md.
This commit is contained in:
+14
-6
@@ -1441,7 +1441,8 @@ under `ui.library_panels`.
|
||||
## Libraries
|
||||
|
||||
The Libraries panel's libraries hold graphics, colours and character and paragraph styles that any document can use.
|
||||
They are kept on this machine: each is a `.vclibrary` file (JSON) in the `Libraries` folder next to the preferences
|
||||
They are kept on this machine: each is a `.vclibrary` file (JSON) named after the library (`CON-.vclibrary` for a
|
||||
library named after a Windows device such as `CON`) in the `Libraries` folder next to the preferences
|
||||
(none in the web app and headless sessions, where they last for the session). `library.list` lists them (`id`, `name`,
|
||||
the count of each kind, `current`, `folder`); `library.get {library?}` returns one's items (graphics with `id`, `name`,
|
||||
size and a PNG `thumbnail` in base64; colours with `name`, `hex` and `color`; styles with `name` and `attrs`).
|
||||
@@ -2087,8 +2088,8 @@ Actions panel plays an action as a `command.batch`. The Actions panel menu's Bat
|
||||
`action.batch`: the same steps on every readable file in a folder (or every data set of the open document), with
|
||||
destination `none` | `saveAndClose` | `folder` and Override Open / Save / Export. Over data sets, the folder
|
||||
destination and the overrides name each file after the document and the data set (`<document>_<data set>.<ext>`).
|
||||
Batch writes `/`, `\` and `:` in the data set's name as `-`, and adds `-2`, `-3`… to a name an earlier data set
|
||||
used (compared without case). Caps: 500 files or data sets, 8
|
||||
Batch writes `/`, `\`, `:`, `<`, `>`, `"`, `|`, `?`, `*` and control characters in the data set's name as `-`, and
|
||||
adds `-2`, `-3`… to a name an earlier data set used (compared without case). Caps: 500 files or data sets, 8
|
||||
folder levels, 256 steps. An action recorded in the Actions panel leaves the artboard out,
|
||||
and its steps of these commands get the artboard that is active when the action plays. A press with the Selection,
|
||||
Direct Selection or Group Selection tool inside an artboard makes that artboard the active one; with the Selection
|
||||
@@ -2898,7 +2899,11 @@ otherwise. `fullDocument` writes one file per row instead (a PDF of every artboa
|
||||
art), `includeBleed` grows each artboard by the document's bleed, `subfolders` puts each row's files in a sub-folder
|
||||
(its size or format, or its own `folder`), `preset: "mobile"` or `"density"` (Android-style ldpi…xxxhdpi
|
||||
sub-folders) replaces the rows, and `settings: {png: {…}, jpg: {…}, svg: {…}, pdf: {preset}}` gives every row of a
|
||||
format its options. The document remembers the last params: `document.exportSettings`.
|
||||
format its options. On every platform, `/`, `\`, `:`, `<`, `>`, `"`, `|`, `?`, `*` and control characters from a
|
||||
prefix, a suffix, a name pattern or an item's name become `-` in file and folder names, a folder name ends without
|
||||
periods or spaces, and a Windows device name (`CON`, `PRN`, `AUX`, `NUL`, `COM1` to `COM9`, `LPT1` to `LPT9`) that
|
||||
is the whole name or comes before its first period gets a `-` after it (`CON-.png`). The document remembers the last
|
||||
params: `document.exportSettings`.
|
||||
|
||||
Batch exports (#1935):
|
||||
- **What:** `layers: [id…]` (each layer's art alone) or `selection: "one" | "each"` instead of artboards
|
||||
@@ -3107,8 +3112,11 @@ File → Export → Save for Web (Legacy) writes optimised web images: `document
|
||||
`dither`, `ditherAmount`, `transparency`, `matte`, `interlaced`, `webSnap`, `lossy` (GIF) and `colorTable {locked,
|
||||
transparent, webShift, sort}`; for JPEG `quality`, `progressive`, `optimized`, `embedProfile` and `matte`; for PNG-24
|
||||
`transparency`, `matte` and `interlaced`. `metadata` (none, copyright, contact, all) writes File Info as PNG text or a
|
||||
GIF/JPEG comment; `convertToSrgb` marks PNGs as sRGB. With slices (`slice.list`) each image slice becomes
|
||||
`images/<slice name>.<ext>` (`slices: selected` writes the selected ones, `none` one image); `output: html` adds
|
||||
GIF/JPEG comment; `convertToSrgb` marks PNGs as sRGB. `<stem>` is the name of `path` without its extension, or
|
||||
without `path` the document's title with the characters Windows does not allow in a file name as `-` and a `-` after
|
||||
a Windows device name. With slices (`slice.list`) each image slice becomes `images/<slice name>.<ext>`, with a `-`
|
||||
after a Windows device name such as `aux` (`slices: selected` writes the selected ones, `none` one image);
|
||||
`output: html` adds
|
||||
`<stem>.html` placing them, with each slice's URL, target, alt text and status message, and No Image / HTML Text cells.
|
||||
Without `path` the files come back as `{name, dataBase64}`.
|
||||
|
||||
|
||||
@@ -429,7 +429,8 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- Variables: Lock Variables (`variable.lock`, in the Variables panel's bottom bar and menu) stops variables from being defined, deleted or renamed until they are unlocked, while objects can still be bound and unbound and data sets still change and apply; the lock is saved with the document.
|
||||
- Batch…: Override Save and Override Export name each file with the extension of the format the step writes, however the step spells the format (`.svg` and `SVG` give `.svg`, `png8` gives `.png`), in `action.batch`.
|
||||
- Actions panel (record/playback, persisted), generic parameter dialogs for every "…" command.
|
||||
- Batch… over data sets names each file after the document and the data set (`action.batch`). It writes `/`, `\` and `:` in the data set's name as `-`, and adds `-2`, `-3`… to a name an earlier data set used.
|
||||
- Batch… over data sets names each file after the document and the data set (`action.batch`). It writes `/`, `\`, `:`, `<`, `>`, `"`, `|`, `?`, `*` and control characters in the data set's name as `-`, and adds `-2`, `-3`… to a name an earlier data set used.
|
||||
- Export for Screens, Save for Web (slice images, and files named after the document's title) and the Libraries panel name files with the characters Windows does not allow written as `-` and with a `-` after a Windows device name such as `CON`, on every platform (`document.exportForScreens`, `document.exportForWeb`, `library.create`).
|
||||
- Variables (data merge): text, visibility and image variables bound to objects (an object may carry several), dataset rows applied in one undo step (`variable.*`, `dataset.*`) from a Variables panel and Window › Variables, with dialogs to define, bind and edit, Make Text/Visibility/Image Dynamic, Capture/Update Data Set, CSV import/export (`dataset.import` / `dataset.export`), and a row in italics when an edit leaves the art not matching it; an image dataset value is a file path and apply keeps the object's bounds; bindings let go of deleted art and locked art is left alone; every command, like the rest, is drivable over MCP and the CLI.
|
||||
- Variables: Import Data Sets… (`dataset.import`) reads tab-separated files as well as comma-separated ones, and files without a `name` column, whose rows take the first free names Data Set 1, Data Set 2 and so on. An import error about a row's values or name gives the file line the row starts on.
|
||||
- JSON-lines control channel with real egui pointer and keyboard injection.
|
||||
|
||||
Reference in New Issue
Block a user