This package provides a Python library ly containing various Python modules to parse, manipulate or create documents in LilyPond format. A command line program ly is also provided that can be used to do various manipulations with LilyPond files.
The LilyPond format is a plain text input format that is used by the GNU music typesetter LilyPond (www.lilypond.org).
The python-ly package is Free Software, licensed under the GPL. This package is written by the Frescobaldi developers and is used extensively by the Frescobaldi project. The main author is Wilbert Berendsen.
With ly you can reformat, or re-indent LilyPond files, transpose music, translate pitch names, convert LilyPond to syntax-colored HTML, etc.
There is also experimental support for converting LilyPond to MusicXML.
Use:
ly -h
to get a full list of the features of the ly command.
Here is an example to re-indent and transpose a LilyPond file:
ly "indent; transpose c d" -o output.ly file.ly
To test the ly module from the current directory without installing, use:
python -m ly <args...>
This will behave like running the ly command when the package is installed.
The ly module supports both Python2 and Python3. This is a short description of some modules:
ly.slexer
: generic tools to build parsers using regular expressionsly.node
: a generic list-like node object to build tree structures withly.document
: a tokenized text document (LilyPond file)ly.lex
: a parser for LilyPond, Scheme, and other formats, using slexer
ly.music
: a tree structure of the contents of a documently.pitch
: functions for translating, transposing etcly.indent
: indent LilyPond textly.reformat
: format LilyPond textly.dom
: (deprecated) tree structure to build LilyPond text fromly.words
: words for highlighting and autocompletionly.data
: layout objects, properties, interfaces, font glyphs etc extracted
from LilyPondThe documentation is built using Sphinx and located in the doc directory.
If you have Sphinx installed, you can build nicely formatted HTML documentation
by typing make html
in the doc directory.
You can also read the docs online at http://python-ly.readthedocs.org/.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。