
implemented most of the command line parser expanded ANSI color palette added over.text.char_in_str over.text.Output removes colors if the output stream is not a tty minor fixes and improvements
34 lines
856 B
Python
34 lines
856 B
Python
#! /usr/bin/env python3
|
|
# encoding: utf-8
|
|
|
|
# --------------------------------------------------
|
|
# Library imports
|
|
import over
|
|
prefix = over.text.prefix
|
|
|
|
# --------------------------------------------------
|
|
# Local imports
|
|
import version
|
|
|
|
# --------------------------------------------------
|
|
# Exceptions
|
|
|
|
class ConfigurationError(Exception):
|
|
pass
|
|
|
|
# --------------------------------------------------
|
|
# Functions
|
|
|
|
# --------------------------------------------------
|
|
# Classes
|
|
|
|
# --------------------------------------------------
|
|
|
|
if __name__ == "__main__":
|
|
main = over.app.Main("short-name", "Human Readable Name", version.str, "LICENSE", use_cfg_file=False)
|
|
main.add_option("option", "type", "default", "Description.", short_name="s")
|
|
main.add_help("Description", ["What it does.", "Another paragraph."])
|
|
main.enable_help("h")
|
|
main.parse()
|
|
|
|
...
|