Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

136 Commits

Folders and files

Repository files navigation

繁花似錦

Convert a simplified Chinese EPUB to traditional and read it in the browser.

Open dist/index.html — one self-contained file, ~1.6 MB, no install, works offline. Drop in an EPUB, read it converted, and export it as EPUB, HTML, Markdown or plain text. Nothing is uploaded.

Features

  • Converts text only — stylesheets and internal links keep working
  • Hong Kong, Taiwan or plain traditional (面条 → 麪條 in HK, 麵條 in TW)
  • Built-in reader: table of contents, seven themes, progress through the book, and typefaces chosen for the script the book is written in
  • Reading settings that stay put: size, leading, line width, alignment — the width per script, since 38em is 38 Chinese characters but 81 Latin ones
  • Turn pages instead of scrolling, and a focus mode that clears the chrome away and goes fullscreen — both desktop only, where there is a fixed-height column to break pages in
  • Interface in Chinese or English, Chinese by default
  • Bookmarks: keep a spot, and find it again in the sidebar under the contents
  • Ambiguous characters (发 → 發 or 髮) are underlined — click to cycle, and the choice carries into the export
  • Drops embedded fonts that can't render the converted text
  • Exports as EPUB, or as one self-contained HTML file — which is also how to print it, since the browser breaks CJK lines properly
  • Optional vim keys (j/k, gg, n/p, z; press ? for the list)
  • Works on a phone

DRM-protected files are rejected. Text inside images can't be converted.

Develop

node tools/serve.js 8412      # dev server
./build.sh                    # rebuild dist/index.html
node tools/audit-dist.js      # check it still works from file://

Tests are browser pages — open tests/run.html, reader.html, fonts.html, library.html and mobile.html on the dev server. node tools/validate/run-tests.js drives all five headlessly, which is how CI runs them, and prints the count.

src/convert/ambiguity-table.js is generated by python3 tools/gen-ambiguity.py.

Licence

MIT — see LICENSE. Vendored libraries keep their own; see vendor/README.md.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages