Fix render options in CLI and when generating styles in HTML #6

Merged
raoul merged 1 commits from fix-render-options into master 2021-09-12 03:13:24 +00:00
2 changed files with 2 additions and 6 deletions

View File

@ -57,9 +57,9 @@ def main():
song = Song(args.input) song = Song(args.input)
if args.format == 'text': if args.format == 'text':
output = text_render(song, **render_params) output = text_render(song, options=render_params)
else: else:
output = html_render(song, **render_params) output = html_render(song, options=render_params)
if args.output: if args.output:
with open(args.output, 'w') as output_file: with open(args.output, 'w') as output_file:
output_file.write(output) output_file.write(output)

View File

@ -445,10 +445,6 @@ def get_option_groups():
def make_style(name, font=None, size=None, is_bold=None, is_centered=None, is_upper=None, is_hidden=False, indent=None): def make_style(name, font=None, size=None, is_bold=None, is_centered=None, is_upper=None, is_hidden=False, indent=None):
"""Build a CSS style""" """Build a CSS style"""
styles = [] styles = []
if name == 'default':
styles.append('html, body, * {')
else:
styles.append('.{name} {{'.format(name=name))
if font: if font:
styles.append(' font-family: \'{font}\';'.format(font=font)) styles.append(' font-family: \'{font}\';'.format(font=font))
if size: if size: