Skip to content

Commit

Permalink
Fix TOC and cleanup old files
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Aug 23, 2012
1 parent f0155ee commit c3ed9e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions scripts/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@
pass

if spec == 'html':
output = open('output/html/onepage.html', 'wb')
from glob import glob
for name in glob('output/html/*.html'):
os.remove(name)

output = open('output/html/single-page.html', 'wb')
else:
output = open('output/%s/Overview.html' % spec, 'wb')

Expand All @@ -78,6 +82,4 @@
print 'splitting'
import spec_splitter
spec_splitter.w3c = True
spec_splitter.main('output/html/onepage.html', 'output/html')
os.rename('output/html/Overview.html', 'output/html/spec.html')
os.rename('output/html/onepage.html', 'output/html/Overview.html')
spec_splitter.main('output/html/single-page.html', 'output/html')
2 changes: 1 addition & 1 deletion scripts/spec_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def main(input, output):
import html5lib.treewalkers

if w3c:
index_page = 'Overview'
index_page = 'spec'
else:
index_page = 'index'

Expand Down

0 comments on commit c3ed9e2

Please sign in to comment.