1
2
3
4
5
6
7
8
9 """
10 chgrp plugin
11
12 Plugin read by omero.cli.Cli during initialization. The method(s)
13 defined here will be added to the Cli class for later use.
14 """
15
16 from omero.cli import CLI, GraphControl, ExperimenterGroupArg
17 import sys
18
19 HELP = """Move data between groups
20
21 Example Usage:
22
23 omero chgrp 101 /Image:1 # Move all of Image 1 to \
24 group 101
25 omero chgrp Group:101 /Image:1 # Move all of Image 1 to \
26 group 101
27 omero chgrp ExperimenterGroup:101 /Image:1 # Move all of Image 1 to \
28 group 101
29 omero chgrp "My Lab" /Image:1 # Move all of Image 1 to \
30 group "myLab"
31
32 omero chgrp --edit 101 /Image:1 # Open an editor with all \
33 the chgrp
34 # options filled out with \
35 defaults.
36
37 omero chgrp --opt /Image:KEEP /Plate:1 # Calls chgrp on Plate, \
38 leaving all
39 # images in the previous group.
40
41 What data is moved is the same as that which would be deleted by a similar
42 call to "omero delete /Image:1"
43
44 """
45
46
64
65 try:
66 register("chgrp", ChgrpControl, HELP)
67 except NameError:
68 if __name__ == "__main__":
69 cli = CLI()
70 cli.register("chgrp", ChgrpControl, HELP)
71 cli.invoke(sys.argv[1:])
72