Getting started
Quick Start
Prerequisites
- Install docker and docker-compose
To serve OCA ecosystem on your machine, run the following commands in your command line:
curl https://raw.githubusercontent.com/THCLab/oca-ecosystem/main/docker-compose.yml > docker-compose.yml
docker-compose up
This command will serve OCA Browser on port 8000 by default.
with default layouts
- Download XLS Swiss Passport example
- Go to
Develop -> XLS to OCA Converter
and select XLS inSelect OCA File
field - Click
Convert
button and download generated file (OCA Bundle) - Download entries files and upload them to data-vault with listed command:
for f in examples/swiss_passport/entries/*; do;
curl -X POST "http://localhost:9293/api/v1/files" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "file=@$f";
done;
Hosting entries in Data Vault allows to reuse complex entries in many OCAs. You can link Entry Code Overlay or Entries Overlay with entries in Data Vault by it's SAI instead of keeping all entries data inside Overlays.
- Go to
Preview
and select OCA Bundle file - As a result OCA Form and Credential are rendered with default layouts
custom layouts
- Download XLS Swiss Passport example and layouts files
- Download assets files and upload them to data-vault with listed command:
for f in examples/swiss_passport/assets/*; do;
curl -X POST "http://localhost:9293/api/v1/files" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "file=@$f";
done;
Assets may be images, fonts etc. used in custom layout.
- In
Develop -> XLS to OCA Converter
select XLS file as before - In
Select Credential Layout file
andSelect Form Layout file
fields select downloaded layouts files - Click
Convert
button and download generated file (OCA Bundle) - Download entries files and upload them to data-vault with listed command:
for f in examples/swiss_passport/entries/*; do;
curl -X POST "http://localhost:9293/api/v1/files" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "file=@$f";
done;
- Go to
Preview
and select OCA Bundle file - As a result OCA Form and Credential are rendered with custom defined layouts
Learn more about defining custom layouts
OCA References
TODO
Tutorial
Defining OCA in xls file
- Download template file
- In
Main
sheet columns A, B, C and D stores definition of Capture Base - Columns from E to N stores definition of Overlays that are not language specific
- Other sheets named by ISO_639-1 language code stores definition of language specific Overlays