The format command rewrites or prints .pta source in canonical Partitura style.

Syntax

partitura format <input.pta>
partitura format <input.pta> -o <output.pta>
partitura format <input.pta> --check

Arguments

Argument Required Description
<input.pta> Yes Input .pta source file

Flags

Flag Description
-o <path> Write formatted output to file instead of stdout
--check Check if file is already formatted; exit non-zero if not
--diff Show a diff of changes without modifying the file

Examples

# Print formatted output to stdout
partitura format score.pta

# Rewrite file in place
partitura format score.pta -o score.pta

# Check if file is already formatted
partitura format score.pta --check

Requirements

Formatting Rules

Canonical formatting uses:

See Formatting for the complete reference.

Exit Codes

Code Meaning
0 Success (or already formatted with --check)
1 Formatting error
2 Usage error

See Also