X-Git-Url: https://harishankar.org/repos/?p=biacv.git;a=blobdiff_plain;f=biacv_data.py;fp=biacv_data.py;h=010e6649f5d31c9a9ab7110fae889febae39ab5e;hp=0000000000000000000000000000000000000000;hb=2ea1c764b6ce60b55bb3f44e3f8f121933b66d29;hpb=cbb2972b6b829a3c38cfac1a41ed44db29524550 diff --git a/biacv_data.py b/biacv_data.py new file mode 100644 index 0000000..010e664 --- /dev/null +++ b/biacv_data.py @@ -0,0 +1,58 @@ +# class to save/restore data from a BiaCV file and to export BiaCV to different +# formats + +import json + +class BiaCVData: + def __init__ (self): + # initialize the data to an empty dictionary + self.data = {} + + # save the data into a file + def save_data (self, filepath): + json.dump (self.data, file (filepath, "w"), indent=4) + + # set the document title + def set_document_title (self, title): + self.data["title"] = title + + # set personal information from gui + def set_personal_info (self, nametitle, firstname, lastname, dateofbirth, + street, area, city, areacode, countrycode_landline, landline, + countrycode_mobile, mobile, email, maritalstatus): + self.data["nametitle"] = nametitle + self.data["firstname"] = firstname + self.data["lastname"] = lastname + self.data["dateofbirth"] = dateofbirth + self.data["street"] = street + self.data["area"] = area + self.data["city"] = city + self.data["areacode"] = areacode + self.data["countrycode_landline"] = countrycode_landline + self.data["landline"] = landline + self.data["countrycode_mobile"] = countrycode_mobile + self.data["mobile"] = mobile + self.data["email"] = email + self.data["maritalstatus"] = maritalstatus + + # set the educational qualifications + def set_educational_qualifications (self, listofqualifications): + self.data["educationalqualifications"] = listofqualifications + + # set the professional history + def set_professional_history (self, listofprofessionalhistory): + self.data["professionalhistory"] = listofprofessionalhistory + + # set the career objectives + def set_career_objectives (self, listofshortterm, listoflongterm): + self.data["shorttermobjectives"] = listofshortterm + self.data["longtermgoals"] = listoflongterm + + # set the skill sets + def set_skillsets (self, listofskills): + self.data["skillsets"] = listofskills + + # set the additional information + def set_additional_information (self, listoflanguages, additionalinformation): + self.data["languagesknown"] = listoflanguages + self.data["additionalinformation"] = additionalinformation