Commit 65ceb800 authored by Élodie Thiéblin's avatar Élodie Thiéblin
Browse files

doc: add readme with basic commands

parent e7a7057acc16
# OWL2YAMS
A script to create a new CubicWeb instance from OWL ontology and RDF data
\ No newline at end of file
A script to create a new CubicWeb instance from OWL ontology and RDF data
## Installing the project
Create and activate a virtual environment
```
python3 -m venv my-virtual-env
source my-virtual-env/bin/activate
```
Install the dependencies, in this folder, run
```
pip install -e .
```
## Bootstrap a cube from a OWL file
This command will create a cube from the OWL file
```
owl2yams -m path/to/my-ontology.owl -n my_owl2yams_instance
```
It requires the ontology file path.
optional arguments:
-h, --help show this help message and exit
--owl-model OWL_MODEL, -m OWL_MODEL
Specify the OWL file to translate
--instance-name INSTANCE_NAME, -n INSTANCE_NAME
Specify the instance name for the CW instance
--parse-format {turtle,xml,n3,nquads,nt,trix}, -f {turtle,xml,n3,nquads,nt,trix}
Specify the OWL file serialization
--dry-run, -d Print the YAMS schema only
--only-cube Only create the cube and exit (no instance and db-
init)
## Populate a CubicWeb instance from RDF data
Run the script to populate your CubicWeb instance with your RDF data compliant
with the OWL ontology that was used to create your cube.
```
cubicweb-ctl import-rdf my_owl2yams_instance -f /path/to/rdfdata.ttl
```
optional arguments:
--parse-format The RDF serialization format between {turtle,xml,n3,nquads,nt,trix}
## Launch your CubicWeb instance
This command will launch the CubicWeb instance
```
cubicweb-ctl pyramid my_owl2yams_instance
```
By default it used the `8080` port. You can change this port using the environement variable
`CW_PORT`, which you can set with the following command:
```
export CW_PORT=8081
```
You know the server is running when you see the log
```
Serving on http://0.0.0.0:8080
```
## Use your CubicWeb instance
After those two commands, you can browse, create new data and more on your
web application.
Go to http://localhost:8080 and you can start browsing, adding data, etc.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment