Completed default XHTML template for exporter
[biacv.git] / biacv_exporter.py
1 # class to export data in BiaCV native format to any external format as
2 # specified by a template set. The final document is produced by putting
3 # together the template "bits" into a single document and filling in the
4 # document fields.
5
6 import string.Template
7
8 class BiaCVExporter:
9 def __init__ (self):
10 self.data = {}
11
12 # set the document data
13 def set_data (self, data):
14 # document data
15 self.data = data
16
17 # set the template directory and the files within
18 def set_template_directory (self, templatedir):
19 # set the template file names
20
21 # main document template
22 self.fil_main = os.path.join (templatedir, "main.tpl")
23 # education qualification bit
24 self.fil_education = os.path.join (templatedir, "education_bit.tpl")
25 # profession history bit
26 self.fil_profession = os.path.join (templatedir, "profession_bit.tpl")
27 # career list bit
28 self.fil_career = os.path.join (templatedir, "career_bit.tpl")
29 # skills bit
30 self.fil_skills = os.path.join (templatedir, "skill_bit.tpl")
31 # languages learned bit
32 self.fil_language = os.path.join (templatedir, "language_bit.tpl")
33
34 # set the output file
35 def set_output (self, output):
36 self.file_output = output