Skip to content
Snippets Groups Projects
Commit 9db80590 authored by Pau Miquel's avatar Pau Miquel Committed by Pere Mato
Browse files

Added support for python notebooks

parent bfcb4439
No related branches found
No related tags found
No related merge requests found
...@@ -303,8 +303,14 @@ void FilterTutorial() ...@@ -303,8 +303,14 @@ void FilterTutorial()
if (gLineString.find("\\notebook") != string::npos) { if (gLineString.find("\\notebook") != string::npos) {
ExecuteCommand(StringFormat("python converttonotebook.py %s %s/notebooks/", ExecuteCommand(StringFormat("python converttonotebook.py %s %s/notebooks/",
gFileName.c_str(), gOutDir.c_str())); gFileName.c_str(), gOutDir.c_str()));
gLineString = StringFormat( "/// \\htmlonly <a href=\"http://nbviewer.jupyter.org/url/root.cern.ch/doc/master/notebooks/%s.nbconvert.ipynb\" target=\"_blank\"><img src= notebook.gif alt=\"View in nbviewer\" style=\"height:1em\" ></a> <a href=\"https://cern.ch/swanserver/cgi-bin/go?projurl=https://root.cern.ch/doc/master/notebooks/%s.nbconvert.ipynb\" target=\"_blank\"><img src=\"http://swanserver.web.cern.ch/swanserver/images/badge_swan_white_150.png\" alt=\"Open in SWAN\" style=\"height:1em\" ></a> \\endhtmlonly \n", gMacroName.c_str() , gMacroName.c_str()); if (gPython){
gLineString = "## ";
}
else{
gLineString = "/// ";
}
gLineString += StringFormat( "\\htmlonly <a href=\"http://nbviewer.jupyter.org/url/root.cern.ch/doc/master/notebooks/%s.nbconvert.ipynb\" target=\"_blank\"><img src= notebook.gif alt=\"View in nbviewer\" style=\"height:1em\" ></a> <a href=\"https://cern.ch/swanserver/cgi-bin/go?projurl=https://root.cern.ch/doc/master/notebooks/%s.nbconvert.ipynb\" target=\"_blank\"><img src=\"http://swanserver.web.cern.ch/swanserver/images/badge_swan_white_150.png\" alt=\"Open in SWAN\" style=\"height:1em\" ></a> \\endhtmlonly \n", gMacroName.c_str() , gMacroName.c_str());
} }
// \macro_output found // \macro_output found
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment