946 |
946 |
947 tmpl = self.groups[groupName].getEntry(name) |
947 tmpl = self.groups[groupName].getEntry(name) |
948 tmpl.setDescription(description) |
948 tmpl.setDescription(description) |
949 tmpl.setTemplateText(template) |
949 tmpl.setTemplateText(template) |
950 self.__resort() |
950 self.__resort() |
951 |
951 |
|
952 # TODO: do the JSON templates |
952 def writeTemplates(self, filename=None): |
953 def writeTemplates(self, filename=None): |
953 """ |
954 """ |
954 Public method to write the templates data to an XML file (.e4c). |
955 Public method to write the templates data to an XML file (.e4c). |
955 |
956 |
956 @param filename name of a templates file to read (string) |
957 @param filename name of a templates file to read (string) |
975 TemplatesWriter(f, self).writeXML() |
976 TemplatesWriter(f, self).writeXML() |
976 f.close() |
977 f.close() |
977 |
978 |
978 return True |
979 return True |
979 |
980 |
|
981 # TODO: do the JSON templates |
980 def readTemplates(self, filename=None): |
982 def readTemplates(self, filename=None): |
981 """ |
983 """ |
982 Public method to read in the templates file (.e4c). |
984 Public method to read in the templates file (.e4c). |
983 |
985 |
984 @param filename name of a templates file to read (string) |
986 @param filename name of a templates file to read (string) |