def publish(self, filepath=""): """Saves the entry to webroot""" if filepath != "": writefile(filepath, self.template_contents) else: self._createdir() self._createfile()
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)