Next: , Up: Converting from other formats



10.1 Invoking convert-ly

The syntax is regularly changed to simplify it or improve it in different ways. A side effect of this, is that LilyPond often is not compatible with older files. To remedy this, the program convert-ly can be used to deal with most of the syntax changes.

It uses \version statements in the file to detect the old version number. For example, to upgrade all LilyPond files in the current directory and its subdirectories, enter the following on the command line.

convert-ly -e `find . -name '*.ly' -print`

In general, the program is invoked as follows:

convert-ly [option]... file...

The following options can be given:

-e,--edit
Do an inline edit of the input file. Overrides --output.
-f,--from=from-patchlevel
Set the level to convert from. If this is not set, convert-ly will guess this, on the basis of \version strings in the file.
-o,--output=file
Set the output file to write.
-n,--no-version
Normally, convert-ly adds a \version indicator to the output. Specifying this option suppresses this.
-s, --show-rules
Show all known conversions and exit.
--to=to-patchlevel
Set the goal version of the conversion. It defaults to the latest available version.
-h, --help
Print usage help.

convert-ly always converts up to the last syntax change handled by it. This means that the \version number left in the file is usually lower than the version of convert-ly itself.

Bugs

Not all language changes are handled. Only one output option can be specified.

This page is for LilyPond-2.4.5 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.

Other languages: English.
Using automatic language selection.