Skip to content

Repository files navigation

lianzi (练字)

简体中文

A browser-based worksheet generator for Chinese handwriting practice (elementary school Chinese curriculum). Configure content, typeface, grid, and paper on the left, get a real-scale print preview on the right, and print a millimeter-accurate practice sheet.

Content can be typed by hand or imported from the built-in standard textbook data (character lists / writing lists / word lists), filterable by grade, volume, list type, and lesson.

Two practice modes:

  • Character practice — one character plus N faded tracing repetitions, based on the character/writing lists.
  • Word practice — laid out by word: a word and its tracing copies never split across lines.

Core guarantees

  1. What you see is what prints, at true size. A 10mm grid in the settings prints as 10mm ± 0.2mm.
  2. Client-side only, works offline. Rendering and pagination don't depend on a server; textbook data is a build-time asset, not a runtime API.
  3. Fully serializable configuration. The entire UI state can be described by one JSON object, used for URL sharing and local persistence.
  4. Words never split across lines. In word-practice mode, a word and its tracing copies must fit on the same line, even if it leaves trailing space.

Tech stack

  • SvelteKit 2 + Svelte 5 (runes)
  • TypeScript (strict)
  • SVG rendering in millimeter units
  • UnoCSS
  • Vitest (unit) + Playwright (E2E / print)
  • Deployed as a static site to GitHub Pages (@sveltejs/adapter-static)

Getting started

pnpm install
pnpm dev

Build a production bundle:

pnpm build
pnpm preview

Testing

pnpm check   # type-check
pnpm lint    # prettier + eslint
pnpm test    # unit tests (vitest)

Contributing

See CONTRIBUTING.md.

License

MIT

About

浏览器端小学语文字帖生成与打印工具 / Browser-based worksheet generator for Chinese handwriting practice

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages