[ << LSR work ] | [Top][Contents] | [ Issues >> ] |
[ < Approving snippets ] | [ Up : LSR work ] | [ LSR 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, which the script uses to convert LSR’s snippet documentation strings (which are formatted in HTML) to Texinfo. This must be installed, too.
Furthermore, makelsr.pl
needs a few additional modules
that are not Perl core modules (tested with Perl version 5.36):
- File::Which
- IPC::Run3
- MySQL::Dump::Parser::XS
- Pandoc
- Parallel::ForkManager
Either install missing modules with your package manager (if
available) or use the cpanm
command.5
A typical call might me
cpanm --sudo Parallel::ForkManager
to download, compile, and install module ‘Parallel::ForkManager’.6
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 a current MySQL dump of the LSR database (the dump is regenerated once a day).
- Delete all snippet and snippet list files in directory Documentation/snippets/ (but not in Documentation/snippets/new/).
- Extract all snippets from the LSR database that have the ‘docs’
tag set, convert their documentation parts from HTML to Texinfo
with the
pandoc
program, run the scriptconvert-ly
to update their LilyPond code parts to current syntax, and store them in Documentation/snippets/. - Create snippet list files named winds.snippet-list or connecting-notes.snippet-list that list the snippets grouped by tags assigned in the database. These files are used to structure LilyPond’s ‘snippets’ documentation.
- Convert all snippet files in
Documentation/snippets/new/ with
convert-ly
and 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
(5)
Most Perl distributions have this command included; if not, try to install a package named ‘cpanminus’ or having ‘cpanminus’ in its name.
(6)
Note that the program
cpanm
might be called differently; it sometimes has the
Perl version appended to its name, for example
cpanm-5.34
.
The --sudo option makes the modules install into a system
directory, for example /usr/lib/perl5/site_perl/...
– you need the supernotation 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).
As of this writing (August 2022) there is a small buglet in a test
of the ‘Pandoc’ module that makes it necessary to add option
--notest for installing this module in case you have to
use cpanm
.
[ << LSR work ] | [Top][Contents] | [ Issues >> ] |
[ < Approving snippets ] | [ Up : LSR work ] | [ LSR to Git > ] |