def generate_markdown(state): html_str= f""" # The Software diversity card of {state["master"]["title"]} {state["master"]["desc"]} ## 🏢 Teams Summary """ ## If development team addit if 'participants' in state: for key, participant in state['participants'].items(): if participant['name']: html_str = html_str + f""" """ if 'type' in participant: html_str = html_str + f"""""" else: html_str = html_str + f"""""" html_str = html_str + f""" """ ## If target Communities add it if state['socialContext']['targetCommunity']['name']: html_str = html_str + f""" """ ## If bodies add if 'governance' in state: if 'bodies' in state['governance']: for key, body in state['governance']["bodies"].items(): if body['name']: html_str = html_str + f""" """ if 'type' in body: html_str = html_str + f"""""" else: html_str = html_str + f"""""" if body['organization']['name']: html_str = html_str + f""" """ if body['participant']['name']: html_str = html_str + f""" """ ## End summary html_str = html_str + f"
Name Description Type Age Range Ethnicities Genders Team Size Location
{participant['name']} {participant['description'].replace('\n', '')}{participant['type'][0]} {participant['age'][0]}-{participant['age'][1]} {participant['ethnicities']} {participant['genders']} {participant['size']} {participant['location']}
{state['socialContext']['targetCommunity']['name']} {state['socialContext']['targetCommunity']['description'].replace('\n', '')} Targeted Community {state['socialContext']['targetCommunity']['age'][0]}-{state['socialContext']['targetCommunity']['age'][1]} {state['socialContext']['targetCommunity']['ethnicities']} {state['socialContext']['targetCommunity']['genders']} many {state['socialContext']['targetCommunity']['location']}
{body['name'].replace('\n', '')} {body['description'].replace('\n', '')}{body['type'][0]} {body['organization']['age'][0]}-{body['organization']['age'][1]} {body['organization']['ethnicities']} {body['organization']['genders']} - {body['organization']['location']}
45 {body['participant']['ethincity']} {body['participant']['gender']} - {body['participant']['location']}
" return html_str