mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
added HTML and PDF downloads, updated home page
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user