We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccd602a commit 9f8644aCopy full SHA for 9f8644a
1 file changed
circle_urls.py
@@ -5,13 +5,15 @@
5
'''
6
import sys
7
import os
8
+import re
9
from glob import glob
10
11
site_dir = os.path.abspath(sys.argv[1])
12
print("Using site directory %s" %(site_dir))
13
14
files = glob("%s/*.html" %(site_dir))
15
for html_file in files:
- new_name = html_file.strip('.html')
16
- print("Renaming %s to %s." %(html_file,new_name))
17
- os.rename(html_file, new_name)
+ if not html_file.endswith('index.html'):
+ 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