Create and upload example compendia for the o2r API
1.4K
Bagtainers drafts can be found in numbered subdirectories (ordered by creation date). The documentation of each level of the development is in the file INDEX.md.
You can also simply run the latest container available on Docker Hub with
docker run --rm o2r-project/examplecompendia -a http://172.17.0.1/api/v1/compendium -s
A container to upload example bagtainers to an implementation of the o2r api can be build and run with the following commands:
docker build -t examplecompendia .
docker run --rm examplecompendia -a http://172.17.0.1/api/v1/compendium -e 1
# note the returned ID
curl http://172.17.0.1/api/v1/compendium/<compendium ID> | python -mjson.tool
It can be used to upload multiple test compendia from o2r-muncher or selected bagtainers from this repository, see next section.
-e <n>: upload n-many test compendia, e.g. -e 42-s: upload sample steps, which complete each one more step of the job task chain-b XXXX: upload specific examples, based on directory name, e.g. -b 0003
-b 0003 -b 0005-a http://...: the API endpoint, e.g. -a http://myurl/api/v1/compendium
http://172.17.0.1/api/v1/compendium-c <cookie>: the session cookie to authenticate the upload, e.g. -c s:MYSESSION (get it from the Browser after authentication)Once the compendia are uploaded, you can start jobs:
docker run --rm examplecompendia -a http://172.17.0.1/api/v1/compendium -e 1 -c s:abcdef123...<rest of mycookie>
# docker run --rm o2r-upload -a http://172.17.0.1/api/v1/compendium -e 0 -b 0003 -b 0004
# docker run o2r-uploader -e 1 -b 0005 -b 0003 -b 0004
# note the returned compendium and start a new job for it
curl -F compendium_id=<compendium ID> http://172.17.0.1/api/v1/job
# note the returned job ID and use it to query job information
curl http://172.17.0.1/api/v1/job/<job ID> | python -mjson.tool
The file dirtree.pl is a little Perl script by Arjen Bax (via texblog to create directory listings for the LaTeX package dirtree.
perl dirtree.pl path/to/directory
The bagtainers in this directory are all published under copyrights by the respective content authors.
Content type
Image
Digest
Size
13.6 MB
Last updated
almost 10 years ago
docker pull o2rproject/examplecompendia