html5/spec/static .cvsignore,NONE,1.1 Makefile,NONE,1.1 spec-splitter.py,1.1,1.2 Overview.html,1.2,NONE

Update of /sources/public/html5/spec/static
In directory hutz:/tmp/cvs-serv4824

Modified Files:
	spec-splitter.py 
Added Files:
	.cvsignore Makefile 
Removed Files:
	Overview.html 
Log Message:
set up build for making multi-page version and validating & link-checking


--- NEW FILE: .cvsignore ---
images
multipage
CHECKLOG

Index: spec-splitter.py
===================================================================
RCS file: /sources/public/html5/spec/static/spec-splitter.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- spec-splitter.py	10 Jun 2008 00:28:32 -0000	1.1
+++ spec-splitter.py	10 Jun 2008 09:25:37 -0000	1.2
@@ -86,7 +86,7 @@
 
 # Prepare the link-fixup script
 if not w3c:
-    link_fixup_script = etree.XML('<script src="link-fixup.js"/>')
+    link_fixup_script = etree.XML('<script src="fragment-links.js"/>')
     doc.find('head')[-1].tail = '\n  '
     doc.find('head').append(link_fixup_script)
     link_fixup_script.tail = '\n  '

--- Overview.html DELETED ---

--- NEW FILE: Makefile ---
PYTHON=python
PYTHONFLAGS=

SPLITTER=spec-splitter.py
SPLITTERFLAGS=--w3c

CURL=curl
CURLFLAGS=-s

VNU=http://validator.nu
VNUFLAGS=-F level=error -F out=gnu 

CHECKLINK=checklink
CHECKLINKFLAGS=-q -b

TEE=tee
TEEFLAGS=-a

GREP=egrep
GREPFLAGS=

CUT=cut
CUTFLAGS=

.PHONY: valid multi-valid multi-check

all: images multipage/fragment-links.js multipage/images

release: all valid check

multipage/fragment-links.js: Overview.html
	-mkdir multipage
	$(PYTHON) $(PYTHONFLAGS) $(SPLITTER) $< multipage

valid: Overview.html
	$(CURL) $(CURLFLAGS) $(VNUFLAGS) -F doc=@$< $(VNU)

CHECKLOG: Overview.html
	echo "checking $(realpath $<)" > $@
	$(CHECKLINK) $(CHECKLINKFLAGS) $< | $(TEE) $(TEEFLAGS) $@
	for file in $$($(GREP) $(GREPFLAGS) "^http" $@ | $(CUT) $(CUTFLAGS) -f1); do \
	  (wget --spider -nv --timeout=15 "$$file" 2>&1 && echo "OK: $$file") \
	  | $(TEE) $(TEEFLAGS) $@; \
	done

multi-valid:
	for file in $$(find multipage -name "*.html"); do echo $$file; $(CURL) $(CURLFLAGS) \
	  $(VNUFLAGS) -F doc=@$$file $(VNU); done

multi-check:
	for file in $$(find multipage -name "*.html"); do echo $$file; \
	  $(CHECKLINK) $(CHECKLINKFLAGS) $$file; done

images: ../images
	cp -pR $< $@

multipage/images: ../images
	cp -pR $< $@

clean:
	$(RM) multipage/*.html
	$(RM) multipage/fragment-links.js
	$(RM) multipage/images

Received on Tuesday, 10 June 2008 09:26:17 UTC