Files
jupyter_contrib_nbextensions/publishing/nbconvert_button.js
T
juhasch 217e59e69d Update copyright notice
Remove IPython Development Team copyright notice
2014-06-12 17:56:13 +02:00

22 lines
623 B
JavaScript

// convert current notebook to html by calling "ipython nbconvert"
"using strict";
var do_nbconvert_extension = (function() {
doNbconvert = function(){
var kernel = IPython.notebook.kernel;
var name = IPython.notebook.notebook_name;
command = 'import os; os.system(\"ipython nbconvert --to html ' + name + '\")';
kernel.execute(command);
};
IPython.toolbar.add_buttons_group([
{
id : 'doNbconvert',
label : 'Convert current notebook to HTML',
icon : 'icon-download-alt',
callback : doNbconvert
}
]);
})();