Skip to content

Commit a645c53

Browse files
committed
Updating TOC.
1 parent cd332b5 commit a645c53

File tree

2 files changed

+62
-3
lines changed

2 files changed

+62
-3
lines changed

README.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
1-
minibook-2nd-code
2-
=================
1+
# Code of the IPython minibook, second edition
2+
3+
## Table of contents
4+
5+
### 1. Getting started with IPython
6+
7+
* 1.1. What is IPython?
8+
* 1.2. What's new in IPython 3.0?
9+
* 1.3. Installing Python with Anaconda
10+
* 1.4. Introducing the notebook
11+
* [1.5. A crash course on Python](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter1/15-python.ipynb)
12+
* [1.6. Ten IPython essentials](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter1/16-ten.ipynb)
13+
* 1.7. Summary
14+
15+
### 2. Interactive data analysis with pandas
16+
17+
* [2.1. Exploring a dataset in the notebook](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter2/21-exploring.ipynb)
18+
* [2.2. Manipulating data](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter2/22-manipulating.ipynb)
19+
* [2.3. Complex operations](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter2/23-groupby.ipynb)
20+
* 2.4. Summary
21+
22+
### 3. Numerical computing with NumPy
23+
24+
* [3.1. A primer to vector computing](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter3/31-primer.ipynb)
25+
* [3.2. Creating and loading arrays](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter3/32-creating.ipynb)
26+
* [3.3. Basic array manipulations](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter3/33-basic.ipynb)
27+
* [3.4. Computing with NumPy arrays](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter3/34-computing.ipynb)
28+
* 3.5. Summary
29+
30+
### 4. Interactive plotting and Graphical Interfaces
31+
32+
* [4.1. Choosing a plotting backend](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter4/41-notebook.ipynb)
33+
* [4.2. matplotlib and seaborn essentials](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter4/42-mpl.ipynb)
34+
* [4.3. Image processing](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter4/43-image.ipynb)
35+
* 4.4. Further plotting and visualization libraries
36+
* 4.5. Summary
37+
38+
### 5. High-performance and parallel computing
39+
40+
* [5.1. Accelerating Python code with Numba](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter5/51-numba.ipynb)
41+
* [5.2. Writing C in Python with Cython](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter5/52-cython.ipynb)
42+
* [5.3. Distributing tasks on several cores with IPython.parallel](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter5/53-parallel.ipynb)
43+
* 5.4. Further high-performance computing techniques
44+
* 5.5. Summary
45+
46+
### 6. Customizing IPython
47+
48+
* [6.1. Creating a custom magic command in an IPython extension](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter6/61-magic.ipynb)
49+
* [6.2. Writing a new Jupyter kernel](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter6/62-kernel.ipynb)
50+
* [6.3. Displaying rich HTML elements in the notebook](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter6/63-rich.ipynb)
51+
* [6.4. Customizing the notebook interface with JavaScript](http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/chapter6/64-nbapp.ipynb)
52+
* 6.5. Summary
53+

utils/gentoc.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Generate the TOC in README."""
2+
13
import os
24
import os.path as op
35
import json
@@ -51,6 +53,12 @@ def _notebook_title(path):
5153
return '{0}.{1}. {2}'.format(a, b, title)
5254

5355

56+
def _nbviewer(path):
57+
dir = op.split(op.dirname(path))[-1]
58+
file = op.basename(path)
59+
return "http://nbviewer.ipython.org/github/ipython-books/minibook-2nd-code/blob/master/" + dir + '/' + file
60+
61+
5462
def _iter_all(root):
5563
for i, chapter in enumerate(_iter_chapters(root)):
5664
yield '{0}\n\n'.format(_get_chapter_header(i + 1))
@@ -59,7 +67,7 @@ def _iter_all(root):
5967
if not title:
6068
continue
6169
if display_link:
62-
yield '* [{0}]({1})\n'.format(title, notebook)
70+
yield '* [{0}]({1})\n'.format(title, _nbviewer(notebook))
6371
else:
6472
yield '* {0}\n'.format(title)
6573
yield '\n'

0 commit comments

Comments
 (0)