mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-03 06:30:00 -06:00
PDF presets are kept one file each in a PDF Presets folder, ICC profiles as copies in a Color Profiles folder, next to the preferences; the desktop app and vectorcraft-cli use them. Adds color.removeProfile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
committed by
bflatastic
co-authored by
Claude Opus 5.5
parent
51f8582c25
commit
a8e45f0e2d
+2
-1
@@ -85,7 +85,8 @@ By default VectorCraft's own crates log at `info` and everything else at `warn`.
|
||||
|---|---|
|
||||
| `VECTORCRAFT_CONTROL_PORT` | Same as `--control <port>`, which overrides it; a value that isn't a port from 1 to 65535 stops the app |
|
||||
| `VECTORCRAFT_IN_WINDOW_MENUS` | Any value but empty or `0`: same as `--in-window-menus` (see [macOS: the menu bar](#macos-the-menu-bar)) |
|
||||
| `VECTORCRAFT_NO_PREFS` | No preferences read or written, no default Data Recovery folder and no log file (agents' test runs) |
|
||||
| `VECTORCRAFT_NO_PREFS` | No preferences read or written, no default Data Recovery folder and no log file, and no saved PDF presets or loaded ICC profiles kept (agents' test runs; also for `vectorcraft-cli`) |
|
||||
| `VECTORCRAFT_CONFIG_DIR` | The folder for the preferences and the folders next to them (`PDF Presets`, `Color Profiles`, …), for the app and `vectorcraft-cli` (see `docs/control-protocol.md`) |
|
||||
| `WGPU_POWER_PREF` | Graphics adapter: `low`, `high` or `none` (see [Desktop graphics processor](#desktop-graphics-processor)) |
|
||||
| `WGPU_ADAPTER_NAME` | Graphics adapter by (part of) its name, any case (see [Desktop graphics processor](#desktop-graphics-processor)) |
|
||||
| `WGPU_BACKEND` | Graphics backends: `vulkan`, `dx12`, `metal`, `gl` |
|
||||
|
||||
+24
-1
@@ -771,6 +771,27 @@ applies to the `--cmd` just before it. `run` also accepts the host commands `fil
|
||||
`file.exportForScreens` and `tool.select`. `run --in`, `convert` and `info` read every format `document.open` reads
|
||||
(`vectorcraft-cli --help` lists them).
|
||||
|
||||
### What a headless session remembers
|
||||
|
||||
`vectorcraft-cli run` and the headless `mcp` server keep two things between runs, in folders next to the
|
||||
preferences (the folder the desktop app uses, so both see the same ones; `VECTORCRAFT_CONFIG_DIR` moves it):
|
||||
|
||||
- **Saved PDF presets** (`pdf.preset.save`, `.delete`, `.import`): one `.vcpdfpresets` file per preset in
|
||||
`PDF Presets`, written as the command runs. Presets saved earlier are there at the next start and work as
|
||||
`preset` in the PDF options.
|
||||
- **ICC profiles** (`color.loadProfile`): a copy of the file goes into `Color Profiles` (the result says
|
||||
`remembered: true`), and every profile there is registered again at the next start, before the first
|
||||
command, so `edit.colorSettings {"cmyk": "…"}` or a preset's output intent can name it in a later run. The
|
||||
copy is what counts: the original may move or be deleted. `color.removeProfile {name}` forgets a profile and its
|
||||
copy (not while it is a working space).
|
||||
|
||||
Not remembered: Color Settings, the document, anything else. Nothing is read or written when
|
||||
`VECTORCRAFT_NO_PREFS` is set, and a server confined with `--automation-read-root` or
|
||||
`--automation-write-root` keeps nothing either (the folders are outside its roots). A file that is damaged, too large
|
||||
(a profile over 32 MB, a presets file over 1 MB) or not a valid preset or profile is skipped and logged. When the
|
||||
desktop app starts, the presets it kept in its preferences file before this folder existed are moved into it; after
|
||||
that the folder is the one place they live, so a preset deleted by `vectorcraft-cli` is gone in the app too.
|
||||
|
||||
### Parameter keys
|
||||
|
||||
`command_run`, each step of `command_batch`, `run --cmd … --params` and the control channel's `engine.execute` check
|
||||
@@ -2476,8 +2497,10 @@ newName?, description?, preset?, …document.exportPdf options}` creates or chan
|
||||
the preset's own settings; `newName` renames it; built-in presets are read-only; passwords are never stored);
|
||||
`pdf.preset.delete {name}` deletes one. `pdf.preset.export {names?, path?}` writes them as a `.vcpdfpresets` JSON file
|
||||
(without `path` it returns `data`), and `pdf.preset.import {path? | data? | dataBase64?, replace?}` adds a file's
|
||||
presets (names in use get a number unless `replace`). Saved presets live with the preferences and work as `preset`
|
||||
presets (names in use get a number unless `replace`). Saved presets work as `preset`
|
||||
in `document.exportPdf`, `document.pdfSettings`, `document.export`/`serialize` with format `pdf` and `.ai` saves.
|
||||
They are kept across restarts, in the desktop app and in `vectorcraft-cli` alike (see
|
||||
[What a headless session remembers](#what-a-headless-session-remembers)).
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"pdf.preset.save","params":{"name":"Web","preset":"Smallest File Size","compatibility":"1.5"}}}
|
||||
|
||||
Reference in New Issue
Block a user