moremoban / moban

General purpose static text generator using Jinja2 and other python template engines
http://moban.readthedocs.io
MIT License
33 stars 14 forks source link

tabular data processor #204

Open jayvdb opened 5 years ago

jayvdb commented 5 years ago

load tabular data, and process each row with the same template, emitting a file for each row.

E.g. https://github.com/natehardison/sendtmail/blob/master/README.md

(but ignore email sending; that is a prob for a different issue)

jayvdb commented 5 years ago

And https://github.com/jordanncg/Bison/blob/master/bison/libs/process.py

jayvdb commented 5 years ago

For the data side, we need to import the data file (pyexcel loaders?) and allow the user to give it a top level name in the moban internal data dictionary.

Then a separate enhancement is needed to emit one file per row.

chfw commented 5 years ago

by default, pyexcel-io provides a dictionary.

single sheet: { "data": [[1,2]]}

multiple sheets: {"pyexcel-sheet1": [[1,2]], "pyexcel-sheet2": [[3,4]]}

The keys need to be tweeked so that templating would work seamlessly.