The commandline interface of the ‘ly’ command.
The commands that are available to the command line.
Bases: ly.cli.command._edit_command
convert absolute music to relative
Bases: ly.cli.command._export_command
write syntax colored HTML.
Bases: ly.cli.command.indent
reformat the document
Bases: ly.cli.command._edit_command
convert relative music to absolute
Bases: ly.cli.command._command
set a variable to a value
Bases: ly.cli.command._edit_command
replace notes with accidentals as much as possible with their natural neighbors
Bases: ly.cli.command._edit_command
translate pitch names
The entry point for the ‘ly’ command.
Bases: object
Object living for a whole file/command operation, handling the output.
When opening a file it has already opened earlier, the file is appended to (like awk).
Return a context manager for writing to.
If you set encoding to “binary” or False, the file is opened in binary mode and you should encode the data you write yourself.
Queries the output attribute from the Options and returns it.
If replace_pattern is True (by default) and the attribute contains a ‘*’, it is replaced with the full path of the specified filename, but without extension. It the attribute contains a ‘?’, it is replaced with the filename without path and extension.
If ‘-‘ is returned, it denotes standard output.
Parse the command string, returning a list of command.command instances.
Exits when a command is invalid.
Return a three-tuple(options, commands, files).
options is an Options instance with all the command-line options commands is a list of command.command instances files is the list of filename arguments
Also performs error handling and may exit on certain circumstances.