Added META-INFO to export template
[biacv.git] / biacv_exporter.py
index 2f9b522..1edb0e0 100644 (file)
@@ -10,6 +10,8 @@ import os.path
 class BiaCVExporter:
        def __init__ (self):
                self.data = {}
+               self.exporter_name = ""
+               self.export_filter = ""
 
        # set the document data
        def set_data (self, data):
@@ -210,6 +212,12 @@ class BiaCVExporter:
 
        # set the template directory and the files within
        def set_template_directory (self, templatedir):
+               # load the meta file for exporter title and name
+               file_meta = os.path.join (templatedir, "META-INFO")
+               lst_file_meta = (codecs.open (file_meta, 'r', "utf-8").read ()).splitlines ()
+               self.exporter_name = lst_file_meta[0]
+               self.export_filter = lst_file_meta[1]
+
                # set the template file names
 
                # main document template
@@ -232,6 +240,7 @@ class BiaCVExporter:
 
                self.lang_strings = lang_str.splitlines ()
 
+
        # set the output file
        def set_output (self, output):
                self.file_output = output