list_all_resources does not handle subdirectories well
See original GitHub issueIn ocrd_utils.list_all_resources
(used by a processor’s --list-resources
and resmgr’s --list-installed
), entries that are themselves directories do not get traversed recursively.
That’s okay if the processor takes directory resources (e.g. ocrd-calamari-recognize’s h5/json checkpoint dirs), but not if its resources are files in subdirectories (e.g. ocrd-tesserocr-recognize’s script/*.traineddata
or configs/*
).
So IMO a better behaviour would be to list all such directories recursively.
Issue Analytics
- State:
- Created 2 years ago
- Comments:22 (9 by maintainers)
Top Results From Across the Web
Get a list of resources from classpath directory - java
The first method described in this answer -- reading the path as a resource, does not seem to work when the resources are...
Read more >Listing all assets within a folder - Cloudinary Support
You can use the Admin API to list all resources contained within a specific folder (including sub-folders). Here's an example of how to...
Read more >Can you use DIR to list files in subfolders ? - MATLAB Answers
Would somebody be able to advise me on how to use DIR to find the dates that each file was last modified ......
Read more >Version Control with Git: Creating a Repository - NIST Pages
It is important to note that git init will create a repository that includes subdirectories and their files—there is no need to create...
Read more >Get list of subdirectories which contain a file whose name ...
More specifically, I am looking for directories which contain a file with the letter 'f' somewhere occurring in the file name. Ideally, the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey team! Please add your planning poker estimate with ZenHub @kba @lena-hinrichsen
Yes, I am sure. Clone of core is at 836eb05e791a196ea7f7e00b6f7438d74ebca582, I used
make install
, and venv reports:I can still see the directory entries.
speaking of which: in #792 I have added sorting via https://github.com/OCR-D/core/pull/792/commits/d108dd06392caed06286b2c3ebb7ac491581e6a7, but that only gives sorted output of
ocrd resmgr
, not ofTOOL -L
. So I should probably move the line toocrd_utils.list_all_resources