[ << Updating files with convert-ly ] | [Top][Contents][Index] | [ Running lilypond-book >> ] |
[ < Why does the syntax change? ] | [ Up : Updating files with convert-ly ] | [ Invoking convert-ly > ] |
2.2 Command-line preliminaries
This and the following sections only cover the command-line usage
of convert-ly
. GUI applications like Frescobaldi have
their own interfaces to convert-ly
.
By ‘command line’, we mean the command line in the operating system. Windows users might be more familiar with the terms ‘DOS shell’ or ‘command shell’. macOS users might be more familiar with the terms ‘terminal’ or ‘console’.
Describing how to use this part of an operating system is outside the scope of this manual; please consult other documentation on this topic if you are unfamiliar with the command line.
See The PATH
environment variable how to set up the operating
system so that convert-ly
can be used on the command
line without specifying a path.
Additional setup for Windows
[Non-Windows users can skip this section; Windows users who have a Python interpreter already installed (version 3.8 or higher) can skip this section, too.]
convert-ly
is actually a Python script called
convert-ly.py. In the LilyPond binary bundle for Windows
it is located in the same directory as the lilypond.exe
binary and a Python interpreter, python.exe. Assuming that
you have unpacked version 2.25.21 within a directory
C:\Users\me and PATH
is correctly set up, it would be
still necessary to say
python C:\Users\me\lilypond-2.25.21\bin\convert-ly.py myfile.ly
which is tedious to type.
Three steps are necessary to allow the omission of both the interpreter (python.exe) and the .py extension.2
- On the command line, say
assoc .py=PythonScript
to associate the extension .py with the file type ‘PythonScript’.
- As the next command, say
ftype PythonScript=C:\Users\me\lilypond-2.25.21\bin\python.exe %1 %*
to make files of type ‘PythonScript’ be handled by LilyPond’s
python.exe
. You have to adjust the path to the actual location, and don’t omit the trailing ‘%1 %*’! - Modify the
PATHEXT
environment variable and add .py to already present entries. Do this in exactly the same way as you have already done withPATH
.
Now close the command line and open it again, then test whether
convert-ly --version
works.
Footnotes
(2)
Note that steps 1 and 2 must be done using the default command prompt, cmd.exe, and not using PowerShell!
[ << Updating files with convert-ly ] | [Top][Contents][Index] | [ Running lilypond-book >> ] |
[ < Why does the syntax change? ] | [ Up : Updating files with convert-ly ] | [ Invoking convert-ly > ] |