diff --git a/src/caosadvancedtools/loadFiles.py b/src/caosadvancedtools/loadFiles.py index 405b3d135c8af89e32c74015bd04f76f21828e20..77872d1dfe896688e54285551ba2e4eb9a02af99 100755 --- a/src/caosadvancedtools/loadFiles.py +++ b/src/caosadvancedtools/loadFiles.py @@ -190,7 +190,26 @@ def main(argv=None): sys.argv.extend(argv) # Setup argument parser - parser = ArgumentParser() + parser = ArgumentParser(description=""" +Make files that the LinkAhead server can see available als FILE entities. + +In a typical scenario where LinkAhead runs in a Docker container and a host directory `mydir` is +mounted as an extroot with name `myext`, loadfiles could be called like this: + +> loadFiles -p foo /opt/caosdb/mnt/extroot/myext/ + +This call would result in + +1. On the LinkAhead server: There are FILE entities for all files in `mydir`. +2. In the `caosroot` directory inside the Docker image, there are symlinks like this: + + foo/myext/somefile.txt -> /opt/caosdb/mnt/extroot/myext/somefile.txt + foo/myext/dir/other.bin -> /opt/caosdb/mnt/extroot/myext/dir/other.bin + +The FILE entity for `somefile.txt` for example now has the path "foo/myext/somefile.txt" and its +content can be retrieved via LinkAhead's API. + +""", formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument("-p", "--prefix", dest="prefix", help="store files with this prefix into the server's" " file system.")