<div dir="ltr">Hi John,<div><br></div><div>we wanted to do the same thing, and ended up writing a python script that performs the upload in 2 steps:-</div><div>1. upload the images using the command line importer (you can invoke it from python)</div>
<div>2. use the Blitz gateway to add attachments and annotations</div><div><br></div><div>The biggest problem is that the importer does not seem to return the ID of the image after completing the upload, and you need this ID to add your attachments etc. I resorted to the horrible hack of checking all image IDs before and after import, which can obviously go wrong if a lot of imports are happening at the same time. </div>
<div><br></div><div>Regards,</div><div><br></div><div>Graeme</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 10, 2013 at 10:26 AM, John Webber (NBI) <span dir="ltr"><<a href="mailto:John.Webber@nbi.ac.uk" target="_blank">John.Webber@nbi.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">Hi all,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have been using the command line importer to import images into an Omero instance as follows: 
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="text-indent:36.0pt">bin/omero -s $RemoteHost -u "$User" -w "$Password" -p $Port import -d $Dataset $File<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Can anyone let me know if I can also use this format of command to import ATTACHMENTS to specific images and, if so, please can you advise me of the correct syntax?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">If it is not possible to import attachments to specific images, is anyone able to recommend how we can do a batch upload of images AND their attachments, into Omero?<u></u><u></u></p>
<p class="MsoNormal"><br>
Thanks<u></u><u></u></p>
<p class="MsoNormal">John<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#4f81bd">-------------------------------------------------------------------------------------------------------------------------------------------- </span></b><span style="color:#0f126f"><u></u><u></u></span></p>

<p class="MsoNormal" style="line-height:12.0pt;background:white"><b><span style="font-family:"Arial","sans-serif";color:#548dd4">John Webber<br>
</span></b><span style="color:#1f497d">Computing and Information Services</span><span style="color:#0f126f"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d">NBI Partnership Ltd</span><span style="color:#0f126f"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d">Norwich Research park</span><span style="color:#0f126f"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d">Colney Lane</span><span style="color:#0f126f"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d">Norwich</span><span style="color:#0f126f"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d">NR4 7UH</span><span style="color:#0f126f"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d"> </span><span style="color:#0f126f"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d">E-Mail:</span><span>
</span><span style="color:#1f497d"><a href="mailto:john.webber@nbi.ac.uk" target="_blank"><span style="color:blue">john.webber@nbi.ac.uk</span></a></span><span style="color:#0f126f"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d">Web:</span><span>
</span><span style="color:#1f497d">    <a href="http://www.nbi.ac.uk/" target="_blank">
<span style="color:blue">http://www.nbi.ac.uk</span></a></span><span style="color:#0f126f"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d">Tel:</span><span>
</span><span style="color:#1f497d">        <a href="tel:%2B44%280%291603%20450%20818" value="+441603450818" target="_blank">+44(0)1603 450 818</a><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d">Helpdesk (Tel):  1234</span><span>
</span><span style="color:#1f497d">     HPC Support (Web):</span><span>
</span><span style="color:#1f497d">      <a href="http://hpc.nbi.ac.uk/" target="_blank">
<span style="color:blue">http://hpc.nbi.ac.uk</span></a>  (NBI  internal)<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span style="color:#1f497d">                                                HPC Support (Tel):</span><span>
</span><span style="color:#1f497d">          2003  (NBI internal)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><span style="color:#0f126f"><u></u><u></u></span></p>
<p class="MsoNormal"><i><span style="color:#1f497d">The NBI Partnership Ltd provides non-scientific services to the Institute of Food Research, the John Innes Centre, The Genome Analysis Centre and The Sainsbury Laboratory</span></i><span style="color:#0f126f"><u></u><u></u></span></p>

<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

<br>_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><br>
<br></blockquote></div><br></div>