Language: English · Čeština
Workflow automation for a print studio — creating project folders, generating Adobe Bridge headers, and configuring Finder automatically at login.
Note: The scripts ship with placeholder values for paths and server names. Before first use, edit the
propertyconstants at the top of each script to match your environment (see the Configuration section).
- Scripts
- Requirements
- Installation
- Configuration
- Usage
- Shared code
- Troubleshooting
- Known limitations
- Changelog
- Licence
- Author
- Extracts data from a Safari order sheet
- Creates a structured project folder hierarchy
- Auto-names by the pattern:
number - client - project - Creates subfolders:
pracovni,zdroje, and a final folderXX_number(XX = last two digits of the current year) - Shortcuts.app compatible
- Generates a centred header for Adobe Bridge (85 characters, Menlo font)
- Smart client-name shortening (strips legal-form suffixes)
- Auto-copies the header to the clipboard
- Locates the production folder and opens it in Bridge
- Dynamically detects the installed Adobe Bridge version
- Shortcuts.app compatible
- Auto-mounts network volumes at login (AFP/SMB)
- Checks network availability before mounting, with a configurable timeout
- Creates a Finder window with tabs for production folders
- Status notification — success or list of unmounted volumes
- macOS 13+ (Ventura or newer)
- Safari — for reading order sheets (create-project-folders, generate-bridge-header)
- "Allow JavaScript from Apple Events" must be enabled (Safari → Develop → Allow JavaScript from Apple Events)
- Shortcuts.app — for running the scripts
- Adobe Bridge (optional) — for using the headers (generate-bridge-header)
- Accessibility permission — required for start-finder (System Settings → Privacy & Security → Accessibility)
All three scripts run via Shortcuts.app:
- Open Shortcuts.app.
- Create a new shortcut.
- Add the "Run AppleScript" action.
- Paste the contents of the relevant
.applescriptfile. - Name the shortcut (e.g. "Create Folders", "Bridge Header", "Start Finder").
- Optional: bind a keyboard shortcut or add it to the menu bar.
- System Settings → General → Login Items.
- Add the "Start Finder" shortcut.
- The script will run automatically after each login.
Each script has property constants at the top of the file that must be customised for your environment.
| Property | Purpose | Default (placeholder) |
|---|---|---|
PROJECT_BASE_PATH |
Root path where folders are created | "/Volumes/PrintServer/Projects/Print Production" |
SUBFOLDER_NAMES |
Subfolder names | {"pracovni", "zdroje"} |
DANGEROUS_CHARS |
Characters replaced with underscore | {"/", "\\", ":", "*", "?", "<", ">", "|"} |
| Property | Purpose | Default (placeholder) |
|---|---|---|
PROJECT_BASE_PATH |
Path searched for the production folder | "/Volumes/PrintServer/Projects/Print Production" |
TOTAL_HEADER_WIDTH |
Header width in characters (Menlo font) | 85 |
MAX_CLIENT_LENGTH |
Maximum client-name length | 25 |
MIN_SPACING |
Minimum spacing between header elements | 2 |
| Property | Purpose | Default (placeholder) |
|---|---|---|
CHECK_SERVER |
Server used to test network reachability | "fileserver.local" |
SERVER_LIST |
Network volumes to mount {dName, dAddr} |
see script |
PANEL_PATHS |
POSIX paths for Finder tabs (first = main window) | see script |
NETWORK_TIMEOUT |
Max seconds to wait for the network | 60 |
TAB_DELAY |
Delay between tab creations (raise on slower machines) | 0.6 |
WINDOW_BOUNDS |
Finder-window position and size {left, top, right, bottom} |
{50, 50, 1600, 1000} |
- Open the order sheet in Safari.
- Run the "Create Folders" shortcut.
- Review the extracted data and confirm creation.
- The folder is created and revealed in Finder.
- Open the order sheet in Safari.
- Run the "Bridge Header" shortcut.
- The header is copied to the clipboard.
- The script locates the production folder and offers to open it in Bridge.
- Paste into Adobe Bridge (Cmd+V).
- Runs automatically at login (or run it manually).
- Waits for the network server to become reachable (max 60 s).
- If waiting exceeds 5 s, a "Waiting for network…" notification is shown.
- Mounts every network volume that is not yet mounted.
- Opens Finder with one window and a tab for each configured path.
- Shows a summary notification.
create-project-folders and generate-bridge-header share helper functions:
getCurrentYearSuffix()— last two digits of the current yearextractJSONValue()— extracts values from a JSON string
Changes to these helpers must be propagated to both scripts manually.
Symptom: Dialog "Error reading data from Safari"
Resolution:
- Check that you are on the correct order-sheet page.
- Try reloading the page (Cmd+R).
- Use manual entry in the format:
number - client - project- Example:
12345 - ACME Corp - Logo Redesign
- Example:
Expected Safari DOM structure: the script reads HTML elements:
<span class="Header1">containing "Zakazka cislo: X.Y"<td class="TabColHead">with texts "Projekt:" and "Klient:"<td class="TabValue">with the values next to them
If the order-sheet structure changes, use manual entry.
Symptom: Alert "Folder already exists"
Resolution:
- Click "Open Folder" to reveal the existing structure.
- To create a new one, change the order number or project name.
Symptom: Notification "Network volume is not mounted"
Resolution:
- Mount the network volume manually in Finder.
- Verify the path inside the script:
- Open the script in Script Editor.
- Find the line:
property PROJECT_BASE_PATH : "..." - Edit the path to match your environment.
- Save (Cmd+S).
- Re-run the script.
Symptom: Alert "Safari is not running"
Resolution:
- Launch Safari before running the script.
- Open the order sheet.
- Try again.
Symptom: Alert "Folder name is too long"
Resolution:
- macOS folder-name limit is 255 characters (the script enforces 240).
- Shorten the client or project name in the order sheet.
- Or use manual entry with shorter names.
Symptom: System dialog about missing Accessibility permission
Resolution:
- System Settings → Privacy & Security → Accessibility.
- Allow Shortcuts.app (or the terminal you launched the script from).
Symptom: Dialog "Network unreachable" after the timeout expires
Resolution:
- Check your network connection.
- Verify that
CHECK_SERVERpoints to the correct host. - Increase
NETWORK_TIMEOUTfor slow networks.
Resolution:
- Read your display dimensions from Script Editor:
tell application "Finder" to get bounds of window of desktop - Use the result as the
WINDOW_BOUNDSvalue.
- Safari-dependent: create-project-folders and generate-bridge-header expect a specific HTML structure of the order sheet.
- Finder tabs: start-finder creates tabs via
keystroke "t" using command down(System Events) — Finder has no native AppleScript command for creating tabs. - Accessibility: start-finder requires the Accessibility permission to send keystrokes.
- WINDOW_BOUNDS: hardcoded for a specific monitor resolution — must be adjusted when the display changes.
- TAB_DELAY: may need to be increased on slower machines.
- No batch mode: one project / one header at a time.
- No undo: created folders must be removed manually.
close every window: start-finder closes every open Finder window on launch — intentional for a clean state at login, but destructive when run manually.
All changes are documented in CHANGELOG.md.
This project is licensed under the MIT Licence — see LICENSE.
Free for personal and commercial use, including modification and redistribution. The only requirement is that the copyright notice is preserved. No warranty.
- Concept and testing: Ladislav Osvald
- Implementation: Claude (Anthropic AI)
- Year: 2025–2026