MetriCal Command: Plex Copy
Usage
Plex Copy - CLI Example
metrical plex copy [OPTIONS] [PLEX_OR_RESULTS_PATH]
Plex Copy - Manifest Example
command = "plex-copy"
input-plex = "input.json"
regenerate-uuids = false
rename-topic = []
output-plex = "{{auto}}"
Purpose
metrical plex copy duplicates a Plex, with two optional transformations:
- Regenerate UUIDs — Assign brand-new UUIDs to every component in the copied Plex. This is useful in production-line scenarios where calibrations from similar systems must be tracked independently across their lifecycle.
- Rename topics — Change the topic name of one or more components in the copied Plex. This is useful when adapting a Plex from one system configuration to another where topic names differ.
Examples
Make a plain copy of a Plex
metrical plex copy input.json -o output.json
Copy with all-new UUIDs (useful for production-line workflows)
metrical plex copy --regenerate-uuids input.json -o output.json
Copy and rename a component's topic
metrical plex copy --rename-topic /old/camera/name:/new/camera/name input.json -o output.json
Rename a component by UUID and regenerate all UUIDs
metrical plex copy \
--regenerate-uuids \
--rename-topic 77776666-0000-0000-0000-000000000000:/camera/left \
input.json \
-o output.json
Arguments
[PLEX_OR_RESULTS_PATH]
The path to the input Plex. If omitted, MetriCal will read the Plex from stdin.
Options
Global Arguments
As with every command, all global arguments are supported (though not all may be used).
-U, --regenerate-uuids
Regenerates all UUIDs in the output Plex, assigning fresh UUIDs to every component.
-T, --rename-topic [OLD_COMPONENT_IDENTIFIER:NEW_TOPIC]
Rewrites a component's topic name. Accepts a string in the format
old_component_name:new_topic_nameorold_component_uuid:new_topic_name.Repeat this flag to rename multiple topics:
-T /camera/1:/camera/front -T /camera/2:/camera/rear
-o, --output [OUTPUT]
The path to output the resulting Plex. If omitted, MetriCal will write the Plex to stdout.