|
|
@ -2,14 +2,15 @@ |
|
|
|
"""dirbuild |
|
|
|
|
|
|
|
Usage: |
|
|
|
dirbuild |
|
|
|
dirbuild set <command> |
|
|
|
dirbuild get |
|
|
|
dirbuild build |
|
|
|
dirbuild dump |
|
|
|
dirbuild [-v] |
|
|
|
dirbuild [-v] set <command> |
|
|
|
dirbuild [-v] get |
|
|
|
dirbuild [-v] build |
|
|
|
dirbuild [-v] dump |
|
|
|
|
|
|
|
Options: |
|
|
|
-h --help Show this screen. |
|
|
|
-v --verbose Show verbose information. |
|
|
|
--version Show version. |
|
|
|
|
|
|
|
""" |
|
|
@ -36,7 +37,7 @@ def init_logger(): |
|
|
|
formatter = logging.Formatter("%(asctime)s %(name)-12s %(levelname)-8s %(message)s") |
|
|
|
handler.setFormatter(formatter) |
|
|
|
logger.addHandler(handler) |
|
|
|
logger.setLevel(logging.DEBUG) |
|
|
|
logger.setLevel(logging.ERROR) |
|
|
|
|
|
|
|
|
|
|
|
def init_db() -> sqlite3.Connection: |
|
|
@ -87,6 +88,8 @@ def main(): |
|
|
|
""" Main function """ |
|
|
|
init_logger() |
|
|
|
arguments = docopt(__doc__, version="dirbuild v0.1.0") |
|
|
|
if arguments["--verbose"]: |
|
|
|
logger.setLevel(logging.DEBUG) |
|
|
|
logger.debug("arguments: %s", arguments) |
|
|
|
db = init_db() |
|
|
|
if arguments["set"]: |
|
|
|