| [ << LilyPond Wiki work ] | [Top][Contents] | [ Issues >> ] |
| [ < Snippet administration ] | [ Up: LilyPond Wiki work ] | [ LilyPond Wiki to Git > ] |
7.4 The makelsr.pl script
As you might have guessed already, makelsr.pl is a
Perl script. Obviously, you need Perl to
execute it, which you should now install in case it isn’t already
available on your system.
There is a dependency on the pandoc program. The script uses it to convert Wiki
pages, which are formatted with
MediaWiki
Syntax, to the Texinfo format. This program must be installed,
too.
Furthermore, makelsr.pl needs a few additional modules
that are not Perl core modules:
- File::Which
- IPC::Run3
- Pandoc
- Parallel::ForkManager
Either install missing modules with your package manager (if
available) or use the cpanm command.10
A typical call might me
cpanm --sudo Parallel::ForkManager
to download, compile, and install module ‘Parallel::ForkManager’.11
The --sudo option makes the modules install into a system
directory, for example /usr/lib/perl5/site_perl/...
– you need the superuser password for this. If you don’t want to
do that for whatever reason, just omit --sudo and follow
the instructions shown in cpanm’s error message to
install Perl modules locally (i.e., without sudo
rights).
Finally, it needs to find the convert-ly script from the
current LilyPond development build.
By default, executing makelsr.pl performs the following
actions.
- Download documentation snippets from the LilyPond Wiki.
- Delete all snippet and snippet list files in directory Documentation/snippets/ (but not in Documentation/snippets/new/).
- Convert the snippets’ documentation parts from MediaWiki syntax to
Texinfo with the
pandocprogram, run the scriptconvert-lyto update their LilyPond code parts to current syntax, and store them in Documentation/snippets/. - Create snippet list files (with extension .snippet-list) that group snippets by Wiki categories. These files are used to structure LilyPond’s ‘Snippets’ manual.
- Convert all snippet files in
Documentation/snippets/new/ with
convert-lyand output them to Documentation/snippets/, possibly overwriting existing files.
This flow of actions can be adjusted; say ‘scripts/auxiliar/makelsr.pl --help’ to get a detailed description of the provided command-line options and used environment variables.
Footnotes
(10)
Most Perl distributions have this command included; if not, try to install a package named ‘cpanminus’ or having ‘cpanminus’ in its name.
(11)
Note that the program
cpanm might be called differently; it sometimes has the
Perl version appended to its name, for example
cpanm-5.34.
| [ << LilyPond Wiki work ] | [Top][Contents] | [ Issues >> ] |
| [ < Snippet administration ] | [ Up: LilyPond Wiki work ] | [ LilyPond Wiki to Git > ] |