mirror of
https://github.com/tiennm99/thptqg.git
synced 2026-10-11 03:13:48 +00:00
83bbc597ce04cf7c305970f860c68c84e695f03a
The 2017 frontend becomes the only frontend. It now resolves which dataset to show from the URL, so the four dataset views and the /thptqg/ landing page all come from a single build instead of four builds plus a hand-written static index.html. Routing is an exact match on one path segment, because the segment is the dataset id: /thptqg/2017-old/ -> "2017-old". The nested form this replaces (/thptqg/2017/old/) would have needed longest-prefix matching, since it also starts with /thptqg/2017/. Previously published nested URLs are rewritten to their flat equivalent with the query string intact, so ?q= deep links keep working. Restores what the 2016 site had and the 2017 site lacked: - Cụm thi and Giới tính columns, in the table and on the detail card - exam-ID lookup for letter-prefixed số báo danh That second one would have been a severe regression. 616,593 of 877,461 candidates in the 2016 dataset — 70.3% — have an SBD like BAL000001, and the 2017 app matched /^\d+$/ only, so exam-ID search would have silently failed for most of that year. Detection now lives in lib/query-mode.js, shared by App and SearchForm, which had already drifted apart on exactly this rule. Letter prefixes are upper-cased before lookup so "bal000001" resolves. Neither dataset needs a conditional in a component. Columns where every row is NULL are hidden, so 2016 rows surface Cụm thi / Đức / Nhật while 2017 rows surface KHTN / KHXH / GDCD / Nga. computeBlocks() likewise skips blocks with a missing subject, so one admission-block list covers both years — D05 and D06 are added now that German and Japanese scores exist. Per-dataset content moves into the registry: title, source, database size, search examples and SQL presets. The 2016 presets are lifted from the deleted 2016 component; the Long An (49xxx) queries stay on 2017 only, where that SBD prefix means something. The subject list, previously maintained separately in score-table.jsx and student-detail.jsx, is now declared once in lib/subjects.js mirroring SCORE_FIELDS in the parser.
thptqg
Tra cứu điểm thi THPT Quốc gia — exam-score lookup for Vietnam's national high
school graduation exam. Client-side SQL (sql.js) over a SQLite database built
from the ministry's raw .xls score files by the Rust xlsxread CLI.
Served as one site at tiennm99.github.io/thptqg.
| Directory | Year | Size | Site |
|---|---|---|---|
2016/ |
THPT QG 2016 — 877,461 candidates | ~50 MB raw data | /2016/ |
2017/ |
THPT QG 2017 — ~861,000 candidates | ~117 MB raw data | /2017/ (+ old, old2 generations) |
Each year was a standalone repository (thptqg2016, thptqg2017), merged here
with full history. Each keeps its own tools/xlsxread copy because the raw
data formats differ per year.
The Deploy to GitHub Pages workflow builds both years' databases and site
bundles and publishes them behind a root index.
Description
Tra cứu điểm thi THPT Quốc gia 2016–2017 — 1,7 triệu thí sinh · Truy vấn SQL client-side với sql.js
Readme
Apache-2.0
165 MiB
0 Stars
1 Watchers
0 Forks
Languages
Go
67.1%
JavaScript
18.9%
Svelte
11.6%
CSS
2.2%
HTML
0.2%