Skip to content

Commit ccd602a

Browse files
committed
adding python file to rename files to render on circle artifacts
1 parent 60848f8 commit ccd602a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

circle.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ general:
1515
test:
1616
post:
1717
- bundle exec jekyll build
18+
- python circle_urls.py ./_site

circle_urls.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env python
2+
3+
'''
4+
circle_urls.py will rename all url files to not have extension .html
5+
'''
6+
import sys
7+
import os
8+
from glob import glob
9+
10+
site_dir = os.path.abspath(sys.argv[1])
11+
print("Using site directory %s" %(site_dir))
12+
13+
files = glob("%s/*.html" %(site_dir))
14+
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)

0 commit comments

Comments
 (0)