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