diff --git a/profile/base_html.nbcv b/profile/base_html.nbcv index 571da49..db1c9d1 100644 --- a/profile/base_html.nbcv +++ b/profile/base_html.nbcv @@ -5,4 +5,6 @@ c.ConverterTemplate.extract_figures=False c.ConverterTemplate.template_file='basichtml' c.ConverterTemplate.tex_environement=False +c.NbconvertApp.fileext='html' + c.ExtractFigureTransformer.enabled = False diff --git a/profile/full_html.nbcv b/profile/full_html.nbcv index a07445e..ab3ec71 100644 --- a/profile/full_html.nbcv +++ b/profile/full_html.nbcv @@ -5,4 +5,6 @@ c.ConverterTemplate.extract_figures=False c.ConverterTemplate.template_file='fullhtml' c.ConverterTemplate.tex_environement=False +c.NbconvertApp.fileext='html' + c.ExtractFigureTransformer.enabled = False diff --git a/profile/latex_base.nbcv b/profile/latex_base.nbcv index 37fad42..cf41f30 100644 --- a/profile/latex_base.nbcv +++ b/profile/latex_base.nbcv @@ -5,6 +5,7 @@ c.ConverterTemplate.template_file='latex_base' c.ConverterTemplate.tex_environement=True c.ConverterTemplate.display_data_priority=['latex', 'svg', 'png', 'jpg', 'jpeg' , 'text'] c.ExtractFigureTransformer.display_data_priority=['latex', 'svg', 'png', 'jpg', 'jpeg'] +c.NbconvertApp.fileext='tex' c.ExtractFigureTransformer.extra_ext_map={'svg':'pdf'} c.ExtractFigureTransformer.enabled=True diff --git a/profile/python.nbcv b/profile/python.nbcv index c00416c..75d5b2d 100644 --- a/profile/python.nbcv +++ b/profile/python.nbcv @@ -3,3 +3,5 @@ c = get_config() c.ConverterTemplate.extract_figures=False c.ConverterTemplate.template_file='python' c.ConverterTemplate.tex_environement=False + +c.NbconvertApp.fileext='py' diff --git a/runme.py b/runme.py index 6a6c09b..c5d892c 100755 --- a/runme.py +++ b/runme.py @@ -38,6 +38,8 @@ class NbconvertApp(Application): stdout = Bool(True, config=True) write = Bool(False, config=True) + fileext = Unicode('txt', config=True) + aliases = { 'stdout':'NbconvertApp.stdout', 'write':'NbconvertApp.write', @@ -98,7 +100,7 @@ class NbconvertApp(Application): keys = resources.keys() if self.write : - with io.open(os.path.join(out_root+'.'+'ext'),'w') as f: + with io.open(os.path.join(out_root+'.'+self.fileext),'w') as f: f.write(output) if keys : if self.write and not os.path.exists(out_root+'_files'): diff --git a/templates/basichtml.tpl b/templates/basichtml.tpl index 693901e..dd86998 100644 --- a/templates/basichtml.tpl +++ b/templates/basichtml.tpl @@ -14,13 +14,11 @@ {% endblock input_group %} {% block output_group -%} -