Skip to content

Commit 9f8644a

Browse files
committed
don't want to rename index :)
1 parent ccd602a commit 9f8644a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

circle_urls.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
'''
66
import sys
77
import os
8+
import re
89
from glob import glob
910

1011
site_dir = os.path.abspath(sys.argv[1])
1112
print("Using site directory %s" %(site_dir))
1213

1314
files = glob("%s/*.html" %(site_dir))
1415
for html_file in files:
15-
new_name = html_file.strip('.html')
16-
print("Renaming %s to %s." %(html_file,new_name))
17-
os.rename(html_file, new_name)
16+
if not html_file.endswith('index.html'):
17+
new_name = html_file.replace('.html','')
18+
print("Renaming %s to %s." %(html_file,new_name))
19+
os.rename(html_file, new_name)

0 commit comments

Comments
 (0)