Parser of berki style problems and generator of latex file
Samo Penic
2018-11-24 e0e8d373e6ebd897010753d0259468b68509a5bf
Added some changes in parser and string variable to allow strings as variables.
3 files modified
10 ■■■■ changed files
aoi_gen/BerkiParse.py 4 ●●●● patch | view | raw | blame | history
aoi_gen/Generators.py 2 ●●● patch | view | raw | blame | history
aoi_gen/Variable.py 4 ●●●● patch | view | raw | blame | history
aoi_gen/BerkiParse.py
@@ -104,7 +104,7 @@
                "unit": None,
            }
            for r in s.split("\n"):
                sp = r.split(":")
                sp = r.split(":", 1)
                if sp[0].strip("\n\t'") == "formula":
                    retval["correct"].append(sp[1].strip("\n\t"))
                elif sp[0].strip() == "napacna":
@@ -128,7 +128,7 @@
                "generator": None,
            }
            for r in v.split("\n"):
                sp = r.split(":")
                sp = r.split(":", 1)
                if sp[0].strip("\n\t'") == "ime":
                    name = sp[1].strip("\n\t'")
                    retval["name"] = name
aoi_gen/Generators.py
@@ -27,7 +27,7 @@
            )
        try:
            self.pool = [float(i) for i in arglist]
            self.pool = [i for i in arglist]
        except (ValueError, TypeError):
            raise ValueError
aoi_gen/Variable.py
@@ -108,10 +108,10 @@
        pass
    def toFormat(self, string):
        return string
        return string.replace("\"", "")
    def getValue(self, string):
        return string
        return "\"{}\"".format(str(string.replace("\"", "")))
class DecFloatFormatter(FormatterFactory):
    def __init__(self, formatparameters):