summaryrefslogtreecommitdiff
path: root/bin/docs-validate.py
blob: fc90ee7f32f1dcfc901b9a934aa8f07f86aa2c93 (plain)
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
#!/usr/bin/env python
#
# Searches through the whole source tree and validates all
# documentation files against our own XSD in docs/xsd.
# Additionally, it rewrites all files such that the XML gets
# pretty-printed in a consistent way. This is done to ensure that
# merging and diffing doesn't get too hard when people start to
# use different XML editors...
#

import os
import SConsDoc

if __name__ == "__main__":
    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."