openmicroscopy/openmicroscopy — pull request #1929 by joshmoore (2013-12-19 20:01:39+00:00)
Title: In place import

In combination with https://github.com/joshmoore/omero-user-scripts/blob/in-place-import/InPlaceImport.py, this PR allows for in-place imports. There are several further changes that may should happen to that script:

* [ ] Permit `mv` rather than `ln -s`
* [ ] Add optional call to `chmod a-w`
* [ ] Allow specifying target dataset
* [ ] Properly fill in version info
* [ ] Allow globing

Once these are complete, it should may should be moved into the http://github.com/ome/scripts repository.

#### Dry runs ####
By default, execution simulates `bin/omero import -f` and lists which files *would* be imported. This allows the detection of directories with multiple filesets.

#### Testing ####
* `git clone https://github.com/joshmoore/omero-user-scripts.git lib/scripts/josh`
* `bin/omero script list`
* `bin/omero script launch /josh//InPlaceImport.py Path=/home/data/sample/leica-lif/Beta Catenin.lif Dry_Run=False`

#### Expected linkage ####
```
/OMERO/ManagedRepository/root_0/2013-12/19/20-42-18.901/data/sample/leica-lif$ ls -ltra
lrwxrwxrwx 1 jamoore jamoore 44 Dec 19 20:42 Beta Catenin.lif -> /home/data/sample/leica-lif/Beta\ Catenin.lif
...
```

#### Web example ####
![screenshot from 2013-12-19 20 53 19](https://f.cloud.github.com/assets/88113/1785596/45074d4a-68e7-11e3-9f38-a9fc6afe9dd7.png)