Show More
@@ -0,0 +1,36 b'' | |||||
|
1 | #!/usr/bin/env python | |||
|
2 | """Simple script to auto-generate the index of notebooks in a given directory. | |||
|
3 | """ | |||
|
4 | ||||
|
5 | import glob | |||
|
6 | import urllib | |||
|
7 | ||||
|
8 | notebooks = sorted(glob.glob('*.ipynb')) | |||
|
9 | ||||
|
10 | tpl = ( '* [{0}](http://nbviewer.ipython.org/url/github.com/ipython/ipython/' | |||
|
11 | 'raw/master/examples/notebooks/{1})' ) | |||
|
12 | ||||
|
13 | idx = [ | |||
|
14 | """# A collection of Notebooks for using IPython effectively | |||
|
15 | ||||
|
16 | The following notebooks showcase multiple aspects of IPython, from its basic | |||
|
17 | use to more advanced scenarios. They introduce you to the use of the Notebook | |||
|
18 | and also cover aspects of IPython that are available in other clients, such as | |||
|
19 | the cell magics for multi-language integration or our extended display | |||
|
20 | protocol. | |||
|
21 | ||||
|
22 | For beginners, we recommend that you start with the 5-part series that | |||
|
23 | introduces the system, and later read others as the topics interest you. | |||
|
24 | ||||
|
25 | Once you are familiar with the notebook system, we encourage you to visit our | |||
|
26 | [gallery](https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks) | |||
|
27 | where you will find many more examples that cover areas from basic Python | |||
|
28 | programming to advanced topics in scientific computing. | |||
|
29 | """] | |||
|
30 | ||||
|
31 | idx.extend(tpl.format(nb.replace('.ipynb',''), urllib.quote(nb)) | |||
|
32 | for nb in notebooks) | |||
|
33 | ||||
|
34 | with open('README.md', 'w') as f: | |||
|
35 | f.write('\n'.join(idx)) | |||
|
36 | f.write('\n') |
General Comments 0
You need to be logged in to leave comments.
Login now