Пример #1
0
 def has_changed(self):
     new_checksum = hashlib.md5(Utils.file_content(self.path,
                                                   'ascii')).hexdigest()
     changed = self.checksum != new_checksum
     self.checksum = new_checksum
     return changed
Пример #2
0
 def has_changed(self):
     new_checksum = hashlib.md5( Utils.file_content(self.path, 'ascii') ).hexdigest()
     changed = self.checksum != new_checksum
     self.checksum = new_checksum
     return changed
Пример #3
0
 def generate(self, pagedir, templatefile, newfile):           
     html = self._create_new_html(pagedir, Utils.file_content(templatefile))
     newfile_obj = codecs.open(newfile, 'w', encoding='utf-8')
     newfile_obj.write(html)
     newfile_obj.close()
     return html