diff options
author | Chris Little <chrislit@crosswire.org> | 2013-07-24 08:15:38 +0000 |
---|---|---|
committer | Chris Little <chrislit@crosswire.org> | 2013-07-24 08:15:38 +0000 |
commit | 11db97d39d5b6ba53a476b772ae1861a17a7bf8d (patch) | |
tree | 2e0e16ed055bd54e573d2b689542feecbdbc9791 /versification/validate_v11n.py | |
parent | 05a0624cb71faf97fe553bca52129267b5df6d14 (diff) | |
download | sword-tools-11db97d39d5b6ba53a476b772ae1861a17a7bf8d.tar.gz |
bug fixes (wrong comment symbol used; failed to reset counts for each file)
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@443 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'versification/validate_v11n.py')
-rw-r--r-- | versification/validate_v11n.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/versification/validate_v11n.py b/versification/validate_v11n.py index 108f18f..3a76bf8 100644 --- a/versification/validate_v11n.py +++ b/versification/validate_v11n.py @@ -8,12 +8,12 @@ if not files: print 'Usage: ' + sys.argv[0] + ' <canon.h-style file(s)>' exit() -booksChapters = 0 -vmChapters = 0 - for fn in files: f = open(fn).readlines() + booksChapters = 0 + vmChapters = 0 + inBooks = False inVm = False @@ -23,7 +23,7 @@ for fn in files: # [on]tbooks[]. In general, it assumes canon files that look like what # we include in the library and generate from v11nsys.pl. - l = re.sub(r'#.*', '', l) + l = re.sub(r'//.*', '', l) l = re.sub(r'\s*$', '', l) if l: @@ -42,4 +42,4 @@ for fn in files: match = re.findall(r'\d+,?', l) vmChapters += len(match) - print fn + ' is ' + ('' if booksChapters == vmChapters else 'not ') + 'valid: ' + str(booksChapters) + ':' + str(vmChapters) +'\n' + print fn + ' is ' + ('' if booksChapters == vmChapters else 'not ') + 'valid: ' + str(booksChapters) + ':' + str(vmChapters) |