So was an answer ever provided? I am trying to get this going myself. 
Especially since templates can depend on other templates. 
IE. the nbconvert_examples repo has dependencies. I can't get any to work, 
unless perhaps I copy a dozen templates, including the defaults, all into 
the working directory

On Saturday, 28 November 2015 03:35:24 UTC-5, Tony Hirst wrote:
>
> If I try to use nbconvert with a custom template by either of:
>
> jupyter nbconvert --config=my_config.py --log-level=DEBUG Untitled.ipynb
> jupyter nbconvert --template=my_template.tpl --log-level=DEBUG 
> Untitled.ipynb
>
> I can only get it to work if the custom file is in the same directory.
>
> If I use the config route with:
>
> #---
> from jupyter_core.paths import jupyter_data_dir
> extensiondir=os.path.join(jupyter_data_dir(),'nbextensions/myextension/')
>
> c = get_config()
> c.TemplateExporter.template_path = [ extensiondir ]
> c.TemplateExporter.template_file = 'my_template.tpl'
> #---
>
> I can relocate the template file but the config file needs to be in the 
> local directory.
>
> The debug trace suggests that there re not paths down down which the 
> script looks for the config file?
>
> [NbConvertApp] Config changed:
> [NbConvertApp] {'NbConvertApp': {'log_level': 'DEBUG', 'config_file': 
> 'ipython_nbconvert_config2.py'}}
> [NbConvertApp] Searching ['/vagrant/notebooks', '/root/.jupyter', 
> '/usr/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
> [NbConvertApp] Attempting to load config file jupyter_config.py in path 
> /etc/jupyter
> [NbConvertApp] Attempting to load config file jupyter_config.json in path 
> /etc/jupyter
> [NbConvertApp] Attempting to load config file jupyter_config.py in path 
> /usr/local/etc/jupyter
> [NbConvertApp] Attempting to load config file jupyter_config.json in path 
> /usr/local/etc/jupyter
> [NbConvertApp] Attempting to load config file jupyter_config.py in path 
> /usr/etc/jupyter
> [NbConvertApp] Attempting to load config file jupyter_config.json in path 
> /usr/etc/jupyter
> [NbConvertApp] Attempting to load config file jupyter_config.py in path 
> /root/.jupyter
> [NbConvertApp] Attempting to load config file jupyter_config.json in path 
> /root/.jupyter
> [NbConvertApp] Attempting to load config file jupyter_config.py in path 
> /vagrant/notebooks
> [NbConvertApp] Attempting to load config file jupyter_config.json in path 
> /vagrant/notebooks
> [NbConvertApp] Attempting to load config file ipython_nbconvert_config2.py in 
> path 
> [NbConvertApp] Attempting to load config file ipython_nbconvert_config2.json 
> in path 
> [NbConvertApp] Converting notebook Untitled.ipynb to html
>
>
> That is, the path is empty?
>
>
> My workaround is to copy the template file into the local dir, run with that, 
> and then delete the local template file. Which I'm sure is not the way to do 
> it properly?!
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/46816a1f-c11d-4461-9396-390566094516%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to