From e04bc05ae26504524ec9dd16030edc1d1b870e06 Mon Sep 17 00:00:00 2001 From: shawn Date: Wed, 22 Apr 2026 23:23:40 +0800 Subject: [PATCH 1/6] chore: prepare package for crates.io publish Add repository/homepage links and an exclude list so the published crate ships only runtime-relevant files. Package shrinks from 59 files / 700 KiB compressed to 39 files / 199 KiB compressed. Co-Authored-By: Claude Opus 4.7 (1M context) --- Cargo.toml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 4e33cbf..c6b9825 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,19 @@ readme = "README.md" authors = ["shawn "] keywords = ["markdown", "terminal", "kitty", "cli", "renderer"] categories = ["command-line-utilities", "text-processing"] +repository = "https://github.com/rrbe/termdown" +homepage = "https://github.com/rrbe/termdown" +exclude = [ + "CLAUDE.md", + "TODO.md", + "TEST_PLAN.md", + "docs/", + ".github/", + "install.sh", + "uninstall.sh", + "Cross.toml", + "README_CN.md", +] [dependencies] ab_glyph = "0.2" From 24a1bba242f998e431e89a2bffe55a6470398963 Mon Sep 17 00:00:00 2001 From: shawn Date: Wed, 22 Apr 2026 23:35:59 +0800 Subject: [PATCH 2/6] chore: add MSRV, changelog, and lead install docs with crates.io MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Declare rust-version = "1.74" so crates.io shows a clear Rust floor. - Re-include README_CN.md in the package so the "中文文档" link in README.md resolves on the crates.io page. - Add CHANGELOG.md (Keep a Changelog format), covering 0.1.0 – 0.4.0. - README Installation section now leads with "cargo install termdown"; the pre-built install script follows for users without a Rust toolchain. Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 2 +- README.md | 14 ++++++++---- 3 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d361777 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,63 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.4.0] - 2026-04-22 + +First release published to [crates.io](https://crates.io/crates/termdown). + +### Added +- Interactive TUI mode (`--tui`) with vim-style navigation, forward search + (`/`, `n`, `N`), Table of Contents panel (`t`), keyboard-shortcut help + overlay (`?`), link-follow navigation across Markdown files (`Enter`, `o`, + `i`), and Kitty-protocol heading images inside the TUI viewport. +- Side-by-side README screenshots showing direct-render and TUI modes. +- `repository`, `homepage`, `rust-version`, and `exclude` metadata in + `Cargo.toml` for the crates.io release. + +### Changed +- Build, lint, format, and test now route through a shared `Makefile` that + CI and local workflows both invoke — no drift between environments. +- README installation section leads with `cargo install termdown`. + +### Fixed +- Markdown renderer: collapsed nested `if` into `match` guards, improving + readability and branch coverage. + +## [0.3.0] - prior to crates.io + +### Added +- HTML block and inline HTML rendering in the Markdown pipeline. +- Markdown feature coverage audit documenting supported/unsupported syntax. +- GitHub Actions CI and auto-release workflows; cross-compilation support + for `aarch64-unknown-linux-gnu` via `cross`. +- Install and uninstall shell scripts for prebuilt binary releases. + +### Fixed +- Install `fontconfig` in the cross container so aarch64 builds succeed. +- Rustfmt and system-deps issues on CI. + +## [0.2.0] - prior to crates.io + +### Added +- Theme auto-detection (OSC 11) with explicit `--theme light|dark|auto`. +- Task list checkbox rendering. +- CLI integration tests and markdown edge-case tests. +- Emoji fallback for image-rendered headings. +- Architecture documentation. + +### Fixed +- Nested list text loss in the Markdown renderer. + +## [0.1.0] - prior to crates.io + +Initial release: direct-output Markdown renderer with H1–H3 headings +rasterized to PNG and painted via the Kitty graphics protocol. + +[0.4.0]: https://github.com/rrbe/termdown/releases/tag/v0.4.0 +[0.3.0]: https://github.com/rrbe/termdown/releases/tag/v0.3.0 +[0.2.0]: https://github.com/rrbe/termdown/releases/tag/v0.2.0 +[0.1.0]: https://github.com/rrbe/termdown/releases/tag/v0.1.0 diff --git a/Cargo.toml b/Cargo.toml index c6b9825..231b21b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ keywords = ["markdown", "terminal", "kitty", "cli", "renderer"] categories = ["command-line-utilities", "text-processing"] repository = "https://github.com/rrbe/termdown" homepage = "https://github.com/rrbe/termdown" +rust-version = "1.74" exclude = [ "CLAUDE.md", "TODO.md", @@ -19,7 +20,6 @@ exclude = [ "install.sh", "uninstall.sh", "Cross.toml", - "README_CN.md", ] [dependencies] diff --git a/README.md b/README.md index 98aedf5..21ff136 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,15 @@ H4-H6 headings always fall back to ANSI bold text. ## Installation -### Install script +### From crates.io (recommended, requires Rust) + +```sh +cargo install termdown +``` + +Installs into `~/.cargo/bin/`. Requires Rust 1.74+. + +### Prebuilt binary (no Rust toolchain needed) ```sh curl -fsSL https://raw.githubusercontent.com/rrbe/termdown/master/install.sh | bash @@ -51,14 +59,12 @@ sudo mv termdown /usr/local/bin/ -### Install from source +### From git (latest development snapshot) ```sh cargo install --git https://github.com/rrbe/termdown ``` -Installs into `~/.cargo/bin/`. - ## Uninstall ```sh From a442eef63abc4f4601c288a518f353eeca45c389 Mon Sep 17 00:00:00 2001 From: shawn Date: Wed, 22 Apr 2026 23:54:35 +0800 Subject: [PATCH 3/6] chore: bump MSRV to 1.95 to match the current dev environment Switched from a guessed 1.74 floor to the actual toolchain in use (rustc 1.95.0). This is what every CI and developer run compiles against, so it's the only version we can honestly claim support for. Co-Authored-By: Claude Opus 4.7 (1M context) --- Cargo.toml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 231b21b..c1c6483 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ keywords = ["markdown", "terminal", "kitty", "cli", "renderer"] categories = ["command-line-utilities", "text-processing"] repository = "https://github.com/rrbe/termdown" homepage = "https://github.com/rrbe/termdown" -rust-version = "1.74" +rust-version = "1.95" exclude = [ "CLAUDE.md", "TODO.md", diff --git a/README.md b/README.md index 21ff136..7535789 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ H4-H6 headings always fall back to ANSI bold text. cargo install termdown ``` -Installs into `~/.cargo/bin/`. Requires Rust 1.74+. +Installs into `~/.cargo/bin/`. Requires Rust 1.95+. ### Prebuilt binary (no Rust toolchain needed) From 071baf57b8ac39b0162da91fd4e00d1cc332cf06 Mon Sep 17 00:00:00 2001 From: shawn Date: Thu, 23 Apr 2026 00:09:03 +0800 Subject: [PATCH 4/6] chore: note MSRV follow-up in TODO.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Record the follow-up to measure the real MSRV with cargo-msrv and add a CI job that pins to it. Parked for later — current 1.95 ships as-is with this PR. Co-Authored-By: Claude Opus 4.7 (1M context) --- TODO.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TODO.md b/TODO.md index 5cf9b71..eed5ff0 100644 --- a/TODO.md +++ b/TODO.md @@ -1,3 +1,7 @@ - [ ] 测试 html 标签支持 - [ ] 图片支持 - [ ] 长文本换行时缩进的处理 +- [ ] 找出真实 MSRV 并下调 `rust-version`(当前 `1.95` 是跟本地对齐,触达面窄) + - 本地跑 `cargo install cargo-msrv && cargo msrv find`,二分出最低能编译的版本 + - 同步更新 `Cargo.toml` 的 `rust-version` 和 `README.md` 里的 "Requires Rust X.Y+" + - 在 `.github/workflows/ci.yml` 加一个 `msrv` job(`cargo check --all-targets` on pinned toolchain),防止以后 PR 悄悄抬高 MSRV From e546f0b297dc6f027797b60be2ea9c3485ce8576 Mon Sep 17 00:00:00 2001 From: shawn Date: Mon, 27 Apr 2026 23:03:29 +0800 Subject: [PATCH 5/6] docs: pin README screenshots to v0.4.0 raw URLs Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 4 ++-- README_CN.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7535789..1ea6e58 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ Render Markdown with large-font headings in the terminal using the Kitty graphic - - + +
termdown rendering the Chinese READMEtermdown --tui rendering the English READMEtermdown rendering the Chinese READMEtermdown --tui rendering the English README
diff --git a/README_CN.md b/README_CN.md index 96f11e0..3d6fc1a 100644 --- a/README_CN.md +++ b/README_CN.md @@ -4,8 +4,8 @@ - - + +
termdown 渲染中文 READMEtermdown --tui 渲染英文 READMEtermdown 渲染中文 READMEtermdown --tui 渲染英文 README
From b138bea3322f4ec446a4156f09666d91a0b9be2a Mon Sep 17 00:00:00 2001 From: shawn Date: Mon, 27 Apr 2026 23:04:58 +0800 Subject: [PATCH 6/6] update todo --- TODO.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TODO.md b/TODO.md index eed5ff0..9934d3b 100644 --- a/TODO.md +++ b/TODO.md @@ -1,7 +1,11 @@ - [ ] 测试 html 标签支持 - [ ] 图片支持 - [ ] 长文本换行时缩进的处理 +<<<<<<< Updated upstream - [ ] 找出真实 MSRV 并下调 `rust-version`(当前 `1.95` 是跟本地对齐,触达面窄) - 本地跑 `cargo install cargo-msrv && cargo msrv find`,二分出最低能编译的版本 - 同步更新 `Cargo.toml` 的 `rust-version` 和 `README.md` 里的 "Requires Rust X.Y+" - 在 `.github/workflows/ci.yml` 加一个 `msrv` job(`cargo check --all-targets` on pinned toolchain),防止以后 PR 悄悄抬高 MSRV +======= +- [ ] 测试 markdown metadata 支持 +>>>>>>> Stashed changes