Module Assign NameStore Str ImportFrom alias Import alias Import alias Import alias Import alias Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore Num If CompareEq NameLoad Num body Import alias If CompareEq NameLoad Num body Import alias Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Str If NameLoad body Print Str Print BinOpAdd Str Call NameLoad NameLoad Print BinOpAdd Str Call NameLoad BinOpBitAnd Call AttributeLoad NameLoad attr NameLoad Num Print Str Return Call NameLoad BinOpBitAnd Call AttributeLoad NameLoad attr NameLoad Num decorator_list Assign NameStore NameLoad Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return BinOpAdd BinOpAdd Call AttributeLoad Call NameLoad BinOpAdd BinOpAdd Call NameLoad NameLoad Str NameLoad attr Str Str Str Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad Num body Return NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Num NameLoad Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num NameLoad Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd Call NameLoad BinOpSub NameLoad Num Str Call AttributeLoad NameLoad attr Str Str Str Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Print Str Print Str Print BinOpAdd Str NameLoad Print BinOpAdd Str NameLoad Print BinOpAdd Str NameLoad decorator_list FunctionDef arguments args defaults body Global identifier Global identifier For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body For NameStore NameLoad body Assign NameStore BinOpSub Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad attr Str NameLoad If NameLoad body Print BinOpAdd Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad AugAssignAdd NameStore Num For NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad body If CompareIn NameLoad NameLoad body Continue Assign NameStore BinOpSub Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad attr Str NameLoad If NameLoad body Print BinOpAdd Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad AugAssignAdd NameStore Num decorator_list If CompareEq NameLoad Num body Expr Call NameLoad If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Str Str Print BinOpAdd Str Call NameLoad Call AttributeLoad NameLoad attr keyword Num If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Str Print BinOpAdd Str Call NameLoad NameLoad Print BinOpAdd Str Call NameLoad NameLoad If NameLoad body For NameStore NameLoad body Print NameLoad orelse Print Str Print Str If NameLoad body For NameStore NameLoad body Print NameLoad orelse Print Str Print BinOpAdd Str Call NameLoad Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr
N/A N/A __author__ holger treelib tree N/A fnmatch N/A os N/A zlib N/A argparse N/A DEBUG 0 N/A FILECOUNT 0 N/A DIRCOUNT 0 N/A DIR_ERRORLIST N/A N/A FILE_ERRORLIST N/A N/A PROFILING 0 N/A N/A PROFILING 1 N/A N/A timeit N/A N/A PROFILING 2 N/A N/A cProfile N/A parser N/A N/A argparse ArgumentParser description Scan the given folder and print its structure in a tree. N/A N/A N/A parser add_argument abspath type str help An absolute path to be scanned. N/A N/A N/A parser add_argument pattern type str help File name pattern to filtered, e.g. *.pdf N/A args N/A N/A parser parse_args N/A rootPath N/A args abspath N/A pattern N/A args pattern N/A folder_blacklist N/A N/A dir_tree N/A N/A tree Tree N/A N/A N/A dir_tree create_node Root rootPath crc32 N/A N/A data N/A N/A N/A data N/A bytes data UTF-8 N/A DEBUG N/A N/A ++++++ CRC32 ++++++ N/A N/A input:  N/A str data N/A N/A crc32:  N/A hex N/A N/A N/A zlib crc32 data 4294967295 N/A +++++++++++++++++++ N/A N/A hex N/A N/A N/A zlib crc32 data 4294967295 N/A N/A parent rootPath N/A i 1 N/A start_depth N/A N/A rootPath count / get_noteid N/A N/A depth root dir N/A N/A N/A  get_noteid returns
        - depth contains the current depth of the folder hierarchy
        - dir contains the current directory

        Function returns a string containing the current depth, the folder name and unique ID build by hashing the
        absolute path of the directory. All spaces are replaced by '_'

        <depth>_<dirname>+++<crc32>
        e.g. 2_Folder_XYZ_1+++<crc32>
     N/A N/A N/A N/A N/A N/A str N/A N/A N/A str depth _ dir replace _ +++ N/A crc32 N/A N/A N/A os path join root dir N/A get_parentid N/A N/A current_depth root dir N/A N/A N/A N/A current_depth 0 N/A N/A root N/A search_string N/A N/A N/A os path join root dir N/A pos2 N/A N/A search_string rfind / N/A pos1 N/A N/A search_string rfind / 0 pos2 N/A parent_dir N/A search_string N/A N/A pos1 1 pos2 N/A parentid N/A N/A N/A N/A N/A str N/A current_depth 1 _ N/A N/A parent_dir replace _ +++ N/A crc32 root N/A parentid N/A print_node N/A N/A dir node_id parent_id N/A N/A N/A ############################# N/A node created N/A N/A       dir:      dir N/A N/A       note_id:  node_id N/A N/A       parent:   parent_id N/A crawler N/A N/A N/A N/A N/A DIRCOUNT N/A FILECOUNT N/A N/A root dirs files N/A N/A os walk rootPath N/A N/A dir dirs N/A N/A current_depth N/A N/A N/A N/A N/A N/A os path join root dir count / start_depth N/A DEBUG N/A N/A N/A current:  N/A N/A N/A os path join root dir N/A node_id N/A get_noteid current_depth root dir N/A parent_id N/A str N/A get_parentid current_depth root dir N/A N/A parent_id N/A str None N/A N/A N/A N/A DIR_ERRORLIST append N/A N/A N/A os path join root dir N/A DEBUG N/A N/A N/A print_node dir node_id parent_id N/A N/A N/A dir_tree create_node dir node_id parent_id N/A DIRCOUNT 1 N/A filename N/A N/A fnmatch filter files pattern N/A N/A N/A dir folder_blacklist N/A N/A N/A current_depth N/A N/A N/A N/A N/A N/A os path join root filename count / start_depth N/A DEBUG N/A N/A N/A current:  N/A N/A N/A os path join root filename N/A node_id N/A get_noteid current_depth root filename N/A parent_id N/A str N/A get_parentid current_depth root filename N/A N/A parent_id N/A str None N/A N/A N/A N/A FILE_ERRORLIST append N/A N/A N/A os path join root dir N/A DEBUG N/A N/A N/A print_node filename node_id parent_id N/A N/A N/A dir_tree create_node filename node_id parent_id N/A FILECOUNT 1 N/A N/A N/A PROFILING 0 N/A N/A N/A crawler N/A N/A PROFILING 1 N/A N/A t1 N/A N/A timeit Timer crawler() from __main__ import crawler N/A N/A time:       N/A str N/A N/A t1 timeit number 1 N/A N/A PROFILING 2 N/A N/A N/A N/A cProfile run crawler() N/A N/A filecount:  N/A str FILECOUNT N/A N/A dircount:   N/A str DIRCOUNT N/A DIR_ERRORLIST N/A N/A item DIR_ERRORLIST N/A N/A item N/A N/A no directory errors N/A N/A FILE_ERRORLIST N/A N/A item FILE_ERRORLIST N/A N/A item N/A N/A no file errors N/A N/A nodes:  N/A str N/A len N/A dir_tree nodes N/A N/A N/A dir_tree show