ipypublish.scripts.create_template module

create template

philosophy is only turn stuff on when we want

http://nbconvert.readthedocs.io/en/latest/customizing.html#Template-structure http://nbconvert.readthedocs.io/en/latest/api/exporters.html#nbconvert.exporters.TemplateExporter

ipypublish.scripts.create_template.create_template(outline_schema, segment_datas, outpath=None)[source]

build a latex jinja template from;

  • a json file, defining a jinja template outline, containing segment placeholders, and a schema for segments,
  • and json segment files adhering to the schema

if a segment contains the key “overwrite”, then its value should be a list of keys, such that these key values overwrite any entries before

Parameters:
  • outline_schema (dict) –
  • segment_datas (tuple or dict) –
  • outpath (None or str) – if not None, output to path
ipypublish.scripts.create_template.handle_error(msg, err_type, raise_msg=None, log_msg=None)[source]

handle an error, by logging it, then raising