def work(self) -> bool:
        hathi_tiff_profile = imagevalidate.Profile(
            imagevalidate.get_profile('HathiTrust Tiff'))

        report = hathi_tiff_profile.validate(self._source_file)
        self.log(str(report))
        return True
    def work(self):
        hathi_tiff_profile = imagevalidate.Profile(
            imagevalidate.profiles.HathiTiff())

        report = hathi_tiff_profile.validate(self._source_file)
        self.log(str(report))
        return True
Beispiel #3
0
    def work(self) -> bool:
        self.log(f"Validating {self._filename}")

        profile_validator = imagevalidate.Profile(self._profile)

        try:
            report = profile_validator.validate(self._filename)
            is_valid = report.valid
            report_text = "\n* ".join(report.issues())
        except RuntimeError as e:
            is_valid = False
            report_text = str(e)
        self.log(f"Validating {self._filename} -- {is_valid}")

        result = {
            ResultValues.FILENAME: self._filename,
            ResultValues.VALID: is_valid,
            ResultValues.REPORT: f"* {report_text}"
        }

        self.set_results(result)
        return True