Chilipp / sphinx-nbexamples

⛔️ Deprecated: Create an examples gallery with sphinx from Jupyter Notebooks
MIT License
15 stars 11 forks source link

Non-Python notebooks produce invalid `.py` files for download #4

Closed effigies closed 5 years ago

effigies commented 5 years ago

I have an SOS notebook with Markdown and Bash cells. If this were to produce anything, I would want a .sh file. Failing that, making only the .ipynb file available would be preferable.

Here is the Notebook metadata (all auto-generated except the thumbnail):

{
 ...
 "metadata": {
  "kernelspec": {
   "display_name": "Bash",
   "language": "bash",
   "name": "bash"
  },
  "language_info": {
   "codemirror_mode": "shell",
   "file_extension": ".sh",
   "mimetype": "text/x-sh",
   "name": "bash"
  },
  "sos": {
   "kernels": [
    [
     "Bash",
     "bash",
     "Bash",
     "#E6EEFF",
     "shell"
    ],
    [
     "markdown",
     "markdown",
     "markdown",
     "",
     ""
    ]
   ],
   "panel": {
    "displayed": true,
    "height": 0
   },
   "version": "0.19.1"
  },
  "thumbnail_figure": "images/bash.png"
 },
 ...
}
Chilipp commented 5 years ago

Dear @effigies,

thanks a lot for your input here! I did not design sphinx-nbexamples to work for non-python code, yet. But indeed, you are right, it should not be too difficult to implement it and it would be a very useful feature.

Could you please provide the notebook file, that you are trying to import (or a simplified version of it)? I will then work on it during this week.

effigies commented 5 years ago

Sure. I'm actually having a quick go at it right now, but I'll be posting the notebook to a repository sometime today and I'll link it here.

Chilipp commented 5 years ago

Great, thanks!