Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

An API documentation generator for Lilypond files

Project Description
Lydoc - A Lilypond API documentation generator

.. image::
:alt: PyPI Package
.. image::
:alt: Documentation Status
.. image::
:alt: Continuous Integration

The marker below is used to tell Sphinx where to start
to include the README file into the main documentation

.. inclusion-marker

Lydoc is a software that looks for documentation comments in `GNU
Lilypond`_ source files, and outputs API documentation in a variety of



Lydoc works with both Python 2 (version 2.7 is supported) and Python 3
(versions 3.3, 3.4, and 3.5). You can install it in several ways.

From source

Clone the repository somewhere on your machine. To install, run from
the root directory of the project::

python install

which will install the ``lydoc`` executable, while fetching all the
necessary dependencies in the process. To upgrade, just pull the
latest changes and run the above command again.

From PyPI

Lydoc is also available on the Python Package Index. You can install
it with this single command::

pip install --user lydoc

I recommend running the above command with the ``--user`` option so
not to mess with system packages. If you omit the ``--user`` argument,
you might require administration privileges, depending on you
machine's configuration.

To upgrade, it is sufficient to run the following command::

pip install --user --upgrade lydoc

Very quick start

Just run the following command::

lydoc -o api.rst

to collect documentation from ```` and write a ``api.rst`` text
file formatted with `reStructuredText`_.

Quick start

Lydoc will look for documentation comments in the given file or
directory. In the latter case, it will parse all ``.ly`` and ``.ily``
files, recursively. A documentation comment looks like a standard
Lilypond block comment, with a slightly different opening::

% I am a documentation comment :-)
someFunction =
#(define-music-function ...)

Note the ``!`` character after the opening of the comment: that's the
character that Lydoc uses to distinguish between normal block comments
and documentation ones.

So, to extract the documentation from a single file, the command line
is the following::


This will output some logging information to standard error, and the
collected documentation on standard output, as a stream of JSON
objects, one per line. This is useful to pipe the output of Lydoc to
some other program, in a machine-friendly format.

However, we are humans, not machines, hence we might want to generate
something more readable, like a file in some lightweight markup
language. You have some options:

Arguably the most widespread lightweight markup language::

lydoc -o

The markup language used by the powerful `Sphinx`_
documentation generator::

lydoc -o api.rst

To generate API documentation for a single lilypond file in
`reStructuredText`_ format::

lydoc -o api.rst

or in `Markdown`_::

lydoc -o

For more detailed usage instructions, head to the :doc:`/user-manual`

.. _`GNU Lilypond`:
.. _reStructuredText:
.. _Markdown:
.. _Sphinx:
Release History

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
lydoc-0.1.1.dev1.tar.gz (22.8 kB) Copy SHA256 Checksum SHA256 Source Apr 30, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting