Skip to content

Instantly share code, notes, and snippets.

@cfriedline
Last active December 26, 2015 10:39
Show Gist options
  • Save cfriedline/7138580 to your computer and use it in GitHub Desktop.
Save cfriedline/7138580 to your computer and use it in GitHub Desktop.
Poor man's IPython notebook manager, now that there's multidir. Put this into a new notebook, assumes that all notebooks are under a common directory, albeit in their own directories. Should help (me) with git.
manager_name = 'Manager.ipynb'
import os
from IPython.display import FileLink, FileLinks, display, HTML, display_html
notebooks = !find . | grep .ipynb$ | grep -v checkpoint
notebooks = sorted(notebooks)
root_dir = [os.path.dirname(os.path.abspath(x)) for x in notebooks if manager_name in x]
paths = []
for n in notebooks:
u = os.path.abspath(n).replace(root_dir[0], '/notebooks')
display_html(HTML('<li><a href=%s target=_new>%s' % (u, u)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment