A small helper script, that creates the folder structure needed to register files as attachment to openBIS.
pip install attachi
pip install git+https://github.com/qbicsoftware/attachi-cli
or from a specific branch:
pip install git+https://github.com/qbicsoftware/attachi-cli@<branch>
> attachi --help
Usage: attachi [OPTIONS] PROJECTID FILE COMMENT
Attachi - A helper tool that prepares attachments for openBIS registration
Options:
-t, --atype TYPE Type of attachment: Information or Results (default)
-u, --user ID Username shown in openbis as uploader
-o, --outdir PATH Output folder path
--version Show the version and exit.
--help Show this message and exit.
While carriage return and new line symbols in the provided COMMENT are automatically replaced, it is good practice not to use them in the first place.
# Example
Creating the folder structure for an upload:
```python
attachi -u myusername QABCD README.md "this is a test for uploading the readme file"
#--> folder QABCD000AQ_20180627102707758164 is created
Use tar and dync to upload the file to openBIS:
tar -c QABCD000AQ_20180627102707758164 | dync -n QABCD000AQ_20180627102707758164.tar -k untar:True data.qbic.uni-tuebingen.de