mirror of
https://github.com/tiennm99/thptqg.git
synced 2026-10-04 18:13:58 +00:00
The repository now reads as the pipeline it is: crawler fetches, parser converts, assembler verifies and publishes, with data/ and web/ as the stores they hand work through. go-parser is renamed parser now that there is no other. The assembler replaces build-db.js and assemble-site.js. It compiles the parser, builds and verifies each database, compresses it, runs the Vite build and assembles _site — one command, and the only place that knows the order. It also closes a real hole: nothing previously asserted that a database reached the site. An empty staging directory assembled happily, so every page rendered, every query 404d and CI stayed green. The row-count and size guards could not catch that, since they only run when a database was built at all. Removing Node from the root forced the dataset list out of web/src/datasets.js, which the assembler cannot import. datasets.json is now the registry both sides read — JSON because Go and the browser both parse it without a dependency — while presentation stays in the web app, keyed by id and cross-checked against the registry so a half-added dataset fails instead of half-working. Guards verified by making each one fail: a missing database, and an expected row count one higher than the truth.
26 lines
677 B
YAML
26 lines
677 B
YAML
# thptqg2017 data/ — 63 .xls files from baotintuc.vn (current generation).
|
|
#
|
|
# sheet_mode = "all": Hà Nội and HCM overflow into Sheet2 (65k Excel row cap).
|
|
# SBD validation: no numeric guard — build-database.js did not apply ^\d+$.
|
|
# strip_blank_rows = false: no blank-row anomaly in this dataset.
|
|
#
|
|
# Table shape, INSERT and subject regexes are canonical — see parser/internal/schema/schema.go.
|
|
|
|
reader:
|
|
sheet_mode: all
|
|
strip_blank_rows: false
|
|
|
|
columns:
|
|
ho_ten: 0
|
|
ngay_sinh: 1
|
|
so_bao_danh: 2
|
|
diem_thi: 3
|
|
|
|
validation:
|
|
require_numeric_sbd: false
|
|
require_nonempty_name: true
|
|
require_nonempty_sbd: true
|
|
|
|
header:
|
|
tokens: ["HO_TEN", "HỌ TÊN", "STT"]
|