diff --git a/src/chordpro/cli.py b/src/chordpro/cli.py index f6b54fd..6b9cc2e 100644 --- a/src/chordpro/cli.py +++ b/src/chordpro/cli.py @@ -1,8 +1,8 @@ from argparse import ArgumentParser from chordpro.base import Song -from chordpro.renderers.html import render as render_html -from chordpro.renderers.text import render as render_text +from chordpro.renderers.html import render as html_render, get_options as html_get_options +from chordpro.renderers.text import render as text_render def get_args(): @@ -31,9 +31,9 @@ def main(): song = Song(args.input) if args.format == 'text': - output = render_text(song, **render_params) + output = text_render(song, **render_params) else: - output = render_html(song, **render_params) + output = html_render(song, **render_params) if args.output: with open(args.output, 'w') as html_file: html_file.write(output) diff --git a/src/chordpro/renderers/html.py b/src/chordpro/renderers/html.py index 2647fd2..873b1ce 100644 --- a/src/chordpro/renderers/html.py +++ b/src/chordpro/renderers/html.py @@ -345,7 +345,7 @@ HTML_OPTIONS = { 'group': 'chord' } } -OPTION_GROUPS = set([option['group'] for option in HTML_OPTIONS]) +OPTION_GROUPS = set([option['group'] for option in HTML_OPTIONS.values()]) def get_options(group=None):