# Path: engine/conf.py
# PATH_TO_HTML = PATH + "/engine/data/html/"
# 
# PATH_TO_TEMPLATE_HTML = PATH_TO_TEMPLATE + 'head.html'
# 
# PATH_TO_MD = PATH + '/notes/'


import re
import os
import codecs
import pickle
import os
import sys
import argparse
import logging
        import stat
    from engine_path import path
from engine.conf import PATH_TO_HTML, PATH_TO_TEMPLATE_HTML, PATH_TO_MD
                note = ''  # reset the note variable
    if verbose:
        print('root has following headers of # type: '.ljust(40), root)
    #tb = PrettyTable(["r.name", "r.note", "r.level", "r.get_child()", "h3"])
    for r in root:
        row = [r.name, r.note[:50], r.level, r.get_child(), [x.get_child() for x in r.get_child()]]
        if verbose:
            print(row)
        # tb.add_row(row)
    # collect all h1
    all_h = []
    for r in root:
        all_h.append(r)
        for c in r.get_child():
            all_h.append(c)
            for a in c.get_child():
                all_h.append(a)
    return all_h


class Db():
    """
    """

    def __init__(self, ):
        """
        """
        self.all_headers = ''

    def collect_data(self, verbose=False):

# Path: engine/conf.py
# PATH_TO_HTML = PATH + "/engine/data/html/"
# 
# PATH_TO_TEMPLATE_HTML = PATH_TO_TEMPLATE + 'head.html'
# 
# PATH_TO_MD = PATH + '/notes/'


# Path: engine/searcher.py
import re
import os
import codecs
import pickle
import os
import sys
import argparse
import logging
        import stat
    from engine_path import path
from engine.conf import PATH_TO_HTML, PATH_TO_TEMPLATE_HTML, PATH_TO_MD

                note = ''  # reset the note variable
    if verbose:
        print('root has following headers of # type: '.ljust(40), root)
    #tb = PrettyTable(["r.name", "r.note", "r.level", "r.get_child()", "h3"])
    for r in root:
        row = [r.name, r.note[:50], r.level, r.get_child(), [x.get_child() for x in r.get_child()]]
        if verbose:
            print(row)
        # tb.add_row(row)
    # collect all h1
    all_h = []
    for r in root:
        all_h.append(r)
        for c in r.get_child():
            all_h.append(c)
            for a in c.get_child():
                all_h.append(a)
    return all_h


class Db():
    """
    """

    def __init__(self, ):
        """
        """
        self.all_headers = ''

    def collect_data(self, verbose=False):

        out = lsdir(PATH_TO_MD)