1- import click
1+ """
2+ Module of the command line interface to pathtraits
3+ """
4+
25import logging
3- from pathtraits import scan , access
46import os
7+ import click
8+ from pathtraits import scan , access
59
610logger = logging .getLogger (__name__ )
711
1014
1115@click .group ()
1216def main ():
13- pass
17+ """
18+ Main commands
19+ """
1420
1521
1622@main .command (help = "Update database once, searches for all directories recursively." )
@@ -22,6 +28,13 @@ def main():
2228)
2329@click .option ("-v" , "--verbose" , flag_value = True , default = False )
2430def batch (path , db_path , verbose ):
31+ """
32+ Update database once, searches for all directories recursively.
33+
34+ :param path: path to scan in batch mode recursively
35+ :param db_path: path to the database
36+ :param verbose: enable verbose logging
37+ """
2538 scan .batch (path , db_path , verbose )
2639
2740
@@ -34,6 +47,13 @@ def batch(path, db_path, verbose):
3447)
3548@click .option ("-v" , "--verbose" , flag_value = True , default = False )
3649def watch (path , db_path , verbose ):
50+ """
51+ Update database continiously, watches for new or changed files.
52+
53+ :param path: path to watch recursively
54+ :param db_path: path to the database
55+ :param verbose: enable verbose logging
56+ """
3757 scan .watch (path , db_path , verbose )
3858
3959
@@ -46,6 +66,13 @@ def watch(path, db_path, verbose):
4666)
4767@click .option ("-v" , "--verbose" , flag_value = True , default = False )
4868def get (path , db_path , verbose ):
69+ """
70+ Get traits of a given path
71+
72+ :param path: path to get traits for
73+ :param db_path: path to the database
74+ :param verbose: enable verbose logging
75+ """
4976 access .get (path , db_path , verbose )
5077
5178
0 commit comments