added HTML and PDF downloads, updated home page

This commit is contained in:
Mark Pilgrim
2009-09-11 23:06:01 -04:00
parent 81aa17c80c
commit f6a6aee7b3
5 changed files with 40 additions and 9 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/python3
import re
import time
# get list of chapters
chapters = []
@@ -17,7 +18,7 @@ id_munge = re.compile(" id=(.*?)[ >]")
# munge and combine chapter-specific styles
out = open('build/single.html', 'w', encoding="utf-8")
out.write(open('util/single-header.html', encoding="utf-8").read())
out.write(open('util/single-header.html', encoding="utf-8").read().replace('%%DATE%%', time.strftime('%Y-%m-%d', time.localtime())))
out.write("<style>\n")
for filename in chapters:
include = False
+1
View File
@@ -6,6 +6,7 @@
<meta name="author" content="Mark Pilgrim">
<meta name="subject" content="Python 3 from novice to pro">
<meta name="keywords" content="python, python3, py3k, free, book">
<meta name="date" content="%%DATE%%">
<link rel=stylesheet href=dip3.css>
<style>
body{counter-reset:h1 -2}