[Commits] python.it commit r214 - www/trunk/scripts/ht2html
commit a svn.python.it
commit a svn.python.it
Ven 15 Set 2006 12:25:46 CEST
Author: manlio
Date: Fri Sep 15 12:25:42 2006
New Revision: 214
Modified:
www/trunk/scripts/ht2html/htvalidate.py
Log:
aggiunto script per la validazione dei file .h
Modified: www/trunk/scripts/ht2html/htvalidate.py
==============================================================================
--- www/trunk/scripts/ht2html/htvalidate.py (original)
+++ www/trunk/scripts/ht2html/htvalidate.py Fri Sep 15 12:25:42 2006
@@ -7,6 +7,8 @@
import os
import email
+
+
doctypes = {
'strict' : """<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
@@ -29,11 +31,12 @@
</html>
"""
+# XXX TODO use a system catalog
cmd = "xmllint --noout --valid --loaddtd -"
ht = email.message_from_file(file(sys.argv[1]))
-# XXX TODO da riga di comando
+# XXX TODO from command line
doctype = doctypes['strict']
title = ht.get('Title', '')
body = ht.get_payload()
@@ -51,4 +54,3 @@
print "Document not valid"
sys.exit(ret or 0) # XXX
-
Maggiori informazioni sulla lista
Commits