-
Notifications
You must be signed in to change notification settings - Fork 31
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
Ability to delete a group #245
Comments
I see the need, too. It is also already possible to use the CLI's But I generally would prefer to have an option for overwriting existing groups and files instead. |
@mikegerber BTW you should also remove those file IDs in the //mets:structMap//mets:fptr[@FILEID=//mets:fileGrp[@USE='$filegrp_use']/mets:file/@ID] |
OK then, Probably should also have the equivalent for removing files then, i.e.
Like an option |
We already have |
No, I meant an option for Thus we can have repeated runs without even looking at which files and groups are affected.
IMHO, this depends on the above: if we get a simple way to repeat processing steps, then these removal operations would become but an extra, for special circumstances. So it would be okay to be cautious and have the user first delete all files (and file references!) – like But if (for some reason) we don't get some |
My current WIP workflow using ocrd-typegroups-classifier, ocrd-ocropy-segment & ocrd-tesserocr-recognize does not create any such references? |
I agree. |
But it See here |
It should do that when using the OcrdMets/OcrdFile APIs and specifying a Would it make sense to require the pageId to be set and fail if it is missing for all add operations? |
OLD:self.workspace.add_file(
ID=ID,
file_grp=self.output_file_grp,
mimetype=MIMETYPE_PAGE,
local_filename="%s/%s" % (self.output_file_grp, ID),
content=to_xml(pcgts)
) NEWself.workspace.add_file(
ID=ID,
file_grp=self.output_file_grp,
mimetype=MIMETYPE_PAGE,
local_filename="%s/%s" % (self.output_file_grp, ID),
content=to_xml(pcgts),
pageId=input_file.pageId
) |
Sorry, that was redundant. What @bertsky said |
I think it should be required for |
There are now (as of https://github.com/OCR-D/core/releases/tag/v1.0.0b13) two commands for this:
Programmatic access via Comment if you need further file removal capabilities in |
Sorry to bring this up so late, but could we make both the Also, would it be much extra effort to also provide |
make ID/GROUP arguments to remove/remove-group variadic, #245
IMO the current situation with removal is still unsatisfactory. We have I am currently exploring the possibility of makefileization for workflow configuration – squashing configuration syntax (including incremental parameters, what can be done in parallel, and what should be evaluated in the end) and engine logic (calculation of dependencies for rebuilding partially and parallel execution). For that alone the aforementioned changes would be highly valuable. |
To elaborate on
Neither of those can be scripted easily. |
And |
And a short option variant |
I'd like to note that the missing |
Same here. This not only complicates development. I also see it coming with the pilot users. |
I hear you, I'm on it. This, the TEMP-directory-on-validation and input-file-copying, and improving ocrd process are next on my agenda for core. |
Is it already possible to add all files of a directory as a new group, or would that require an |
No, you have to add files sequentially at the moment. I'll work on the
group removal tomorrow, maybe add-group isn't too complicated. We have the
need as well.
…On Mon, Jan 13, 2020, 20:47 Stefan Weil ***@***.***> wrote:
Is it already possible to add all files of a directory as a new group, or
would that require an add-group command?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#245?email_source=notifications&email_token=AACCXV2USLXTJKZXOHXGAHDQ5TAM3A5CNFSM4HZJDR32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI2BHCQ#issuecomment-573838218>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACCXV3DUAMNT6X5C47GF7DQ5TAM3ANCNFSM4HZJDR3Q>
.
|
improve workspace.remove_file/remove_group, #245
Removal Implemented in #409 |
ocrd workspace delete-group
could be a command to delete a group/fileGrp
in the workspace/METS file.My use case for this:
Currently, I use xmlstarlet to remove a group of files so that I can repeat a script run, i.e. to enable repeated (and almost idempotent) runs of the following:
The text was updated successfully, but these errors were encountered: