# Qingtian Main Record

**Date:** 2026-09-01

## QINGTIAN MAIN RECORD EXPORT V1

- General-purpose record export for ChatGPT, Word, printing, reading, project review and historical reference.
- Uses the existing Qingtian Mainline record-reading foundation; no separate record-reading system.
- Sources: **Markdown**, **Detail**, or **Both**.
- Time ranges: **1 Week**, **3 Months**, **6 Months**, **All Records**.
- Generates records, calculates character count, and recommends **Copy** at 10,000 characters or less, otherwise **Export TXT**.
- Output actions: Copy, Export TXT, Preview, Clear.
- Detail records must remain preserved; records should not be permanently excluded merely because they seem unimportant.

## Current Status

### Completed
- Backend route `/qingtian/records/export` implemented.
- Export source and time-range support implemented.
- Character count and Copy/Export TXT recommendation implemented.
- Export UI added to `templates/qingtian_v2.html`.
- Copy, Export TXT, Preview and Clear controls added.
- FastAPI route conflict checked.
- Record Source button mismatch fixed by Codex.
- Generate output wiring fixed by Codex.

### Remaining Issue
The **Time Range buttons** still have a confirmed HTML/JavaScript attribute mismatch.

JavaScript expects:
`data-record-export-period`

HTML currently uses:
`data-export-period`

### Next Step
Change all four Time Range button attributes to `data-record-export-period`, rebuild Docker, hard-refresh the browser, and test.

**Do not redo the Record Export implementation.**
