#!/usr/bin/env python # coding: utf-8 # # SUMMARY notebook # # This notebook scans the directory in which it lives to find all jupyter notebooks (other than itself) in that directory. It then prints for every notebook it finds (1) a hyperlink to the notebook, and (2) the first cell (which is always markdown) of the notebook. This way you can read a nice, automatically generated summary of all the notebooks without having to open all of them. If you find a notebook that you want to explore further, you can simply click on its link to open it. # In[1]: # Version: 2 import os import json from IPython.display import display, Markdown # the name of this file this_fname = 'SUMMARY.ipynb' fname_to_md = {} for fname in sorted([x for x in os.listdir('./')]): if fname[-6:] == '.ipynb' and fname != this_fname: # print('------------', fname) with open(fname, 'r', encoding="utf-8") as f: fdata = json.load(f) fname_to_md[fname] = ''.join(fdata['cells'][0]['source']) # print(fname_to_md) pre_sep = '\n\n