LexQC makes the Charte des droits et libertés de la personne (RLRQ c C-12) available as a machine-readable, standards-compliant artifact: full Akoma Ntoso XML, FRBR URIs, a cross-reference graph, and an amendment timeline, served as a static site.
Is
- A reproducible pipeline that ingests the consolidated Charter from
LégisQuébec and emits:
- Akoma Ntoso 3.0 XML (validated against the official schema),
- a JSON projection of the same structure,
- a static HTML site with per-article pages, FRBR URIs, a cross-reference graph, and an amendment timeline.
- MIT-licensed code; CC BY 4.0 data outputs.
Isn't (MVP scope is deliberately narrow)
- One act only: the Charter (C-12).
- One language: French.
- One deliverable: a static site on GitHub Pages.
- No hosted database, no public API, no bilingual output, no other acts, no regulations.
Everything beyond that is explicitly deferred — see TODO.md
if present in the working tree.
- Browse the site — once published, the latest build is available at
the GitHub Pages URL for this repository
(https://donjguido.github.io/Akomo-Notso-Quebec/). The site is rebuilt
automatically on every push to
mainvia.github/workflows/deploy.yml. - Download the data — the
site/artifact produced by the build contains the Akoma Ntoso XML and the derived JSON alongside the HTML. - Run it yourself — see Local development below.
- Code — MIT. See
LICENSE. - AKN output and derived JSON — Creative Commons Attribution 4.0
International (CC BY 4.0). See
LICENSE-DATA.
When you reuse the data, credit both this project and its source:
Éditeur officiel du Québec — LégisQuébec. See
ATTRIBUTION.md for full attribution guidance and the
status of the LégisQuébec terms-of-use review.
The underlying legislative text comes from LégisQuébec, the official consolidated legislation service operated by the Éditeur officiel du Québec. LexQC is independent and unofficial; LégisQuébec remains the authoritative source.
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"
pytestTo build the static site locally:
python scripts/build_site.py --output siteThe API and worker services are legacy to the static-site MVP but remain useful for end-to-end ingestion runs against a local Postgres.
copy .env.example .env
# edit .env and set POSTGRES_PASSWORD plus the matching LEXQC_*_URL values
docker compose up --buildNever commit .env. Only .env.example is tracked.
- Akoma Ntoso XML is the source of truth. JSON and HTML are derived views.
- FRBR URIs are used throughout
(e.g.
/akn/ca-qc/act/1975/c-12/fra@2023-06-01/!main/art_10). - Amendments create new expressions; nothing is deleted.
- Attribution to Éditeur officiel du Québec is emitted in AKN
<FRBRSource>and in anX-Source-AttributionHTTP header on served responses.
See src/lexqc/:
frbr.py— FRBR URI helpers (wrapscobalt)ingestion/fetcher.py— rate-limited, cached HTTP fetcheringestion/parser.py— HTML → AKN XMLingestion/refs.py— cross-reference extractoringestion/validator.py— schema validationingestion/loader.py— transactional loaderapi/app.py— FastAPI routes (legacy; static site is the MVP target)cli.py—lexqc ingest charter,lexqc validate

