def snapshot(self, options): gp = GitParser() sn = Snapshot() image_path = sn.snapshot() im = ImageManipulator(image_path) im.add_text(gp.get_message('-1'), ImageManipulator.POSITION_BOTTOMLEFT, self.font_file, self.font_size) im.add_text(gp.get_hash('-1')[:10], ImageManipulator.POSITION_TOPRIGHT, self.font_file, self.font_size) im.save(self._get_snapshot_destination(options.destination))
def snapshot(self, options): self._load_repository_settings() gp = GitParser() sn = Snapshot(int(options.delay), options.device, int(options.skip_frames)) image_path = sn.snapshot() im = ImageManipulator(image_path) im.resize(options.image_size) im.add_text(gp.get_message('-1'), ImageManipulator.POSITION_BOTTOMLEFT, self.font_file, self.font_size) im.add_text(gp.get_hash('-1')[:10], ImageManipulator.POSITION_TOPRIGHT, self.font_file, self.font_size) im.save(self._get_snapshot_destination(options.destination))