def description_meta(missing_files, counter, url, meta_path):
    description = ""
    if "description" in missing_files:
        try:
            description = request.json['description'+str(counter)]
        except:
            pass
        # if url is docker index
        if not "." in url or not "git" in url:
            if description == "":
                description = request.json['indexDesc']
            if not path.exists(meta_path):
                mkdir(meta_path)
            with open(meta_path+"/"+app.config['SERVICE_DICT']['description'], 'w') as f:
                f.write(description)
        elif url.rsplit('.', 1)[1] == "git":
            with open(meta_path+"/"+app.config['SERVICE_DICT']['description'], 'w') as f:
                f.write(description)
    else:
        # if url is docker index
        if not "." in url or not "git" in url:
            if description == "":
                description = request.json['indexDesc']
            if not path.exists(meta_path):
                mkdir(meta_path)
            with open(meta_path+"/"+app.config['SERVICE_DICT']['description'], 'w') as f:
                f.write(description)
dataset/ETHPy150Open cglewis/wharf/wharf/forms.py/description_meta/original