From 30e1ae5890f445d7466241b94b56e5501c281447 Mon Sep 17 00:00:00 2001 From: david <> Date: Sat, 18 May 2002 00:09:38 +0000 Subject: [PATCH] allow Lintadas to be run from the command line. --- LDP/lampadas/pylib/Lintadas.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/LDP/lampadas/pylib/Lintadas.py b/LDP/lampadas/pylib/Lintadas.py index b0da7dce..2f678ccb 100755 --- a/LDP/lampadas/pylib/Lintadas.py +++ b/LDP/lampadas/pylib/Lintadas.py @@ -82,7 +82,29 @@ class Lintadas: # When run at the command line, all checks are performed on all documents. +def main(): + import getopt + import sys + + Docs = sys.argv[1:] + if len(Docs) == 0: + print "Running on all documents..." + Lintadas.CheckAllDocs() + else: + for Doc in Docs: + print "Running on document " + Doc + Lintadas.CheckDoc(Doc) + +def usage(): + print "HTML.py version " + VERSION + print + print "This is part of the Lampadas System" + print + print "Pass doc ids to run Lintadas on specific docs," + print "or call with no parameters to run Lintadas on all docs." + print + + if __name__ == "__main__": Lintadas = Lintadas() - Lintadas.CheckAllDocs() -# Lintadas.CheckDoc(469) + main()