File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -54,21 +54,22 @@ def process_repo(repo, destination_directory):
54
54
55
55
repo = Path (tmp )
56
56
tutorials = glob .glob (f"{ repo } /_sources/*.ipynb" )
57
- print (f"Found tutorial(s) { tutorials } " )
58
57
for t in tutorials :
58
+ tname = os .path .splitext (os .path .basename (t ))[0 ]
59
+ print (f"Copying tutorial { tname } " )
59
60
shutil .copy (t , destination_directory )
60
61
shutil .copy (
61
- f"{ repo } /{ os . path . splitext ( os . path . basename ( t ))[ 0 ] } .html" ,
62
+ f"{ repo } /{ tname } .html" ,
62
63
destination_directory ,
63
64
)
64
65
if len (tutorials ) > 1 :
65
- print ("More than 1 tutorial found; treating this as a book " )
66
+ print ("More than 1 tutorial found; also copying index.html " )
66
67
shutil .copy (f"{ repo } /index.html" , destination_directory )
67
68
# copy images (plots) in notebook for faster page loading
68
69
try :
69
70
shutil .copy (f"{ repo } /_images/*.png" , f"{ destination_directory } /nboutput" )
70
71
except FileNotFoundError :
71
- pass
72
+ print ( "No notebook cell output images found to copy" )
72
73
73
74
74
75
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments