Skip to main content

crowdin screenshot upload

Description​

Add screenshot or update an existing one with the same name

Synopsis​

crowdin screenshot upload <path> [OPTIONS]

Arguments​

<path>
File or directory to upload

Options​

--auto-tag
Choose whether or not to tag screenshot automatically

-f, --file=…
Path to the source file in Crowdin. Requires the '--auto-tag' to be passed

-b, --branch=…
Branch name. Requires the '--auto-tag' to be passed

--label=…
Attach labels to screenshot (multiple labels can be specified)

-d, --directory=…
Path to the directory in Crowdin. Requires the '--auto-tag' to be passed

-h, --help
Display help message and exit

Config Options​

-T, --token=…
Personal access token required for authentication

--base-url=…
Base URL of Crowdin server for API requests execution

--base-path=…
Path to your project directory on a local machine

-i, --project-id=…
Numeric ID of the project

Global Options​

-v, --verbose
Provide more information about the command execution

-c, --config=…
Specify a path to the configuration file

--identity=…
Specify a path to user-specific credentials

--no-colors
Disable colors and styles

--no-progress
Disable progress on executed command

-o, --output=…
Change output format (choices: "json", "toon", "plain")

Upsert behavior​

The command is an upsert, not a plain add. The screenshot's identity is the basename of the local file (ui/login.png and mobile/login.png are both login.png), so re-running the command with the same file name replaces the existing screenshot's image in place, keeping its id, its position in the project and — unless --auto-tag is passed — its tags. That is what makes scripted uploads idempotent.

If several screenshots share the same name, the oldest one is updated and a warning is printed.

Directory upload​

Pass a directory instead of a file to upload every jpeg, jpg, png and gif image under it, including subdirectories. Other files, and hidden files and directories, are skipped. Each image goes through the same upsert as a single file, and all options apply to every image.

crowdin screenshot upload screenshots/ --label release-2.0

Because the name is the identity, images under one directory must have unique file names: if ui/login.png and mobile/login.png are both found, nothing is uploaded and the command fails listing them.

A failed image doesn't stop the others; the command reports each failure and exits with an error at the end. With --output json or toon, the uploaded screenshots are printed as one list once all uploads finish.

Images are uploaded in parallel, except with --auto-tag: auto-tagging locks the whole project while it runs, so they are uploaded one at a time.

Tags​

Without --auto-tag, existing tags are preserved when the image is replaced.

With --auto-tag, all existing tags of the screenshot are removed and re-derived by OCR. Manually placed or coordinate-accurate tags are lost. If auto-tagging is already running for the project, the image is still updated and a warning is printed instead of the tags being applied.

Labels​

--label sets the screenshot's labels on both create and update, replacing any labels the existing screenshot had. Labels that don't exist yet are created.