-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support remote images #52
Comments
BTW, that's also how most OCR-D processors handle this. They rely on |
See support_remote_images branch for progress |
One additional feature wish: A graceful way to handle failing downloads, e.g. showing just a placeholder image instead of crashing outright. This does happen in our collection for files in the <mets:fileGrp USE="PRESENTATION">
<mets:file ID="FILE_0001_PRESENTATION" MIMETYPE="image/tiff">
<mets:FLocat xmlns:xlink="http://www.w3.org/1999/xlink" LOCTYPE="URL" xlink:href="file:///goobi/tiff001/sbb/PPN680203753/00000001.tif"/>
</mets:file> I know that we should fix that on our side but that is not trivial to do and we're probably not the only ones (mis)using |
We frequently have the use-case where some (or even all) the file references have not been downloaded yet.
But these URL references for images make OcrdBrowser stumble:
That's because in …
browse-ocrd/ocrd_browser/model/document.py
Lines 175 to 176 in d6ff3f3
… we do not differentiate between an
OcrdFile
's.local_filename
(which may be empty) and its.url
. The latter could still be downloaded into thedocument.directory
under some name and returned here.Or perhaps one could somehow make this downloading a lazy operation only to be triggered when actually needed.
The text was updated successfully, but these errors were encountered: