Leonardo Noleto created TOREE-316:
-------------------------------------
Summary: Generate Scala file from Jupyter Notebook
Key: TOREE-316
URL: https://issues.apache.org/jira/browse/TOREE-316
Project: TOREE
Issue Type: New Feature
Environment: Toree 0.1.0.dev7
Jupyter Notebook 4.2
Scala 2.10
Python 3.5.1
Reporter: Leonardo Noleto
Priority: Minor
Hello all,
I am unable to generate a Scala file from a Jupyter Notebook with the good file
extension (.scala) through NbConvert:
{noformat}
jupyter nbconvert --to script MyScalaNotebook.ipynb
{noformat}
It's not a big deal as it generates the code but with .txt extension.
The fix seems quite easy (the notebook metadata is not full jupyter compliant).
Here goes an example of metadata created by Toree:
{code:javascript}
{
"kernelspec": {
"name": "scala_no_sparkcontext_scala",
"display_name": "Scala with SparkContext - Scala",
"language": "scala"
},
"language_info": {
"name": "scala"
}
}
{code}
Now, for a modified version enabling good generation (with .scala extension):
{code:javascript}
{
"kernelspec": {
"name": "scala_no_sparkcontext_scala",
"display_name": "Scala with SparkContext - Scala",
"language": "scala"
},
"language_info": {
"name": "scala",
"file_extension": ".scala"
}
}
{code}
The modified code solves the "Download as" with the good extension.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)