<div dir="ltr">Hi,<div><br></div><div>as promised, I tidied up the script I was talking about, and it is now available here:-</div><div>  <a href="https://github.com/graemeball/omero_scripts/blob/master/iomero.py">https://github.com/graemeball/omero_scripts/blob/master/iomero.py</a></div>
<div><br></div><div>It can be used as a command-line importer with options including file attachments; or alternatively, from a server-side python script or interactive python shell. It should be quite easy to modify to add additional features from the Blitz gateway. </div>
<div><br></div><div>Also, I incorporated the advice from this thread to retrieve the image Id from omero.cli.CLI rather than comparing all images before and after an upload.</div><div><br></div><div>Feel free to use, modify, and let me know if I could do something better.</div>
<div><br></div><div>Best Regards & Merry Christmas :-)</div><div><br></div><div>Graeme</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 10, 2013 at 2:35 PM, Josh Moore <span dir="ltr"><<a href="mailto:josh@glencoesoftware.com" target="_blank">josh@glencoesoftware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Graeme,<br>
<div class="im"><br>
On Dec 10, 2013, at 3:32 PM, Graeme Ball wrote:<br>
<br>
> The biggest problem is that the importer does not seem to return the ID of<br>
> the image after completing the upload, and you need this ID to add your<br>
> attachments etc.<br>
<br>
</div>The stdout from the CLI importer is the ID of the Pixels objects (as opposed<br>
to the Image objects). You can also pipe these values to a file for later<br>
consumption.<br>
<div class="im"><br>
<br>
> we wanted to do the same thing, and ended up writing a python script that<br>
> performs the upload in 2 steps:-<br>
> 1. upload the images using the command line importer (you can invoke it<br>
> from python)<br>
> 2. use the Blitz gateway to add attachments and annotations<br>
<br>
<br>
</div>Would you be up for sharing the script?<br>
<br>
Cheers,<br>
~Josh<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> Regards,<br>
><br>
> Graeme<br>
><br>
><br>
> On Tue, Dec 10, 2013 at 10:26 AM, John Webber (NBI)<br>
> <<a href="mailto:John.Webber@nbi.ac.uk">John.Webber@nbi.ac.uk</a>>wrote:<br>
><br>
>> Hi all,<br>
>><br>
>><br>
>><br>
>> I have been using the command line importer to import images into an Omero<br>
>> instance as follows:<br>
>><br>
>><br>
>><br>
>> bin/omero -s $RemoteHost -u "$User" -w "$Password" -p $Port import -d<br>
>> $Dataset $File<br>
>><br>
>><br>
>><br>
>> Can anyone let me know if I can also use this format of command to import<br>
>> ATTACHMENTS to specific images and, if so, please can you advise me of the<br>
>> correct syntax?<br>
>><br>
>><br>
>><br>
>> If it is not possible to import attachments to specific images, is anyone<br>
>> able to recommend how we can do a batch upload of images AND their<br>
>> attachments, into Omero?<br>
>><br>
>><br>
>> Thanks<br>
>><br>
>> John<br>
>><br>
<br>
</div></div></blockquote></div><br></div>