X-Git-Url: https://harishankar.org/repos/?p=biacv.git;a=blobdiff_plain;f=biacv_exporter.py;fp=biacv_exporter.py;h=43bc6351dbf709243653be864978a98b3adefcd5;hp=0000000000000000000000000000000000000000;hb=12735f250b64468c4fb88d37d1952e99e7da3594;hpb=f6d9890395dacdd0a56a196cb339752b471f18e8 diff --git a/biacv_exporter.py b/biacv_exporter.py new file mode 100644 index 0000000..43bc635 --- /dev/null +++ b/biacv_exporter.py @@ -0,0 +1,36 @@ +# class to export data in BiaCV native format to any external format as +# specified by a template set. The final document is produced by putting +# together the template "bits" into a single document and filling in the +# document fields. + +import string.Template + +class BiaCVExporter: + def __init__ (self): + self.data = {} + + # set the document data + def set_data (self, data): + # document data + self.data = data + + # set the template directory and the files within + def set_template_directory (self, templatedir): + # set the template file names + + # main document template + self.fil_main = os.path.join (templatedir, "main.tpl") + # education qualification bit + self.fil_education = os.path.join (templatedir, "education_bit.tpl") + # profession history bit + self.fil_profession = os.path.join (templatedir, "profession_bit.tpl") + # career list bit + self.fil_career = os.path.join (templatedir, "career_bit.tpl") + # skills bit + self.fil_skills = os.path.join (templatedir, "skill_bit.tpl") + # languages learned bit + self.fil_language = os.path.join (templatedir, "language_bit.tpl") + + # set the output file + def set_output (self, output): + self.file_output = output