File: docs-validate.py

package info (click to toggle)
scons-doc 2.5.1%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 37,000 kB
  • ctags: 8,642
  • sloc: xml: 195,697; python: 60,955; sh: 1,391; ruby: 229; perl: 124; makefile: 68; cpp: 2
file content (28 lines) | stat: -rw-r--r-- 1,054 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python
#
# Searches through the whole source tree and validates all
# documentation files against our own XSD in docs/xsd.
#

import sys,os
import SConsDoc

if __name__ == "__main__":
    if len(sys.argv)>1:
        if SConsDoc.validate_all_xml((sys.argv[1],)):
            print "OK"
        else:
            print "Validation failed! Please correct the errors above and try again."
    else:
        if SConsDoc.validate_all_xml(['src',
                                      os.path.join('doc','design'),
                                      os.path.join('doc','developer'),
                                      os.path.join('doc','man'),
                                      os.path.join('doc','python10'),
                                      os.path.join('doc','reference'),
                                      os.path.join('doc','user')
                                      ]):
            print "OK"
        else:
            print "Validation failed! Please correct the errors above and try again."
            sys.exit(1)