010e6649f5d31c9a9ab7110fae889febae39ab5e
[biacv.git] / biacv_data.py
1 # class to save/restore data from a BiaCV file and to export BiaCV to different
2 # formats
3
4 import json
5
6 class BiaCVData:
7 def __init__ (self):
8 # initialize the data to an empty dictionary
9 self.data = {}
10
11 # save the data into a file
12 def save_data (self, filepath):
13 json.dump (self.data, file (filepath, "w"), indent=4)
14
15 # set the document title
16 def set_document_title (self, title):
17 self.data["title"] = title
18
19 # set personal information from gui
20 def set_personal_info (self, nametitle, firstname, lastname, dateofbirth,
21 street, area, city, areacode, countrycode_landline, landline,
22 countrycode_mobile, mobile, email, maritalstatus):
23 self.data["nametitle"] = nametitle
24 self.data["firstname"] = firstname
25 self.data["lastname"] = lastname
26 self.data["dateofbirth"] = dateofbirth
27 self.data["street"] = street
28 self.data["area"] = area
29 self.data["city"] = city
30 self.data["areacode"] = areacode
31 self.data["countrycode_landline"] = countrycode_landline
32 self.data["landline"] = landline
33 self.data["countrycode_mobile"] = countrycode_mobile
34 self.data["mobile"] = mobile
35 self.data["email"] = email
36 self.data["maritalstatus"] = maritalstatus
37
38 # set the educational qualifications
39 def set_educational_qualifications (self, listofqualifications):
40 self.data["educationalqualifications"] = listofqualifications
41
42 # set the professional history
43 def set_professional_history (self, listofprofessionalhistory):
44 self.data["professionalhistory"] = listofprofessionalhistory
45
46 # set the career objectives
47 def set_career_objectives (self, listofshortterm, listoflongterm):
48 self.data["shorttermobjectives"] = listofshortterm
49 self.data["longtermgoals"] = listoflongterm
50
51 # set the skill sets
52 def set_skillsets (self, listofskills):
53 self.data["skillsets"] = listofskills
54
55 # set the additional information
56 def set_additional_information (self, listoflanguages, additionalinformation):
57 self.data["languagesknown"] = listoflanguages
58 self.data["additionalinformation"] = additionalinformation