<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi Yanling
<div><br>
</div>
<div>further information to the answer of Sebastien Besson below:</div>
<div><br>
</div>
<div>Please note that you have to take care about which group you are importing to (depends on the user you are importing-as).</div>
<div><br>
</div>
<div>You might want to switch the group. Please note that there is a bug, see&nbsp;</div>
<div>&nbsp;<a href="http://trac.openmicroscopy.org.uk/ome/ticket/12288">http://trac.openmicroscopy.org.uk/ome/ticket/12288</a>&nbsp;</div>
<div><br>
</div>
<div>For workaround, to be able to switch groups please follow following steps:</div>
<div><br>
</div>
<div>
<ul style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 24px; text-align: left; background-color: rgb(255, 255, 255); ">
<li><tt class="docutils literal" style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; letter-spacing: 0.01em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(221, 221, 221); color: rgb(51, 51, 51); background-image: none; "><span class="pre">bin/omero</span>&nbsp;<span class="pre">login</span>&nbsp;<span class="pre">--sudo=&lt;admin&gt;</span>&nbsp;<span class="pre">&lt;user&gt;@localhost</span></tt></li></ul>
<div>
<ul class="simple" style="color: rgb(0, 0, 102); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 24px; text-align: left; background-color: rgb(255, 255, 255); ">
<li><tt class="docutils literal" style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; letter-spacing: 0.01em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(221, 221, 221); color: rgb(51, 51, 51); background-image: none; "><span class="pre">bin/omero</span>&nbsp;<span class="pre">sessions</span>&nbsp;<span class="pre">group</span>&nbsp;<span class="pre">&lt;group_name&gt;</span></tt>&nbsp;-
 the output of which should be similar to:</li></ul>
<div class="highlight-python" style="color: rgb(0, 0, 102); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 24px; text-align: left; background-color: rgb(255, 255, 255); ">
<div class="highlight" style="background-color: rgb(238, 255, 204); background-position: initial initial; background-repeat: initial initial;">
<pre style="overflow-x: auto; overflow-y: hidden; font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; letter-spacing: 0.015em; line-height: 16px; padding: 0.5em; border: 1px solid rgb(204, 204, 204); background-color: rgb(241, 241, 241); max-width: none !important; ">Using session 5d7d8cd2-13e7-4a1d-988b-e65b02cf7f2f (user-8@localhost:4064). Current group: private-1
Group 'private-1' (id=7) switched to 'read-only-1' (id=8)</pre>
</div>
</div>
<div>
<ul class="simple" style="color: rgb(0, 0, 102); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 24px; text-align: left; background-color: rgb(255, 255, 255); ">
<li><tt class="docutils literal" style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; letter-spacing: 0.01em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(221, 221, 221); color: rgb(51, 51, 51); background-image: none; "><span class="pre">bin/omero</span>&nbsp;<span class="pre">import</span>&nbsp;<span class="pre">&lt;path/to/images&gt;</span></tt></li></ul>
<div>This should make sure you are importing for the &lt;user&gt; into the &lt;group_name&gt;.&nbsp;</div>
</div>
</div>
</div>
<div><br>
</div>
<div>All the best</div>
<div>Petr</div>
<div><br>
</div>
<div>
<blockquote type="cite">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>There is a workflow described in the ticket.</div>
<div><br>
</div>
<div>Cheers</div>
<div>Petr</div>
</div>
</blockquote>
</div>
<div><br>
<div>
<div>On 30 May 2014, at 10:24, Sebastien Besson &lt;<a href="mailto:s.besson@dundee.ac.uk">s.besson@dundee.ac.uk</a>&gt;</div>
<div>&nbsp;wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi Yanling,
<div><br>
</div>
<div>Yes the --sudo flag was also part of the 5.0.2 release and definitely applies to the import.</div>
<div>So you should be able to call the following to perform a import-as operation via CLI:</div>
<div><br>
</div>
<div>$ bin/omero import --sudo root -d 'Dataset:51' -s localhost -u user /path_to_file</div>
<div><br>
</div>
<div>Note that this functionality is currently restricted to admins although we plan to extend</div>
<div>it to group owners in the future.</div>
<div><br>
</div>
<div>Sebastien</div>
<div><br>
</div>
<div>
<div>
<div><br>
</div>
<div>On 29 May 2014, at 20:18, Yanling Liu &lt;<a href="mailto:vrnova@gmail.com">vrnova@gmail.com</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hello Sebastien,<br>
<br>
</div>
Thanks for your message. I have performed OMERO upgrade to 5.0.2. The bin/omero obj command worked as described. Great!<br>
</div>
<br>
</div>
I can see the obj command has the option to create projects for other users with --sudo flag. Does the flag apply to bin/omero import too? In other words, can I import data as administrator for other users without typing each user's password using bin/omero
 import?<br>
