Skip to content

Instantly share code, notes, and snippets.

View thedivtagguy's full-sized avatar
🤙
I don't know what I'm doing.

Aman Bhargava thedivtagguy

🤙
I don't know what I'm doing.
View GitHub Profile
@thedivtagguy
thedivtagguy / sheets-to-md.py
Created January 6, 2021 03:39
Converting Google Sheets to Markdown Files
# Takes in a file CSV file and outputs each row as a Markdown file with YAML front matter named after first column.
# Data in the first row of the CSV is assumed to be the column heading.
# Original work borrowed from: https://github.com/EvanLovely/csv_to_jekyll
# Adapted from https://www.bryanklein.com/blog/hugo-python-gsheets-oh-my/
# Import the python libraries.
import gspread
from oauth2client.service_account import ServiceAccountCredentials
from pathlib import Path
import os