diff --git a/examples/notebooks/Part 5 - Rich Display System.ipynb b/examples/notebooks/Part 5 - Rich Display System.ipynb index 4f9ab81..2bb9054 100644 --- a/examples/notebooks/Part 5 - Rich Display System.ipynb +++ b/examples/notebooks/Part 5 - Rich Display System.ipynb @@ -292,6 +292,113 @@ }, { "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Links to local files" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If we want to create a link to one of them, we can call use the `FileLink` object." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from IPython.display import FileLink, FileLinks\n", + "FileLink('Part 1 - Running Code.ipynb')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "html": [ + "Part 1 - Running Code.ipynb
" + ], + "output_type": "pyout", + "prompt_number": 2, + "text": [ + "/home/bgranger/Documents/ipython/examples/notebooks/Part 1 - Running Code.ipynb" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Alternatively, if we want to link to all of the files in a directory, we can use the `FileLinks` object, passing `'.'` to indicate that we want links generated for the current working directory. Note that if there were other directories under the current directory, `FileLinks` would work in a recursive manner creating links to files in all sub-directories as well." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "FileLinks('.')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "html": [ + "./
\n", + "  Animations Using clear_output.ipynb
\n", + "  Custom Display Logic.ipynb
\n", + "  SymPy Examples.ipynb
\n", + "  Part 2 - Basic Output.ipynb
\n", + "  Frontend-Kernel Model.ipynb
\n", + "  Part 5 - Rich Display System.ipynb
\n", + "  animation.m4v
\n", + "  Trapezoid Rule.ipynb
\n", + "  Part 4 - Markdown Cells.ipynb
\n", + "  R Magics.ipynb
\n", + "  Part 1 - Running Code.ipynb
\n", + "  Typesetting Math Using MathJax.ipynb
\n", + "  Part 3 - Pylab and Matplotlib.ipynb
\n", + "  Script Magics.ipynb
\n", + "  Octave Magic.ipynb
\n", + "  Cell Magics.ipynb
\n", + "  python-logo.svg
\n", + "  Data Publication API.ipynb
\n", + "  Progress Bars.ipynb
\n", + "  Cython Magics.ipynb
" + ], + "output_type": "pyout", + "prompt_number": 3, + "text": [ + "./\n", + " Animations Using clear_output.ipynb\n", + " Custom Display Logic.ipynb\n", + " SymPy Examples.ipynb\n", + " Part 2 - Basic Output.ipynb\n", + " Frontend-Kernel Model.ipynb\n", + " Part 5 - Rich Display System.ipynb\n", + " animation.m4v\n", + " Trapezoid Rule.ipynb\n", + " Part 4 - Markdown Cells.ipynb\n", + " R Magics.ipynb\n", + " Part 1 - Running Code.ipynb\n", + " Typesetting Math Using MathJax.ipynb\n", + " Part 3 - Pylab and Matplotlib.ipynb\n", + " Script Magics.ipynb\n", + " Octave Magic.ipynb\n", + " Cell Magics.ipynb\n", + " python-logo.svg\n", + " Data Publication API.ipynb\n", + " Progress Bars.ipynb\n", + " Cython Magics.ipynb" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", "level": 3, "metadata": {}, "source": [ @@ -1127,4 +1234,4 @@ "metadata": {} } ] -} +} \ No newline at end of file