From 88246469397ea4533ec697643f1ecad1224ac081 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Sun, 13 Dec 2020 16:50:11 +0000 Subject: tools: themer: Fix the online help Correct the indentation and the quoting of the theme strings. Signed-off-by: Daniel Thompson diff --git a/tools/themer.py b/tools/themer.py index f0f1f35..622142f 100755 --- a/tools/themer.py +++ b/tools/themer.py @@ -43,32 +43,40 @@ class DefaultTheme(): if __name__ == '__main__': parser = ArgumentParser( description='''Compiles themes into a format understood by wasp-os. - The resulting string should be put in main.py like this: - - theme_string = THEME_STRING_GOES_HERE - - for the theme to take effect. - ''', - epilog=''' To create a theme, - import this file and extend the DefaultTheme class, only changing the variables. - Export the resulting class as 'Theme'. - Example: - -------- - theme.py: - from themer import DefaultTheme - - class Theme(DefaultTheme): - BLE_ICON_COLOR = 0x041F - - shell: - $ ./themer.py theme # NOTE: do not include .py at end of file! - > b'\xef{\xef{\xef{<\xe7\xef{\xb6\xb5\xb6\xbd\xff\xff\xff9' - - main.py: - ... - wasp.system.set_theme(b'\xef{\xef{\xef{<\xe7\xef{\xb6\xb5\xb6\xbd\xff\xff\xff9') - ... - ''', + +For the theme to take effect, the resulting string should be put in main.py +like this: + + theme_string = THEME_STRING_GOES_HERE +''', + epilog=''' To create a theme, import this file and extend the +DefaultTheme class, only changing the variables. + +Export the resulting class as 'Theme'. + +Example: +-------- + +theme.py: + + from themer import DefaultTheme + + class Theme(DefaultTheme): + BLE_ICON_COLOR = 0x041F + +shell: + + # NOTE: do not include .py at end of file! + $ ./themer.py theme + > b'\\xef{\\xef{\\xef{<\\xe7\\xef{\\xb6\\xb5\\xb6\\xbd\\xff\\xff\\xff9' + +main.py: + + ... + wasp.system.set_theme( + b'\\xef{\\xef{\\xef{<\\xe7\\xef{\\xb6\\xb5\\xb6\\xbd\\xff\\xff\\xff9') + ... +''', formatter_class=RawTextHelpFormatter ) -- cgit v0.10.2