This is a script to get all notebooks from a github user and download, turning them into rst pages.
In [1]:
ls
In [2]:
import os
In [6]:
listkindy = list(os.listdir(os.getcwd()))
In [7]:
os.listdir(os.getcwd)
In [8]:
gdir = ('/home/public/github/')
In [9]:
os.listdir('/home/public/github/')
In [10]:
dabook = []
In [11]:
os.mkdir('notebooks')
In [12]:
import shutil
In [13]:
os.getcwd()
Out[13]:
In [14]:
for filz in os.listdir(gdir):
print filz
for fila in os.listdir(gdir + filz):
print fila
if 'ipynb' in fila:
dabook.append(os.getcwd() + '/' + filz + '/' + fila)
# shutil.copy(fila, '/home/public/notebooks')
In [15]:
#for da in dabook:
# if 'checkpoints' or '.html' in da:
# dabook.remove(da) # removes too many, filter so it only
#removes files i don't want. if they dont end
#with .ipynb, i dont want to see them.
In [16]:
dabook
Out[16]:
In [86]:
In [54]:
In [ ]: