File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,7 @@ def get_notebook_title(nb_file):
2828
2929def gen_contents (directory = None ):
3030 for nb in iter_notebooks ():
31- if directory :
32- nb_url = os .path .join (directory , nb )
33- else :
34- nb_url = nb
31+ nb_url = os .path .join (directory , nb ) if directory else nb
3532 chapter , section , title = REG .match (nb ).groups ()
3633 title = get_notebook_title (nb )
3734 if section == '00' :
Original file line number Diff line number Diff line change @@ -98,8 +98,8 @@ def copy_notebooks():
9898
9999 nbformat .write (content , os .path .join (NB_DEST_DIR , nb ))
100100
101- pagefile = os .path .join (PAGE_DEST_DIR , base + ' .md' )
102- htmlfile = base .lower () + ' .html'
101+ pagefile = os .path .join (PAGE_DEST_DIR , f' { base } .md' )
102+ htmlfile = f' { base .lower ()} .html'
103103 with open (pagefile , 'w' ) as f :
104104 f .write (PAGEFILE .format (title = title ,
105105 htmlfile = htmlfile ,
You can’t perform that action at this time.
0 commit comments