Mercurial > dive4elements > river
view artifacts/contrib/find-obsolete-i18n-strings.py @ 8748:36d7bda0b47a
(issue1788) Fix area split if there are no NaN's in the data
The split algorithmn splits in a way that it always creates
at least two datasets. One before the NaN, one after the NaN.
This is broken in case the dataset does not contain any NaN
value as it resulted in two identical datasets. This changed
the display and resulted in a broken area calculation.
I've also added some commented out debug code that was helpful
tracking down this problem.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 08 Jun 2015 16:53:54 +0200 |
parents | 26971f97105f |
children |
line wrap: on
line source
#!/usr/bin/env python import os import re import sys KEY_RE = re.compile(r"^\s*([^\s=]+)\s*=.*$") def main(): content = [] for root, dirs, files in os.walk('.'): for f in files: if not (f.endswith(".java") or f.endswith(".xml")): continue p = os.path.join(root, f) with open(p, "rb") as jf: content.append(jf.read()) content = ''.join(content) for arg in sys.argv[1:]: with open(arg, "rb") as prop: for line in prop: m = KEY_RE.match(line) if not m: continue key = m.group(1) if content.find(key) == -1: print key if __name__ == "__main__": main()