From 87e9c1ec83d9c5ea4bf4690d22d9bd825cb39bd0 Mon Sep 17 00:00:00 2001 From: fuyang Date: Tue, 23 Jun 2026 15:05:17 +0800 Subject: [PATCH 1/2] docs: translate CHANGELOG.md (Korean) and DISTRIBUTION.md (Chinese) to English --- CHANGELOG.md | 36 +++++++------- DISTRIBUTION.md | 130 ++++++++++++++++++++++++------------------------ 2 files changed, 82 insertions(+), 84 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 248ec89..e02bd04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,22 @@ # CHANGELOG -모든 Git 커밋 이력을 최신순으로 기록합니다. 새 커밋은 표 최상단에 추가합니다. +All Git commit history is recorded in reverse chronological order. New commits are added at the top of the table. -| 일시 | 유형 | 범위 | 변경내용 (목적 포함) | +| Date | Type | Scope | Change (with purpose) | |---|---|---|---| -| 2026-06-05 14:19 | fix | util | `app.notion.com/p/...` 복사 URL에서 page ID 추출 지원 — `` 입력 호환성 개선 (#57) | -| 2026-04-30 14:20 | feat | page | `page markdown` (GET /v1/pages/:id/markdown) + `page set-markdown` (PATCH, 4가지 모드 replace/append/after/range) 추가 — Notion 서버사이드 마크다운 I/O 일등공민화 (#37) | -| 2026-04-30 14:20 | feat | page | `page property` 추가: GET /v1/pages/:id/properties/:id 자동 페이지네이션 — 25개 초과 relation/rollup/rich_text 사일런트 절단 수정 (#38) | -| 2026-04-30 14:20 | feat | block | `block update --file ` / `--markdown` 지원 — append/insert와 일관된 마크다운 경험, 블록 타입 불일치 fail-fast (#36) | -| 2026-04-30 14:20 | feat | comment | `comment update` (PATCH) + `comment delete` (DELETE) 추가 — 2025 API 신규 엔드포인트 래핑 (#33) | -| 2026-04-30 14:20 | feat | page | `page archive` / `page trash`를 canonical로 승격, `page delete`는 별칭으로 유지 — soft-delete 의미 명확화 (#35) | -| 2026-04-30 14:20 | feat | file | `file get ` 추가: GET /v1/file_uploads/:id 래핑, 업로드 status/URL 확인 (#34) | -| 2026-04-30 13:00 | feat | auth,client | `auth status`/`doctor`에 integration type 노출 + workspace-root 생성 에러에 concrete workaround 힌트 추가 (#25) | -| 2026-04-30 13:00 | feat | file | `notion file upload`이 stdin(`-`)과 http(s) URL을 소스로 받도록 확장, `--name` 오버라이드 플래그 추가 (#26) | -| 2026-04-30 13:00 | feat | block | `--image-file`/`--image-upload` 및 file/video/audio/pdf 5종 미디어 플래그 패밀리 추가 — 업로드-임베드 워크플로우 원-커맨드화 (#23) | -| 2026-04-30 13:00 | feat | block | children.length>100 자동 배칭 + rich_text 2000자 한계 초과 시 코드블록 줄바꿈 기준 자동 분할, `--on-oversize=split\|truncate\|fail` 플래그 추가 (#21) | -| 2026-04-30 13:00 | feat | block | 마크다운 코드펜스 언어 별칭(ts/sh/yml/py/…) Notion enum으로 자동 정규화, 미등록 언어는 plain text로 경고와 함께 폴백 (#22) | -| 2026-04-30 13:00 | fix | api | `/v1` 접두사 자동 보정, `--body @file`·`--body -` 지원, help 예제 실제 동작과 일치하도록 정리 (#24) | -| 2026-03-14 21:00 | chore | gitignore | notion.exe 바이너리 gitignore 추가 — Windows 빌드 결과물 추적 방지 | -| 2026-03-14 20:10 | fix | block | table_row children을 table{} 내부로 이동 — Notion API 스펙 준수 ('table.children should be defined' 오류 수정) | -| 2026-03-14 19:52 | feat | block | GFM 테이블 파싱 + 인라인 서식(bold/italic/code/link/strike) 지원 추가 — 노션 CLI로 마크다운 표 업로드 시 깨지던 문제 근본 해결 | +| 2026-06-05 14:19 | fix | util | Support extracting page ID from `app.notion.com/p/...` copied URLs — improved `` input compatibility (#57) | +| 2026-04-30 14:20 | feat | page | Add `page markdown` (GET /v1/pages/:id/markdown) + `page set-markdown` (PATCH, 4 modes: replace/append/after/range) — Notion server-side markdown I/O as first-class citizen (#37) | +| 2026-04-30 14:20 | feat | page | Add `page property`: GET /v1/pages/:id/properties/:id with auto-pagination — fix silent truncation for relation/rollup/rich_text exceeding 25 items (#38) | +| 2026-04-30 14:20 | feat | block | Add `block update --file ` / `--markdown` support — consistent markdown experience with append/insert, fail-fast on block type mismatch (#36) | +| 2026-04-30 14:20 | feat | comment | Add `comment update` (PATCH) + `comment delete` (DELETE) — wrap 2025 API new endpoints (#33) | +| 2026-04-30 14:20 | feat | page | Promote `page archive` / `page trash` as canonical, keep `page delete` as alias — clarify soft-delete semantics (#35) | +| 2026-04-30 14:20 | feat | file | Add `file get `: wrap GET /v1/file_uploads/:id, check upload status/URL (#34) | +| 2026-04-30 13:00 | feat | auth,client | Expose integration type in `auth status`/`doctor` + add concrete workaround hint for workspace-root creation error (#25) | +| 2026-04-30 13:00 | feat | file | Extend `notion file upload` to accept stdin(`-`) and http(s) URL sources, add `--name` override flag (#26) | +| 2026-04-30 13:00 | feat | block | Add `--image-file`/`--image-upload` and file/video/audio/pdf media flag family — one-command upload-embed workflow (#23) | +| 2026-04-30 13:00 | feat | block | Auto-batch children.length>100 + auto-split rich_text exceeding 2000 chars at newline boundaries in code blocks, add `--on-oversize=split\|truncate\|fail` flag (#21) | +| 2026-04-30 13:00 | feat | block | Auto-normalize markdown code fence language aliases (ts/sh/yml/py/…) to Notion enums, warn and fallback to plain text for unrecognized (#22) | +| 2026-04-30 13:00 | fix | api | Auto-correct `/v1` prefix, support `--body @file` / `--body -`, align help examples with actual behavior (#24) | +| 2026-03-14 21:00 | chore | gitignore | Add notion.exe binary to gitignore — prevent tracking Windows build artifacts | +| 2026-03-14 20:10 | fix | block | Move table_row children into table{} — comply with Notion API spec (fix 'table.children should be defined' error) | +| 2026-03-14 19:52 | feat | block | Add GFM table parsing + inline formatting (bold/italic/code/link/strike) support — fix broken markdown table uploads to Notion CLI | diff --git a/DISTRIBUTION.md b/DISTRIBUTION.md index c5cf74f..e86713e 100644 --- a/DISTRIBUTION.md +++ b/DISTRIBUTION.md @@ -1,36 +1,36 @@ -# Notion CLI 分发方案 +# Notion CLI Distribution Plan -## 一、安装渠道(按优先级排序) +## 1. Installation Channels (by priority) -### Tier 1 — 必须做(覆盖 80% 用户) +### Tier 1 — Must-do (covers 80% of users) -| 渠道 | 目标用户 | 实现方式 | 工作量 | +| Channel | Target Users | Approach | Effort | |------|---------|---------|--------| -| **GitHub Releases** | 所有平台 | goreleaser + GitHub Actions | 1h | -| **go install** | Go 开发者 | 已就绪(`go install github.com/4ier/notion-cli@latest`) | 0 | -| **Homebrew Tap** | macOS/Linux 开发者 | goreleaser 自动生成 formula → `4ier/homebrew-tap` | 30min | +| **GitHub Releases** | All platforms | goreleaser + GitHub Actions | 1h | +| **go install** | Go developers | Already ready (`go install github.com/4ier/notion-cli@latest`) | 0 | +| **Homebrew Tap** | macOS/Linux developers | goreleaser auto-generate formula → `4ier/homebrew-tap` | 30min | -### Tier 2 — 应该做(扩大覆盖) +### Tier 2 — Should-do (expand coverage) -| 渠道 | 目标用户 | 实现方式 | 工作量 | +| Channel | Target Users | Approach | Effort | |------|---------|---------|--------| -| **npm wrapper** | Node.js/agent 生态 | 轻量 npm 包 `@4ier/notion-cli`,postinstall 拉二进制 | 2h | -| **Docker** | CI/CD/自动化 | `ghcr.io/4ier/notion-cli` | 30min | -| **Scoop** | Windows | goreleaser 内置 scoop manifest | 15min | +| **npm wrapper** | Node.js/agent ecosystem | Lightweight npm package `@4ier/notion-cli`, postinstall fetches binary | 2h | +| **Docker** | CI/CD/automation | `ghcr.io/4ier/notion-cli` | 30min | +| **Scoop** | Windows | goreleaser built-in scoop manifest | 15min | -### Tier 3 — 锦上添花(长尾) +### Tier 3 — Nice-to-have (long tail) -| 渠道 | 目标用户 | 实现方式 | 工作量 | +| Channel | Target Users | Approach | Effort | |------|---------|---------|--------| | **AUR** | Arch Linux | PKGBUILD | 30min | | **Nix** | NixOS | flake.nix | 1h | -| **skills.sh** | AI agent | 已就绪 | 0 | +| **skills.sh** | AI agent | Already ready | 0 | --- -## 二、实现计划 +## 2. Implementation Plan -### Phase 1: goreleaser + CI(今天) +### Phase 1: goreleaser + CI (today) ``` .goreleaser.yaml @@ -48,26 +48,26 @@ └── GITHUB_TOKEN (auto) ``` -**执行步骤:** -1. 创建 `.goreleaser.yaml` -2. 创建 `.github/workflows/release.yml` + `.github/workflows/test.yml` -3. 创建 `4ier/homebrew-tap` 和 `4ier/scoop-bucket` 仓库 -4. 打 tag `v0.2.0`,推送触发自动发布 -5. 验证: `brew install 4ier/tap/notion-cli` +**Steps:** +1. Create `.goreleaser.yaml` +2. Create `.github/workflows/release.yml` + `.github/workflows/test.yml` +3. Create `4ier/homebrew-tap` and `4ier/scoop-bucket` repos +4. Tag `v0.2.0`, push to trigger automated release +5. Verify: `brew install 4ier/tap/notion-cli` -### Phase 2: npm wrapper(本周) +### Phase 2: npm wrapper (this week) ``` notion-cli-npm/ ├── package.json # name: @4ier/notion-cli -├── install.js # postinstall: 检测平台 → 下载对应 GitHub Release 二进制 -├── bin/notion # shell wrapper → 执行下载的二进制 +├── install.js # postinstall: detect platform → download corresponding GitHub Release binary +├── bin/notion # shell wrapper → execute downloaded binary └── README.md ``` -用户体验: `npx @4ier/notion-cli search "meeting notes"` +User experience: `npx @4ier/notion-cli search "meeting notes"` -### Phase 3: Docker(本周) +### Phase 3: Docker (this week) ```dockerfile FROM alpine:3.21 @@ -75,70 +75,68 @@ COPY notion /usr/local/bin/ ENTRYPOINT ["notion"] ``` -goreleaser 内置 Docker 支持,一并配置。 +goreleaser has built-in Docker support, configure together. --- -## 三、推广渠道(按 ROI 排序) +## 3. Distribution Channels (by ROI) -### 高 ROI -| 渠道 | 策略 | 时机 | +### High ROI +| Channel | Strategy | Timing | |------|------|------| -| **r/Notion** (1.2M members) | "I built a CLI for Notion" 帖,demo GIF,链接 GitHub | v0.2.0 发布当天 | -| **Hacker News** | Show HN: Full Notion CLI — 38 commands | 同上,UTC 上午 | -| **X/Twitter** | 线程:问题→方案→demo→链接,@NotionHQ | 同上 | +| **r/Notion** (1.2M members) | "I built a CLI for Notion" post, demo GIF, link to GitHub | v0.2.0 launch day | +| **Hacker News** | Show HN: Full Notion CLI — 38 commands | Same day, UTC morning | +| **X/Twitter** | Thread: problem → solution → demo → link, @NotionHQ | Same day | -### 中 ROI -| 渠道 | 策略 | 时机 | +### Medium ROI +| Channel | Strategy | Timing | |------|------|------| -| **r/commandline** | 侧重 CLI 设计哲学(gh 对标) | 发布 +1 天 | -| **Product Hunt** | 完整 launch page | 发布 +3 天 | -| **Dev.to / Hashnode** | 技术文章:Notion API → CLI 的设计决策 | 发布 +1 周 | +| **r/commandline** | Focus on CLI design philosophy (gh parity) | Launch +1 day | +| **Product Hunt** | Full launch page | Launch +3 days | +| **Dev.to / Hashnode** | Technical article: Notion API → CLI design decisions | Launch +1 week | -### 长尾 -| 渠道 | 策略 | 时机 | +### Long tail +| Channel | Strategy | Timing | |------|------|------| -| **Notion 社区** (Discord/论坛) | 作为工具分享 | 持续 | -| **GitHub trending** | 靠 star 自然进入 | 有机增长 | -| **Awesome Notion** | 提 PR 加入列表 | v0.2.0 后 | +| **Notion Community** (Discord/forums) | Share as a tool | Ongoing | +| **GitHub trending** | Organic growth via stars | Organic | +| **Awesome Notion** | Submit PR to be listed | After v0.2.0 | --- -## 四、推广素材(需要准备) +## 4. Launch Materials (to prepare) -1. **Demo GIF/视频** — 30 秒终端录屏,展示核心流程: +1. **Demo GIF/video** — 30-second terminal recording showing core flow: - `notion auth login` → `notion search` → `notion db query --filter` → `notion page create` - - 用 [vhs](https://github.com/charmbracelet/vhs) 或 asciinema 录制 + - Record with [vhs](https://github.com/charmbracelet/vhs) or asciinema -2. **README 升级** — 加 badges、GIF、安装方式表格、对标竞品 +2. **README upgrade** — Add badges, GIF, installation methods table, comparison with alternatives -3. **一句话 pitch**: "Like `gh` for GitHub, but for Notion. 39 commands. One binary." +3. **One-liner pitch**: "Like `gh` for GitHub, but for Notion. 39 commands. One binary." -4. **Twitter 线程**(已有 Notion page 可以改写) +4. **Twitter thread** (existing Notion page can be adapted) --- -## 五、时间线 +## 5. Timeline -| 日期 | 里程碑 | +| Date | Milestone | |------|--------| | 2/19 | goreleaser + CI + homebrew tap + scoop ✅ | -| 2/19 | 打 v0.2.0 tag,触发首次自动发布 | -| 2/19 | README 升级 + demo GIF 录制 | -| 2/20 | npm wrapper 发布 | -| 2/20 | r/Notion + HN + X 同步发帖 | -| 2/21 | Product Hunt 准备 | +| 2/19 | Tag v0.2.0, trigger first automated release | +| 2/19 | README upgrade + demo GIF recording | +| 2/20 | npm wrapper release | +| 2/20 | r/Notion + HN + X simultaneous posts | +| 2/21 | Product Hunt preparation | | 2/22 | Docker image + Awesome Notion PR | -| 持续 | 根据反馈迭代,社区回复 | +| Ongoing | Iterate based on feedback, community replies | ---- - -## 六、成功指标 +## 6. Success Metrics -| 指标 | 1 周目标 | 1 月目标 | +| Metric | 1 Week Target | 1 Month Target | |------|---------|---------| | GitHub Stars | 50 | 300 | -| npm 周下载 | 20 | 100 | -| Homebrew 安装 | 10 | 50 | +| npm Weekly Downloads | 20 | 100 | +| Homebrew Installs | 10 | 50 | | GitHub Issues | 5 | 20 | -| skills.sh 安装 | 10 | 50 | +| skills.sh Installs | 10 | 50 | From 8294da28e8d6c277b93049e8b75619a9cde33e15 Mon Sep 17 00:00:00 2001 From: fuyang Date: Tue, 23 Jun 2026 15:13:54 +0800 Subject: [PATCH 2/2] fix(lint): remove unused pageDeleteCmd variable --- cmd/page.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmd/page.go b/cmd/page.go index e5275ca..3bf74d8 100644 --- a/cmd/page.go +++ b/cmd/page.go @@ -372,10 +372,6 @@ Examples: }, } -// pageDeleteCmd is kept as a standalone var pointing at the same RunE -// purely so existing tests / scripts that reference the variable name -// still compile. The user-facing command is aliased via pageArchiveCmd. -var pageDeleteCmd = pageArchiveCmd var pageMoveCmd = &cobra.Command{ Use: "move ",