示例#1
0
 def publish(self, filepath=""):
     """Saves the entry to webroot"""
     if filepath != "":
         writefile(filepath, self.template_contents)
     else:
         self._createdir()
         self._createfile()
示例#2
0
 def publish(self, filepath=""):
     """Saves the entry to webroot"""
     if filepath != "":
         writefile(filepath, self.template_contents)
     else:
         self._createdir()
         self._createfile()
示例#3
0
 def _createfile(self):
     outfile = WWWDIR
     if self.year != "" and self.month != "" and self.day != "":
         outfile = os.path.join(outfile, self.year, self.month, self.day)
     outfile = outfile + "/" + self.filename + ".html"
     writefile(outfile, self.template_contents)
示例#4
0
 def _createfile(self):
     outfile = WWWDIR
     if self.year != "" and self.month != "" and self.day != "":
         outfile = os.path.join(outfile, self.year, self.month, self.day)
     outfile = outfile + "/" + self.filename + ".html"
     writefile(outfile, self.template_contents)