.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "LY" "1" "Jun 13, 2022" "0.9.7" "python-ly" .SH NAME ly \- Manipulate LilyPond source files .sp Usage: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ly [options] commands file, ... .ft P .fi .UNINDENT .UNINDENT .sp A tool for manipulating LilyPond source files .SH OPTIONS .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \-v\fP,\fB \-\-version show version number and exit .TP .B \-h\fP,\fB \-\-help show this help text and exit .TP .B \-i\fP,\fB \-\-in\-place overwrite input files .TP .BI \-o\fP,\fB \-\-output \ NAME output file name .TP .BI \-e\fP,\fB \-\-encoding \ ENC (input) encoding (default UTF\-8) .TP .BI \-\-output\-encoding \ ENC output encoding (default to input encoding) .TP .BI \-l\fP,\fB \-\-language \ NAME default pitch name language (default to “nederlands”) .TP .BI \-d \ set a variable .UNINDENT .UNINDENT .UNINDENT .sp The special option \fB\-\-\fP considers the remaining arguments to be file names. .SH ARGUMENTS .sp The command is one argument with semicolon\-separated commands. In most cases you’ll quote the command so that it is seen as one argument. .sp You can specify more than one LilyPond file. If you want to process many files and write the results of the operations on each file to a separate output file, you can use two special characters in the output filename: a ‘*’ will be replaced with the full path name of the current input file (without extension), and a ‘?’ will be replaced with the input filename (without path and extension). If you don’t want to have ‘*’ or ‘?’ replaced in the output filename, you can set \fB\-d replace\-pattern=false\fP\&. .sp If you don’t specify input or output filenames, standard input is read and standard output is written to. .SH COMMANDS .sp Informative commands that write information to standard output and do not change the file: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \fBmode\fP print the mode (guessing if not given) of the document .TP .B \fBversion\fP print the LilyPond version, if set in the document .TP .B \fBlanguage\fP print the pitch name language, if set in the document .UNINDENT .UNINDENT .UNINDENT .sp Commands that change the file: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \fBindent\fP re\-indent the file .TP .B \fBreformat\fP reformat the file .TP .B \fBtranslate \fP translate the pitch names to the language .TP .B \fBtranspose \fP transpose the file like LilyPond would do, pitches are given in the ‘nederlands’ language .TP .B \fBabs2rel\fP convert absolute music to relative .TP .B \fBrel2abs\fP convert relative music to absolute .TP .B \fBsimplify\-accidentals\fP replace notes with accidentals as much as possible with their natural neighbors .TP .B \fBwrite [filename]\fP write the file to the given filename or the output variable. If the last command was an editing command, write is automatically called. .UNINDENT .UNINDENT .UNINDENT .sp Commands that export the file to another format: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \fBmusicxml [filename]\fP export to MusicXML (in development, far from complete) .TP .B \fBhighlight [filename]\fP export the document as syntax colored HTML .TP .B \fBhl [filename]\fP alias for highlight .UNINDENT .UNINDENT .UNINDENT .sp Between commands, you can set or unset a variable using: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \fBvariable=value\fP set a variable to value. Special values are true, false, which are interpreted as boolean values, or digits, which will be interpreted as integer values. .TP .B \fBvariable=\fP unset a variable .UNINDENT .UNINDENT .UNINDENT .SH VARIABLES .sp The following variables can be set to influence the behaviour of commands. If there is a default value, it is written between brackets: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \fBmode\fP mode of the file to read (default automatic) can be one of: lilypond, scheme, latex, html, docbook, texinfo. .TP .B \fBoutput\fP [\-] the output filename (also set by \-o argument) .TP .B \fBencoding\fP [UTF\-8] encoding to read (also set by \-e argument) .TP .B \fBdefault\-language\fP [nederlands] the pitch names language to use by default, when not specified otherwise in the document .TP .B \fBoutput\-encoding\fP encoding to write (defaults to \fBencoding\fP, also set by the \fB\-\-output\-encoding\fP argument) .TP .B \fBin\-place\fP [\fBfalse\fP] whether to overwrite input files (same as \fB\-i\fP) .TP .B \fBbackup\-suffix\fP [~] suffix to use when editing files in\-place, if set, backs up the original file before overwriting it .TP .B \fBreplace\-pattern\fP [\fBtrue\fP] whether to replace ‘*’ and ‘?’ in the output filename. .TP .B \fBrel\-startpitch\fP [\fBtrue\fP] whether to write relative music with a startpitch .TP .B \fBrel\-absolute\fP whether to assume that the first pitch in a relative expression without specified startpitch is absolute. If \fBfalse\fP, it is assumed to be relative to \fBc\(aq\fP\&. If \fBtrue\fP, it is assumed to be absolute (in fact relative to \fBf\fP\&. If not set, this variable defaults to \fBtrue\fP only when the LilyPond version in the document >= 2.18. .TP .B \fBindent\-tabs\fP [\fBfalse\fP] whether to use tabs for indent .TP .B \fBindent\-width\fP [2] how many spaces for each indent level (if not using tabs) .TP .B \fBfull\-html\fP [\fBTrue\fP] if set to True a full document with syntax\-highlighted HTML will be exported, otherwise only the bare content wrapped in an element configured by the \fBwrapper\-\fP variables. .TP .B \fBstylesheet\fP filename to reference as an external stylesheet for syntax\-highlighted HTML. This filename is literally used in the \fB\fP tag. .TP .B \fBinline\-style\fP [\fBfalse\fP] whether to use inline style attributes for syntax\-highlighted HTML. By default a css stylesheet is embedded. .TP .B \fBnumber\-lines\fP [\fBfalse\fP] whether to add line numbers when creating syntax\-highlighted HTML. .TP .B \fBwrapper\-tag\fP [\fBpre\fP] which tag syntax highlighted HTML will be wrapped in. Possible values: \fBdiv\fP, \fBpre\fP, \fBid\fP and \fBcode\fP .TP .B \fBwrapper\-attribute\fP [\fBclass\fP] attribute used for the wrapper tag. Possible values: \fBid\fP and \fBclass\fP\&. .TP .B \fBdocument\-id\fP [\fBlilypond\fP] name applied to the wrapper\-attribute. If the three last options use their default settings the highlighted HTML elements are wrapped in an element \fB
\fP
.TP
.B \fBlinenumbers\-id\fP [\fBlinenumbers\fP]
if linenumbers are exported this is the name used for the \fB\fP elements
.UNINDENT
.UNINDENT
.UNINDENT
.sp
These variables influence the output of information commands:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.TP
.B \fBwith\-filename\fP
prints the filename next to information like version,
etc. This is \fBtrue\fP by default if there is more than one
file specified.
.UNINDENT
.UNINDENT
.UNINDENT
.SH EXAMPLES
.sp
Here is an example to re\-indent and transpose a LilyPond file:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ly "indent; transpose c d" \-o output.ly file.ly
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Examples using the ‘*’ in the output file name:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ly "transpose c d" *.ly \-o \(aq*\-transposed.ly\(aq
ly highlight *.ly \-o \(aqhtml/?.html\(aq
.ft P
.fi
.UNINDENT
.UNINDENT
.SH AUTHOR
Wilbert Berendsen
.SH COPYRIGHT
2022, Wilbert Berendsen
.\" Generated by docutils manpage writer.
.