diff --git a/README.md b/README.md index a5c4ba5..373986e 100644 --- a/README.md +++ b/README.md @@ -1,67 +1,64 @@ # kage +[![ci](https://github.com/tamnd/kage/actions/workflows/ci.yml/badge.svg)](https://github.com/tamnd/kage/actions/workflows/ci.yml) +[![Release](https://img.shields.io/github/v/release/tamnd/kage)](https://github.com/tamnd/kage/releases/latest) +[![Go Reference](https://pkg.go.dev/badge/github.com/tamnd/kage.svg)](https://pkg.go.dev/github.com/tamnd/kage) +[![Go Report Card](https://goreportcard.com/badge/github.com/tamnd/kage)](https://goreportcard.com/report/github.com/tamnd/kage) +[![License](https://img.shields.io/github/license/tamnd/kage)](./LICENSE) + **kage** (影, "shadow") clones a website into a self-contained folder you can browse offline, with all the JavaScript stripped out. It renders every page in headless Chrome, snapshots the final rendered DOM, removes every script and -event handler, and downloads the CSS, images, and fonts and rewrites them to -local paths. The result looks like the live site but runs no code: a plain -folder of `.html` files you can open straight from disk. +event handler, then downloads the CSS, images, and fonts and rewrites them to +local paths. The result looks like the live site but runs no code. -```bash -kage clone example.com -kage serve kage-out/example.com -``` +[Install](#install) • [Commands](#commands) • [Clone](#clone) • [Pack](#pack-it-into-one-file) • [Native viewer](#a-native-window-not-a-browser-tab) • [How it works](#how-it-works) -## Why +![kage cloning a site, packing it into one file, and serving it back offline](docs/static/demo.gif) Saving a page with "Save As" gives you a copy that still phones home, still runs analytics, and often renders blank because the markup is built by JavaScript at -runtime. kage takes the opposite approach: +runtime. kage takes the opposite approach: it drives a real browser, waits for +the page to settle, captures the DOM a human would have seen, and then strips +every script out of it. What lands on disk is inert. No tracking, no network +calls, no surprises, just a folder of `.html` files you can open straight from +disk or pack into a single file to hand to someone. -- **Render first, save second.** Each page goes through real headless Chrome, so - a page whose content is assembled by JavaScript is captured the way a human - would have seen it, not as an empty shell. -- **Strip every script.** Once the DOM is captured, kage removes all `