Piotr Ożarowski:
> [Ximin Luo, 2016-12-03]
>> So far, so good. But now I'm having trouble trying to automate away
>> the "enable" step. What "enable" does is add an entry to
>> /etc/jupyter/nbconfig/notebook.json. There are two ways of automating
>> this, and I'm not sure which way is the best. They each have their
>> downsides.
> 
> is upstream willing to apply a patch to support
> /etc/jupyter/nbconfig/notebook.d/ that would solve your problem IIUC?
> 

They would probably not want to do that, because (at least currently) the only 
"config option" each extension would have, is which "sections" it should be 
enabled in. So we'd get a mess of 1-line files in those directories.

However, I've come up with an alternative solution in the meantime, based on 
triggers but solving the downsides mentioned previously. Each package can 
install, an extra file, e.g.:

/usr/share/jupyter/nbextension/jupyter-js-widgets/extension.nbextension

whose contents would simply be "section: notebook" or even "" to imply the 
default value, "notebook".

Then I can write a notebook.nbextensions_scan_update module to scan for 
.nbextension files, and run this module in the postinst trigger. And I will ask 
upstream to accept this scanner module.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git

Reply via email to