# HG changeset patch # User Bryan O'Sullivan # Date 1238172918 18000 # Node ID de5b1753e8659bb5269dbfac9fb61ee2395e5dc3 # Parent c3c5b964901e360a4521c09e1bee6f16d378b362# Parent 9e8e5292acaae158e2a5019fbee018e804aae452 Merge diff -r c3c5b964901e -r de5b1753e865 .hgignore --- a/.hgignore Fri Mar 27 11:54:22 2009 -0500 +++ b/.hgignore Fri Mar 27 11:55:18 2009 -0500 @@ -18,4 +18,5 @@ en/all-ids.dat web/hgbook/.database.sqlite3 web/hgbook/secrets.py +web/index-read.html.in xsl/system-xsl diff -r c3c5b964901e -r de5b1753e865 en/Makefile --- a/en/Makefile Fri Mar 27 11:54:22 2009 -0500 +++ b/en/Makefile Fri Mar 27 11:55:18 2009 -0500 @@ -119,8 +119,12 @@ html: $(obj-web-read)/index.html -$(obj-web-read)/index.html: ../xsl/system-xsl .validated-00book.xml +../web/index-read.html.in: ../web/genindex.py $(xml-src-files) + $< + +$(obj-web-read)/index.html: ../xsl/system-xsl .validated-00book.xml ../web/index-read.html.in xsltproc $(xsltproc-opts) -o $(obj-web-read)/x ../xsl/chunk-stylesheet.xsl 00book.xml + python ../web/texpand.py ../web/index-read.html.in html/read/index.html for i in $(obj-web-read)/*.html; do \ gzip -9 -c $$i > $$i.gz; \ done diff -r c3c5b964901e -r de5b1753e865 web/genindex.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/genindex.py Fri Mar 27 11:55:18 2009 -0500 @@ -0,0 +1,60 @@ +#!/usr/bin/env python + +import glob, os, re + +chapter_re = re.compile(r'<(chapter|appendix|preface)\s+id="([^"]+)">') +filename_re = re.compile(r'<\?dbhtml filename="([^"]+)"\?>') +title_re = re.compile(r'(.*)') + +chapters = glob.glob('../en/ch*.xml') + glob.glob('../en/app*.xml') + +fp = open('index-read.html.in', 'w') + +print >> fp, ''' +{% extends "boilerplate.html" %} +{% block bodycontent %} + +
+{% endblock %}''' + +fp.close() diff -r c3c5b964901e -r de5b1753e865 web/index.html.in --- a/web/index.html.in Fri Mar 27 11:54:22 2009 -0500 +++ b/web/index.html.in Fri Mar 27 11:55:18 2009 -0500 @@ -2,8 +2,7 @@ {% extends "boilerplate.html" %} {% block bodycontent %} - +

Welcome to Mercurial: The Definitive Guide

@@ -31,7 +30,7 @@

(If you would like to adapt the comment system for a publishing project of your own, the source for the web application - is included with the book.)

+ is included with the book source at the link above.)

What is Mercurial?