question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to delete a group

See original GitHub issue

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:

remove_filegrp() {
  filegrp_use=$1
  mets=$2

  xmlstarlet ed --inplace \
    -N mets=http://www.loc.gov/METS/ \
    -d "//mets:fileGrp[@USE='$filegrp_use']" $mets
}

remove_filegrp OCR-D-SEG-LINE mets.xml
ocrd-ocropy-segment -l DEBUG -m mets.xml -I OCR-D-IMG -O OCR-D-SEG-LINE

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:24 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
kbacommented, Nov 6, 2019

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.

2reactions
bertskycommented, Jun 20, 2019

Like an option --overwrite/–force for ocrd workspace add?

We already have --force (“If file with ID already exists, replace it”). What behavior changes do you want here?

No, I meant an option for ocrd process and all individual module processor CLIs. (The --force option is not exposed to those CLIs.)

Thus we can have repeated runs without even looking at which files and groups are affected.

OK then, ocrd workspace rm-group shouldn’t be too hard to implement. Should this behave like rmdir and only delete empty fileGroups or like rm -r and also delete non-empty fileGroups?

Probably should also have the equivalent for removing files then, i.e. ocrd workspace rm. What do you think?

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 rm – and then empty groups – like rmdir.

But if (for some reason) we don’t get some ocrd process -f, then removal should be easy to use – like rm -fr.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Delete a group from your organization - Google Support
Point to the group you want to delete and click More and then Delete group. Click Delete group. To delete multiple groups: Check...
Read more >
Add ability to delete groups (for H admins only) #507 - GitHub
I seem to recall hearing that deleting groups was non-trivial, but I hesitate to add the ability to add groups in the UI...
Read more >
Delete a group in Outlook - Microsoft Support
Open the Outlook mobile app. · Select Groups from the folder pane. · Tap the name of the group that you want to...
Read more >
How to delete a Facebook group on desktop or mobile
Facebook group owners can delete a group by first removing all members. Once the owner is the only person in a group, then...
Read more >
Best practices for deleting groups - Zendesk help
You should take the following steps to delete groups cleanly: ... group to a specific agent, you will not be able to delete...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found