Skip to content

Instantly share code, notes, and snippets.

@sw82
sw82 / csv-to-mkdown-files.py
Last active May 17, 2021 20:25 — forked from cherihung/csv-to-mkdown-files.py
convert each row in csv to a markdown file in python
import csv
# Name,Contact made by,Rating,Service Area,Last Catchup,Notes
def toMarkdown(item):
#print(item)
newTemp = "# About"+"\n"+"\n"
newTemp += "- Intro via [["+f"{item['Contact made by']}"+"]]"+"\n"+"\n"
newTemp += "- #Rating"+f"{item['Rating']}"+"\n"+"\n"
newTemp += "# Tags"+"\n"+"- #" +f"{item['Service Area']}"+"\n"+"\n"
#newTemp += "# Notes"+"\n" +"- " +f"{item['Notes']}" +"\n"
return newTemp