示例#1
0
def _check_vexbot_filepath(create_if_missing=True):
    filepath = get_vexdir_filepath()
    is_missing = os.path.isdir(filepath)

    if create_if_missing and is_missing:
        create_vexdir()
    elif is_missing and not create_if_missing:
        logging.error('Vexbot filepath not found! Please create')
示例#2
0
文件: shell.py 项目: wesleyz/vexbot
def _get_default_history_filepath():
    vexdir = get_vexdir_filepath()
    return path.join(vexdir, 'vexshell_history')
示例#3
0
def get_classifier_filepath(name: str = None) -> str:
    if name is None:
        name = 'classifier.vex'
    directory = get_vexdir_filepath()
    return path.join(directory, name)
示例#4
0
def get_entity_filepath(name: str = None) -> str:
    if name is None:
        name = 'entity_extractor.vex'
    directory = get_vexdir_filepath()
    return path.join(directory, name)
示例#5
0
def get_certificate_filepath():
    vexdir = get_vexdir_filepath()
    certs = path.join(vexdir, 'certificates')
    return certs