diff --git a/ly/cli/command.py b/ly/cli/command.py index 3fb0ba49..075b77ef 100644 --- a/ly/cli/command.py +++ b/ly/cli/command.py @@ -225,11 +225,16 @@ def run(self, opts, cursor, output): import ly.colorize w = ly.colorize.HtmlWriter() + w.full_html = opts.full_html w.inline_style = opts.inline_style w.stylesheet_ref = opts.stylesheet w.number_lines = opts.number_lines w.title = cursor.document.filename w.encoding = opts.output_encoding or "utf-8" + w.wrapper_tag = opts.wrapper_tag + w.wrapper_attribute = opts.wrapper_attribute + w.document_id = opts.document_id + w.linenumbers_id = opts.linenumbers_id doc = w.html(cursor) if self.output: diff --git a/ly/cli/doc.py b/ly/cli/doc.py index e63af30a..2fa52af2 100644 --- a/ly/cli/doc.py +++ b/ly/cli/doc.py @@ -163,6 +163,11 @@ ``indent-width`` [2] how many spaces for each indent level (if not using tabs) + ``full-html`` [``True``] + if set to True a full document with syntax-highlighted HTML + will be exported, otherwise only the bare content wrapped in an + element configured by the ``wrapper-`` variables. + ``stylesheet`` filename to reference as an external stylesheet for syntax-highlighted HTML. This filename is literally used @@ -175,6 +180,22 @@ ``number-lines`` [``false``] whether to add line numbers when creating syntax-highlighted HTML. + ``wrapper-tag`` [``pre``] + which tag syntax highlighted HTML will be wrapped in. Possible values: + ``div``, ``pre``, ``id`` and ``code`` + + ``wrapper-attribute`` [``class``] + attribute used for the wrapper tag. Possible values: ``id`` and ``class``. + + ``document-id`` [``lilypond``] + name applied to the wrapper-attribute. + If the three last options use their default settings + the highlighted HTML elements are wrapped in an element + ``
`` + + ``linenumbers-id`` [``linenumbers``] + if linenumbers are exported this is the name used for the ``