$ pycsw-admin.py -c load_records -f path/to/default.cfg -p /path/to/metadata -r
- no form key/value pairs
- client opens HTTP connection and send XML directly
Using pycsw-admin.py:
$ pycsw-admin.py -c post_xml -u http://labs.gatewaygeomatics.com/csw -x /path/to/request.xml
Using curl:
$ curl -H "Content-Type: text/xml" -X POST -d @request_file.xml http://labs.gatewaygeomatics.com/csw
$ GET "http://labs.gatewaygeomatics.com/csw?service=CSW&version=2.0.2&request=GetRepositoryItem&id=urn:uuid:9a669547-b69b-469f-a11f-2d875366bbdc"
$ pycsw-admin.py -c optimize_db
By default, pycsw loads default.cfg at runtime. To load an alternate configuration, modify csw.py to point to the desired configuration. Alternatively, pycsw supports explicitly specifiying a configuration by appending config=/path/to/default.cfg to the base URL of the service (e.g. http://localhost/pycsw/csw.py?config=tests/suites/default/default.cfg&service=CSW&version=2.0.2&request=GetCapabilities). When the config parameter is passed by a CSW client, pycsw will override the default configuration location and subsequent settings with those of the specified configuration.
This also provides the functionality to deploy numerous CSW servers with a single pycsw installation.