Skip to content

Instantly share code, notes, and snippets.

@nfway
nfway / csv-to-mkdown-files.py
Created March 16, 2021 01:48 — forked from cherihung/csv-to-mkdown-files.py
convert each row in csv to a markdown file in python
import csv
def toMarkdown(item):
newTemp = "---"+"\n"+"layout: sculpture"+"\n"+"pageId: "+item[0]+"\n"+"uid: "+item[1]+"\n"
newTemp += "title: "+item[2]+"\n"+"location: "+item[3]+"\n"+"completionDate: "+item[4]+"\n"
newTemp += "description: "+item[5]+"\n"+"imageId: "+item[6]+"\n"
newTemp += "---"+"\n"
return newTemp
with open('file.csv', 'rb') as f: