Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 3.92 KB

README.md

File metadata and controls

73 lines (53 loc) · 3.92 KB

References

简体中文

References for the facts shown in the atlas. The site never loads these files. node scripts/audit_sources.js --fix derives js/milestone_sources.js from them (work and chapter of each milestone reference), which the Chinese chronicle pane loads after first paint to show a source line under the selected milestone. Adding references does not affect first paint.

Files

File Contents
works.json Works cited: short id → { zh, en?, kind, url? }; kind is primary (historical text), secondary (modern study), dataset or web
<dynasty>.json References for that dynasty's milestones and landmark events, e.g. tang.json
journeys.json References for journey stops
persons.json References for person profiles
baseline.json Records that existed before the audit and have no reference yet. Generated by the script; it only shrinks

Create a file when it gets its first reference; do not commit empty files.

Record keys

Key Data
milestone:<dynasty>:<year> DYNASTY_DATA[].milestones in js/map_data.js
event:<id> PLACE_LANDMARK_EVENTS[].id in js/lore_data.js
journey:<key>:<year> HISTORICAL_JOURNEYS[].stops; a second stop in the same year gets -2, -3
person:<key> PERSON_PROFILES

A landmark event id looks like tang:692; if that id is taken, add a letter: tang:692b. Once committed, an id is permanent: it does not change when the event's year or place is corrected.

Format

{
  "milestone:tang:692": [{ "w": "zztj", "loc": "卷205 唐纪二十一 长寿元年十月" }]
}

A reference has only these fields:

  • w: work id, registered in works.json
  • loc: chapter, section or page
  • url: optional (primary sources only require w + loc; omitting url is completely fine), online text link
  • note: optional, a short remark on how the sources differ, about 60 characters at most. If the atlas text itself looks wrong, say so in the PR description instead

One key per line, keys sorted. node scripts/audit_sources.js --fix does this for you.

Rules

  • Every reference must be checked by a person against the cited work. Do not commit references generated by an AI tool without checking them.
  • Cite the work and chapter or page; do not copy passages.
  • List 1–2 core primary sources in order of importance (the chronicle pane displays the first two, appending 等 with the full list on hover); add a third only when sources complement or disagree with one another.
  • A new milestone, landmark event, journey stop or person must come with a reference, or CI fails.
  • Settlements need no reference: their key facts are location and seat rank, which a citation rarely proves.
  • After adding references, run node scripts/audit_sources.js --update and commit baseline.json with them.
node scripts/audit_sources.js                # Coverage
node scripts/audit_sources.js --by-dynasty   # Coverage per dynasty
node scripts/audit_sources.js --check        # CI
node scripts/audit_sources.js --fix          # Canonical form; regenerates js/milestone_sources.js (commit it with index.html)
node scripts/audit_sources.js --update       # Shrink the baseline

Checking references against the text

scripts/check_sources.js downloads the pages behind each url and checks that the chapter number and title in loc match the page and that the regnal dates in loc occur in it. It needs network access, so it runs locally, not in CI.

node scripts/check_sources.js qin         # One file
node scripts/check_sources.js --changed   # What you added or changed since origin/main

✓ means the chapter is the right one and covers the date; ~ means only part was found and is worth a look; ✗ means a dead link, a chapter mismatch or a missing date. It cannot tell whether the passage is about the atlas record, so it does not replace reading the text.