Skip to content

Instantly share code, notes, and snippets.

@lwrubel
lwrubel / csv-to-ris-format.py
Last active December 21, 2022 20:56
Convert csv exported from Google Sheets to RIS format. To use: python csv-to-ris-format.py infile.csv outfile.txt
#!/usr/bin/env python
# To use:
# python csv-to-ris-format.py csvfile.csv risoutput.txt
#
# Assumes you have removed the header row from the csv file,
# columns are in the same order as the labels list,
# and there are no other columns in the csv.
import csv
from sys import argv