mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
Issue #1935 asks for batch exports of many logo variations in many formats, each format in its own folder. This builds on Export for Screens, which already writes every chosen artboard in every format row. Names: a file name pattern (`name`) names every file alike. Tokens: <filename> (the document), <name> (the artboard, asset, layer or object), <index>, a run of # (a counter, zero-padded to the run's length, from counterStart; counterPer item or file), YYYYMMDD, YYYY-MM-DD, <date>, <time>, <YYYY>, <MM>, <DD>, <format>, <scale> and <suffix>. A trailing .ext is dropped. Words are not changed: only the date patterns and the bracketed tokens are. `date` sets the day (the default is today, UTC). Different files that a pattern names alike get -2, -3... Without a pattern, two rows with one name still write the first row only, as before. Folders: `folders` puts all files in one folder, a folder per row (as Create Sub-folders did), per extension, per item, or per item and then extension. What is exported: besides artboards, assets and the full document, `layers` (each layer's art alone, sublayers included) and `selection` (one file of the selection, or a file per object). Formats: rows can also be EPS, AI and VectorCraft (a document of the item alone, its one artboard). A PDF row with printer's marks (PDF Print in the dialog: trim, registration, colour bars, page information, suffix -print) sits next to a plain PDF row. Presets: document.exportPresets.list, .save and .delete keep batch export presets with the preferences, and `exportPreset` uses one under the call's own params. Built-in: Logo Package (SVG, PNG 1x and 2x, PDF and print PDF, a folder per format) and Print-Ready PDF. Dialog: Layers and Selection tabs with thumbnails; an Export Preset menu with Save and Delete; Folders; File Name with Insert for the tokens, Start at, Prefix, and an example of the first file's name. The OK button says Export Layer or Export Selection on those tabs. Tests: the pattern tokens, the request's example (SVG, PNG, PDF and print PDF for artboards 1-3, a folder per extension, the print PDF a bigger page), folders by item and both, the counter by item and by file, numbered duplicates, layers and the selection, EPS, AI and VectorCraft per artboard, presets (built-in, saved, used, replaced, deleted, kept with the preferences), bad params, and the dialog (every tab, the example name, a pattern export into folders, the Layers and Selection tabs, presets applied and saved). The three tests that refused EPS and VectorCraft rows now check those files. New labels are translated in all 19 catalogs.