<br>
I have tried to do following command but failed, of course dataset #51 does not belong to the root user.<br>
<br>
bin/omero import -d 'Dataset:51' -s localhost -u root /path_to_file<br>
<br>
</div>
Thanks,<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, May 29, 2014 at 11:06 AM, Sebastien Besson <span dir="ltr">
&lt;<a href="mailto:s.besson@dundee.ac.uk" target="_blank">s.besson@dundee.ac.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi Yanling,
<div><br>
</div>
<div>as part of the last 5.0.2 release of OMERO, the CLI now supports a new `obj` command [1].</div>
<div>This command allows the creation of containers amongst other things. As an example, the</div>
<div>creation of projects and datasets should now be achievable via</div>
<div><br>
</div>
<div>$ bin/omero obj new Project name=project</div>
<div>$ bin/omero obj new Dataset name=dataset</div>
<div>
<div><br>
</div>
<div>As an aside, we have started working on a script to setup our training material which combines</div>
<div>`bin/omero obj` and `bin/omero import` and may be informative:</div>
<div><a href="https://github.com/openmicroscopy/openmicroscopy/pull/2561/files" target="_blank">https://github.com/openmicroscopy/openmicroscopy/pull/2561/files</a></div>
<div>Note our next step is the extension of the CLI documentation [2] to add some description on this</div>
<div>command and its usage.</div>
<div><br>
</div>
<div>Best,</div>
<div>Sebastien</div>
<div><br>
</div>
<div>
<pre>[1] <a href="http://www.openmicroscopy.org/site/support/omero5/sysadmins/server-webstart-codesigning.html" target="_blank">https://github.com/openmicroscopy/openmicroscopy/pull/2409</a></pre>
<pre>[2] <a href="http://www.openmicroscopy.org/site/support/omero5/users/command-line-interface.html" target="_blank">http://www.openmicroscopy.org/site/support/omero5/users/command-line-interface.html</a></pre>
<pre><br></pre>
<div><br>
</div>
<div>
<div>
<div class="h5">
<div>On 29 May 2014, at 15:50, Yanling Liu &lt;<a href="mailto:vrnova@gmail.com" target="_blank">vrnova@gmail.com</a>&gt; wrote:</div>
<br>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">
<div>
<div>
<div>Hello,<br>
<br>
</div>
Is it possible to create new project and dataset in CLI import? <br>
<br>
For example, it would be great if I can use following command to import a set of images to a user while creating new project and dataset on the fly.<br>
<br>
</div>
bin/omero -s localhost -u user import path_to_file -project project_name_or_id -dataset dataset_name_or_id<br>
<br>
</div>
The reason I am asking is because we have 10TB existing images to be imported into OMERO. Create new project and dataset and import images into them would save us a lot of time.<br>
<br>
Thanks,<br>
Yanling<br>
</div>
</div>
</div>
_______________________________________________<br>
ome-devel mailing list<br>
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" target="_blank">ome-devel@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel</a><br>
</blockquote>
</div>
<br>
</div>
</div>
<br>
<br>
<div><span style="border-collapse:separate;border-spacing:0px">
<div style="word-wrap:break-word"><span style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<div style="word-wrap:break-word">
<div>Dr Sébastien Besson</div>
<div>Open Microscopy Environment / Harvard Medical School</div>
<div>Wellcome Trust Centre for Gene Regulation and Expression,</div>
<div>College of Life Sciences, University of Dundee, Dow Street,</div>
<div>Dundee DD1 5EH Scotland UK &nbsp; Tel: (01382) 386364</div>
</div>
</span></div>
</span></div>
<br>
<br>
<span style="font-size:10pt">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
<br>
<div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>Dr Sébastien Besson</div>
<div>Open Microscopy Environment / Harvard Medical School</div>
<div>Wellcome Trust Centre for Gene Regulation and Expression,</div>
<div>College of Life Sciences, University of Dundee, Dow Street,</div>
<div>Dundee DD1 5EH Scotland UK &nbsp; Tel: (01382) 386364</div>
</div>
</span></div>
</span></span></div>
<br>
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</div>
_______________________________________________<br>
ome-devel mailing list<br>
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk">ome-devel@lists.openmicroscopy.org.uk</a><br>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel<br>
</blockquote>
</div>
<br>
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>