Added Profile highlights as an additional field
[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 # load the data from a file
16 def load_data (self, filepath):
17 self.data = json.load (file (filepath, "rb"))
18
19 # set the document title
20 def set_document_title (self, title):
21 self.data["title"] = title
22
23 # set personal information from gui
24 def set_personal_info (self, nametitle, firstname, lastname, dateofbirth,
25 street, area, city, areacode, country, countrycode_landline, landline,
26 countrycode_mobile, mobile, email, maritalstatus):
27 self.data["nametitle"] = nametitle
28 self.data["firstname"] = firstname
29 self.data["lastname"] = lastname
30 self.data["dateofbirth"] = dateofbirth
31 self.data["street"] = street
32 self.data["area"] = area
33 self.data["city"] = city
34 self.data["areacode"] = areacode
35 self.data["country"] = country
36 self.data["countrycode_landline"] = countrycode_landline
37 self.data["landline"] = landline
38 self.data["countrycode_mobile"] = countrycode_mobile
39 self.data["mobile"] = mobile
40 self.data["email"] = email
41 self.data["maritalstatus"] = maritalstatus
42
43 # set the profile highlights
44 def set_profile (self, listofprofilehighlights):
45 self.data["profile"] = listofprofilehighlights
46
47 # set the educational qualifications
48 def set_educational_qualifications (self, listofqualifications):
49 self.data["educationalqualifications"] = listofqualifications
50
51 # set the professional history
52 def set_professional_history (self, listofprofessionalhistory):
53 self.data["professionalhistory"] = listofprofessionalhistory
54
55 # set the career objectives
56 def set_career_objectives (self, listofshortterm, listoflongterm):
57 self.data["shorttermobjectives"] = listofshortterm
58 self.data["longtermgoals"] = listoflongterm
59
60 # set the skill sets
61 def set_skillsets (self, listofskills):
62 self.data["skillsets"] = listofskills
63
64 # set the additional information
65 def set_additional_information (self, listoflanguages, additionalinformation):
66 self.data["languagesknown"] = listoflanguages
67 self.data["additionalinformation"] = additionalinformation