X-Git-Url: https://harishankar.org/repos/?p=biacv.git;a=blobdiff_plain;f=biacv_data.py;fp=biacv_data.py;h=1146102b4fdf27d718f3fc79c11aed1edc3112f6;hp=010e6649f5d31c9a9ab7110fae889febae39ab5e;hb=bb028ebabf00111ec146cdd64b5cb5c8563bf09b;hpb=81bc09aa468845dfc26265a59bbd512c0d2eaa07 diff --git a/biacv_data.py b/biacv_data.py index 010e664..1146102 100644 --- a/biacv_data.py +++ b/biacv_data.py @@ -12,6 +12,10 @@ class BiaCVData: def save_data (self, filepath): json.dump (self.data, file (filepath, "w"), indent=4) + # load the data from a file + def load_data (self, filepath): + self.data = json.load (file (filepath, "rb")) + # set the document title def set_document_title (self, title): self.data["title"] = title