Fix some syntax and pull in html options
This commit is contained in:
parent
2f7e5a222f
commit
f9c2cc345e
@ -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)
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user