diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-12-13 16:50:11 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-12-13 16:51:07 (GMT) |
| commit | 88246469397ea4533ec697643f1ecad1224ac081 (patch) | |
| tree | d15e0e085d9890f858040c14fb02a0b8b5b1e4aa /tools | |
| parent | 4468285c343d7f4044748c6232f3e7510def9dce (diff) | |
tools: themer: Fix the online help
Correct the indentation and the quoting of the theme strings.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/themer.py | 60 |
1 files changed, 34 insertions, 26 deletions
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 ) |
