1 # class to save/restore data from a BiaCV file and to export BiaCV to different
8 # initialize the data to an empty dictionary
11 # save the data into a file
12 def save_data (self
, filepath
):
13 json
.dump (self
.data
, file (filepath
, "w"), indent
=4)
15 # load the data from a file
16 def load_data (self
, filepath
):
17 self
.data
= json
.load (file (filepath
, "rb"))
19 # set the document title
20 def set_document_title (self
, title
):
21 self
.data
["title"] = title
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
43 # set the profile highlights
44 def set_profile (self
, listofprofilehighlights
):
45 self
.data
["profile"] = listofprofilehighlights
47 # set the educational qualifications
48 def set_educational_qualifications (self
, listofqualifications
):
49 self
.data
["educationalqualifications"] = listofqualifications
51 # set the professional history
52 def set_professional_history (self
, listofprofessionalhistory
):
53 self
.data
["professionalhistory"] = listofprofessionalhistory
55 # set the career objectives
56 def set_career_objectives (self
, listofshortterm
, listoflongterm
):
57 self
.data
["shorttermobjectives"] = listofshortterm
58 self
.data
["longtermgoals"] = listoflongterm
61 def set_skillsets (self
, listofskills
):
62 self
.data
["skillsets"] = listofskills
64 # set the additional information
65 def set_additional_information (self
, listoflanguages
, additionalinformation
):
66 self
.data
["languagesknown"] = listoflanguages
67 self
.data
["additionalinformation"] = additionalinformation