

def add_metadata(meta, filename, j, num_ext):
    meta_path = ((app.config['SERVICES_FOLDER'] + filename.rsplit('.', num_ext)[0]) + str(j))
    if (not path.exists((meta_path + '/html'))):
        mkdir((meta_path + '/html'))
    with open(((meta_path + '/') + app.config['SERVICE_DICT'][metadata]), 'w') as f:
        f.write(meta)

dataset/ETHPy150Open cglewis/wharf/wharf/forms.py add_metadata/original