Actions: Batch… stays in the Actions panel menu, as the reference app has it (#1938)

This commit is contained in:
bflatastic
2026-10-16 04:55:01 +07:00
parent 0fe70314b8
commit 08dde8783e
5 changed files with 8 additions and 8 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
//! `action.batch`: play an action's commands on every file in a folder, or on every data set
//! of the open document (File › Automate › Batch / the Actions panel).
//! of the open document (the Actions panel menu's Batch…).
//!
//! Public options follow the Batch dialog: source Folder or Data Sets; destination None,
//! Save and Close, or Folder; Override Open / Save / Export. Cited:
@@ -324,7 +324,8 @@ fn is_openable(path: &str) -> bool {
OPEN_EXTS.iter().any(|e| *e == ext) || FORMATS.iter().any(|f| f.read && f.extensions.iter().any(|e| *e == ext))
}
#[cfg(all(test, not(target_arch = "wasm32")))]
#[cfg(test)]
#[cfg(not(target_arch = "wasm32"))]
mod tests {
use super::*;
use serde_json::json;
+2 -2
View File
@@ -1,6 +1,6 @@
//! Document file I/O for every frontend (desktop, web, CLI, control channel, headless MCP): open,
//! save, export and serialize by path or bytes (base64), the format table, `command.batch` and
//! `action.batch` (File › Automate › Batch / the Actions panel).
//! `action.batch` (the Actions panel menu's Batch…).
//!
//! - `load`: `document.open` (native, legacy, SVG/SVGZ, PDF/.ai/.ait, DXF, raster images).
//! - `action_batch`: play an action on every file in a folder or every data set.
@@ -152,7 +152,7 @@ pub fn specs() -> Vec<CommandSpec> {
cmd!(
"action.batch",
"Batch…",
["File", "Automate"],
[],
None,
"{commands: [{command, params}] (the action's steps), source?: folder (default) | datasets, folder? (required for folder: the source folder), includeSubdirs?: false, destination?: none (default: leave each file open) | saveAndClose (save over the source and close) | folder (save or export into destinationFolder and close), destinationFolder? (required when destination is folder; also the folder Override Save/Export write into), overrideOpen?: true (skip document.open / file.open steps: the batch opens each source file), overrideSave?: true (point document.save / file.save / file.saveAs at destinationFolder/{stem}.{ext}), overrideExport?: true (point document.export / document.exportForScreens / document.exportSelection the same way), stopOnError?: true, label?} play the commands on every readable file in folder (and its subfolders when includeSubdirs), or on every data set of the open document (source: datasets; File + Data Set Name for Override Save/Export). Caps: 500 files or data sets, 8 folder levels, 256 steps. Batches cannot nest. → {processed: [{path|dataset, result|error}…], count, failed, stopped}",
always,