def theme_cmdline():
    if len(sys.argv) < 2 or sys.argv[1] in ('-h', '--help'):
        theme_cmdline_usage()
    elif len(sys.argv) > 1:
        if sys.argv[1] in ('-e', '--export'):
            if len(sys.argv) < 4:
                theme_cmdline_usage()
            whitebg = 'white' in sys.argv[4:]
            htheme = HtmlTheme(sys.argv[2])
            htheme.save_html(sys.argv[3], whitebg)
        elif sys.argv[1] in ('-i', '--info'):
            if len(sys.argv) < 3:
                theme_cmdline_usage()
            theme = Theme(sys.argv[2])
            theme.info('Info about theme "%s":' % sys.argv[2])
        else:
            theme_cmdline_usage()