Skip to content

Instantly share code, notes, and snippets.

@anglyan anglyan/
Created May 27, 2016

What would you like to do?
python + beamer: reads a list of files and descriptions and compiles a latex presentation using beamer. Details at:
import csv
header = r"""
footer = r"""
baseslide = r"""
def parse_csv(filename):
data = [row for row in csv.reader(open(filename, 'rU'))]
slides = [create_slide(*row) for row in data]
return slides
def create_slide(filename, title, content):
slide = {}
slide['filename'] = filename
slide['content'] = content
slide['title'] = title
return (baseslide % slide)
if __name__ == '__main__':
import sys
print header + "".join(parse_csv(sys.argv[1])) + footer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.