[ 
https://issues.apache.org/jira/browse/TOREE-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15300116#comment-15300116
 ] 

Gino Bustelo commented on TOREE-316:
------------------------------------

I think this is in the kernel.json but may be overridable through kernel_info. 
If it is in kernel.json, I don't see us wanting to load a plugin from python 
code to write the correct string.

> 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
>             Fix For: 0.1.0
>
>
> 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)

Reply via email to