mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-07-14 21:39:55 +02:00
Merge 032a99ef11
into 899bb9f00c
This commit is contained in:
commit
308fb3e352
1 changed files with 6 additions and 2 deletions
|
@ -42,7 +42,11 @@ class EynollahProcessor(Processor):
|
|||
page = pcgts.get_Page()
|
||||
# XXX loses DPI information
|
||||
# page_image, _, _ = self.workspace.image_from_page(page, page_id, feature_filter='binarized')
|
||||
image_filename = self.workspace.download_file(next(self.workspace.mets.find_files(url=page.imageFilename))).local_filename
|
||||
if not('://' in page.imageFilename):
|
||||
image_filename = next(self.workspace.mets.find_files(local_filename=page.imageFilename)).local_filename
|
||||
else:
|
||||
# could be a URL with file:// or truly remote
|
||||
image_filename = self.workspace.download_file(next(self.workspace.mets.find_files(url=page.imageFilename))).local_filename
|
||||
eynollah_kwargs = {
|
||||
'dir_models': self.resolve_resource(self.parameter['models']),
|
||||
'allow_enhancement': False,
|
||||
|
@ -54,7 +58,7 @@ class EynollahProcessor(Processor):
|
|||
'override_dpi': self.parameter['dpi'],
|
||||
'logger': LOG,
|
||||
'pcgts': pcgts,
|
||||
'image_filename': image_filename
|
||||
'image_filename': str(image_filename)
|
||||
}
|
||||
Eynollah(**eynollah_kwargs).run()
|
||||
file_id = make_file_id(input_file, self.output_file_grp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue