Пример #1
0
 def on_done(self, user_input):
     source_file_name = self.view.file_name()
     now = datetime.now()
     meta = Meta(created = now,
                 modified = now,
                 author = user_input,
                 createdWith = "SublimeHints editor v0.1",
                 createdTimestamp = datetime.fromtimestamp(os.path.getctime(source_file_name)),
                 modifiedTimestamp = datetime.fromtimestamp(os.path.getmtime(source_file_name)),
                 md5sum = hashlib.md5(open(source_file_name, 'rb').read()).hexdigest())
     hint_file = HintFile(meta, [], self.hints_file_name)
     hint_file.dump_json(self.view)