hnesk/browse-ocrd

use last fileGrp as default

Closed this issue · 3 comments

def use_file_group(self) -> str:
return 'OCR-D-IMG'

This often does not exist in real life (DFG profile has DEFAULT or MAX or ORIGINAL), and has empty PAGE XML anyway. So IMO it would make more sense to pick the last fileGrp with PAGE-XML mimetype by default.

(Or even better, make this configurable as well, like the default image fileGrp.)

hnesk commented

The method use_file_goup() is just the fallback, if not overridden in subclasses. For nearly all subclasses there is a property file_group that will be used instead. I changed the configurator to always select the last entry now.
Keeping the ticket open for making file_group selection also configurable.

For nearly all subclasses there is a property file_group that will be used instead.

Oh right! Sry, forgot all about that.

I changed the configurator to always select the last entry now.

Thank you!

I changed the configurator to always select the last entry now.

Thank you!

Which did of course solve the issue.