@ -37,6 +37,7 @@ class EynollahProcessor(Processor):
page_id = input_file . pageId or input_file . ID
page_id = input_file . pageId or input_file . ID
LOG . info ( " INPUT FILE %s ( %d / %d ) " , page_id , n + 1 , len ( self . input_files ) )
LOG . info ( " INPUT FILE %s ( %d / %d ) " , page_id , n + 1 , len ( self . input_files ) )
pcgts = page_from_file ( self . workspace . download_file ( input_file ) )
pcgts = page_from_file ( self . workspace . download_file ( input_file ) )
print ( ' width %s height %s ' % ( pcgts . get_Page ( ) . imageWidth , pcgts . get_Page ( ) . imageHeight ) )
self . add_metadata ( pcgts )
self . add_metadata ( pcgts )
page = pcgts . get_Page ( )
page = pcgts . get_Page ( )
# XXX loses DPI information
# XXX loses DPI information
@ -44,7 +45,7 @@ class EynollahProcessor(Processor):
image_filename = self . workspace . download_file ( next ( self . workspace . mets . find_files ( url = page . imageFilename ) ) ) . local_filename
image_filename = self . workspace . download_file ( next ( self . workspace . mets . find_files ( url = page . imageFilename ) ) ) . local_filename
eynollah_kwargs = {
eynollah_kwargs = {
' dir_models ' : self . resolve_resource ( self . parameter [ ' models ' ] ) ,
' dir_models ' : self . resolve_resource ( self . parameter [ ' models ' ] ) ,
' allow_enhancement ' : self . parameter [ ' allow_enhancement ' ] ,
' allow_enhancement ' : False ,
' curved_line ' : self . parameter [ ' curved_line ' ] ,
' curved_line ' : self . parameter [ ' curved_line ' ] ,
' full_layout ' : self . parameter [ ' full_layout ' ] ,
' full_layout ' : self . parameter [ ' full_layout ' ] ,
' allow_scaling ' : self . parameter [ ' allow_scaling ' ] ,
' allow_scaling ' : self . parameter [ ' allow_scaling ' ] ,