This repository contains the generation pipeline for the OPT-NC job reference framework. The project transforms structured business data into DuckDB and SQLite databases, then generates AsciiDoc, PDF, EPUB, CSV exports, schema documentation, and a Hugo website.
- Loads business data from
src/duck.sqlandsrc/sqlite.sqlinto a DuckDB and a SQLite database. - Automatically builds a directory of professions, job families, and skills.
- Writes an AsciiDoc file (
data/output/docs/referentiel_metiers.adoc). - Produces PDF and EPUB documentation and CSV files.
- Generates a Hugo website in
site/public/.
Automated generation helps maintain a single source of truth, ensures consistency across job descriptions, and reduces the risk of manual errors. By reusing a database and a Python script to produce the documentation, the reference framework can be updated simply by modifying the source data.
src/duck.sql: SQL script to build the DuckDB databasesrc/sqlite.sql: SQL script to build the SQLite filesrc/generate-adoc.py: Python script that reads DuckDB and generates the AsciiDoc filesrc/generate-md.py: Python script that reads DuckDB and generates the Hugo Markdown site contentdata/input/: CSV files and input datadata/output/csv/: Generated CSV exportsdata/output/docs/: Generated documentation (AsciiDoc and PDF)etc/themes/pdf-theme.yml: PDF formatting theme for AsciidoctorTaskfile.yml: Execute automated tasks with only one command line
- Python 3.14.5+
duckdb(1.5.3+) to load the main databaseuv(0.11.15+) to execute tasks (pip install uv)sqlite3command-line interfaceschemacrawler(17.11.1+) to generate database schema documentationasciidoctor-pdf(2.3.15+) to convert AsciiDoc into PDFpandoc(3.9.0.2+) to convert AsciiDoc to PDFhugo(0.163.0) to generate the websitetask(3.50.0+) (not strictly necessary, but useful to avoid typing long commands)
The easiest and recommended way to install dependencies and generate all the files is to use Task. You can do everything with a single command:
taskOR, if you prefer to run the steps individually :
- Build the DuckDB and SQLite databases:
task duckdb- Generate the complete documentation (using Taskfile is recommended):
task docs- Generate the Hugo website:
task siteThis command creates the Hugo site in site/, generates the Markdown pages with src/generate-md.py, installs the Relearn theme, then builds the static website in site/public/.
dist/ref-metiers-opt-nc.duckdb: Built DuckDB databasedist/ref-metiers-opt-nc.sqlite: Built SQLite databasedata/output/docs/referentiel_metiers.adoc: AsciiDoc source of the reference frameworkdist/ref-metiers-opt-nc-schema.html: HTML documentation of the schemadist/ref-metiers-opt-nc-schema.png: PNG image of the schemadist/ref-metiers-opt-nc-schema.pdf: PDF format of the schemadata/output/docs/referentiel_metiers.pdf: Final PDF document (via Asciidoctor)site/public/: Generated Hugo website- And the exported CSVs from DuckDB located in
data/output/csv/
- Update the CSV sources in
data/input/or the SQL insrc/duck.sql - Run
task duckdbto rebuild the database - Run
task docsto regenerate the documents - Run
task siteto regenerate the Hugo website
- The
src/generate-adoc.pyscript reads the DuckDB database and builds a structured document featuring job families, active professions, and skills classified by group. - The
src/generate-md.pyscript uses the same DuckDB source to generate the Hugo pages, so the website stays aligned with the PDF and EPUB documentation. - This makes the generation reproducible and maintains a clear history of data sources and the final output.