X-Git-Url: https://harishankar.org/repos/?p=biacv.git;a=blobdiff_plain;f=biacv_exporter.py;fp=biacv_exporter.py;h=1edb0e018355f951ac1f7931fe5253748130bb74;hp=2f9b522c6ecbe9c9bc61873757cca1bafece6811;hb=0182823c70c5e1ddf7b8343903201a85e1885e9e;hpb=71764e7ccb7d8a2085c0d984b37e4895a53407df diff --git a/biacv_exporter.py b/biacv_exporter.py index 2f9b522..1edb0e0 100644 --- a/biacv_exporter.py +++ b/biacv_exporter.py @@ -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