Skip to content

Using markdown and a csv file, merge a markdown template with data from a spreadsheet

Notifications You must be signed in to change notification settings

defjosiah/csv-merge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csv-merge

Overview

csv-merge takes a markdown template (though technically you could use any text based language e.g. LaTeX, plain text, etc), and merges an input spreadsheet with the template.

Template:

## <name>

####Roommate
> <roommate> 

####Room Number
> <room_number>

<div class="pagebreak"></div>

Spreadsheet:

name roommate room_number
Bob right-aligned 3
John centered 9
Jackie are neat 11

And merges them together into a markdown file with a per row replacement for the column names wherever there is an angle bracket in the template.

Generally, this output is run through "pandoc" with css in order to make it look pretty and output to a pdf. e.g.

$ python csv_merge.py | pandoc -c css/something.css -o combined.html

I'm sure something similar exists, but this is simple, and effective.

About

Using markdown and a csv file, merge a markdown template with data from a spreadsheet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published