Rename plugin to Smart Review

This commit is contained in:
Jaycelu 2026-05-29 09:25:44 +08:00
parent d49c234e41
commit f5a0f71ca9
25 changed files with 59 additions and 59 deletions

4
.gitignore vendored
View file

@ -8,8 +8,8 @@ docs/
examples/
# Obsidian plugin build output
apps/obsidian-smart-review-plugin/main.js
apps/obsidian-smart-review-plugin/main.js.map
apps/smart-review-plugin/main.js
apps/smart-review-plugin/main.js.map
# OS / editor
.DS_Store

View file

@ -1,8 +1,8 @@
# Obsidian Smart Review
# Smart Review
[中文说明](README.zh-CN.md) | [Plugin source](apps/obsidian-smart-review-plugin)
[中文说明](README.zh-CN.md) | [Plugin source](apps/smart-review-plugin)
Obsidian Smart Review is a review center for Obsidian notes that uses Properties / YAML frontmatter. It builds review queues from `next_review`, lets you complete reviews inside Obsidian, writes spaced-review metadata back to notes, records review history, and exports AI review-card prompt payloads.
Smart Review is a review center for Obsidian notes that uses Properties / YAML frontmatter. It builds review queues from `next_review`, lets you complete reviews inside Obsidian, writes spaced-review metadata back to notes, records review history, and exports AI review-card prompt payloads.
The Obsidian plugin works on its own and does not require any external companion app.
@ -20,7 +20,7 @@ The Obsidian plugin works on its own and does not require any external companion
## Repository Structure
- `apps/obsidian-smart-review-plugin`: Obsidian plugin source and build output.
- `apps/smart-review-plugin`: Obsidian plugin source and build output.
- `packages/shared`: Shared types, date parsing, and review-state logic.
- `manifest.json` and `versions.json`: Root copies for Obsidian community submission.
@ -34,15 +34,15 @@ pnpm build
Build output for manual Obsidian installation:
```text
apps/obsidian-smart-review-plugin/main.js
apps/obsidian-smart-review-plugin/manifest.json
apps/obsidian-smart-review-plugin/styles.css
apps/smart-review-plugin/main.js
apps/smart-review-plugin/manifest.json
apps/smart-review-plugin/styles.css
```
Install into a local vault:
```bash
./scripts/install-obsidian-smart-review-plugin.sh "/path/to/your/vault"
./scripts/install-smart-review-plugin.sh "/path/to/your/vault"
```
The script copies the plugin files to:
@ -54,7 +54,7 @@ The script copies the plugin files to:
## Obsidian Commands
- `Open Review Center`
- `Generate Smart Review Index`
- `Generate Review Index`
- `Refresh Review Data`
- `Mark Current Note Reviewed`
- `Generate Daily Review Markdown`

View file

@ -1,6 +1,6 @@
# Obsidian Smart Review
# Smart Review
[English](README.md) | [插件源码](apps/obsidian-smart-review-plugin)
[English](README.md) | [插件源码](apps/smart-review-plugin)
基于 Obsidian Properties / YAML frontmatter 的智能复习系统,让笔记按照 `next_review` 自动进入复习队列,并支持复习完成、间隔重复、复习历史和 AI 复习卡片。
@ -20,7 +20,7 @@
## 项目结构
- `apps/obsidian-smart-review-plugin`: Obsidian Smart Review 插件负责扫描、Review Center、状态栏、复习反馈、Markdown 导出和 AI Payload。
- `apps/smart-review-plugin`: Smart Review 插件负责扫描、Review Center、状态栏、复习反馈、Markdown 导出和 AI Payload。
- `packages/shared`: 复用类型、日期解析和复习状态计算逻辑。
- `manifest.json` / `versions.json`: 放在仓库根目录,供 Obsidian 社区插件提交读取。
@ -38,7 +38,7 @@
## 安装与构建
```bash
cd obsidian-smart-review
cd smart-review
pnpm install
pnpm build
```
@ -46,27 +46,27 @@ pnpm build
构建完成后Obsidian 插件入口会生成在:
```text
apps/obsidian-smart-review-plugin/main.js
apps/smart-review-plugin/main.js
```
推荐使用安装脚本:
```bash
./scripts/install-obsidian-smart-review-plugin.sh "/path/to/your/vault"
./scripts/install-smart-review-plugin.sh "/path/to/your/vault"
```
iCloud 中的 Obsidian Vault 通常位于类似路径:
```bash
./scripts/install-obsidian-smart-review-plugin.sh "$HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/<你的Vault名>"
./scripts/install-smart-review-plugin.sh "$HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/<你的Vault名>"
```
脚本会执行构建,并复制以下文件到 `<Vault>/.obsidian/plugins/smart-review/`
```text
apps/obsidian-smart-review-plugin/manifest.json
apps/obsidian-smart-review-plugin/main.js
apps/obsidian-smart-review-plugin/styles.css
apps/smart-review-plugin/manifest.json
apps/smart-review-plugin/main.js
apps/smart-review-plugin/styles.css
```
## Obsidian 内使用
@ -83,7 +83,7 @@ Command Palette 至少包含:
```text
Open Review Center
Generate Smart Review Index
Generate Review Index
Refresh Review Data
Mark Current Note Reviewed
Generate Daily Review Markdown

View file

@ -1,19 +1,19 @@
# Obsidian Smart Review Plugin
# Smart Review Plugin
Obsidian 插件本体负责完整复习闭环:扫描 Properties / YAML frontmatter、打开 Review Center、显示状态栏计数、写回复习反馈、追加历史、生成 Markdown 复习中心和 AI 复习卡片 Payload。
## 构建
```bash
cd obsidian-smart-review
cd smart-review
pnpm install
pnpm --filter @obsidian-smart-review/obsidian-plugin build
pnpm --filter @smart-review/obsidian-plugin build
```
构建产物:
```text
apps/obsidian-smart-review-plugin/main.js
apps/smart-review-plugin/main.js
```
## 安装到 Obsidian
@ -26,7 +26,7 @@ apps/obsidian-smart-review-plugin/main.js
<Vault>/.obsidian/plugins/smart-review/styles.css
```
启用插件后,点击 Ribbon 图标打开 Review Center。`Generate Smart Review Index` 命令仍保留,用于手动覆盖更新 `review-index.json`
启用插件后,点击 Ribbon 图标打开 Review Center。`Generate Review Index` 命令仍保留,用于手动覆盖更新 `review-index.json`
## 文件策略

View file

@ -1,5 +1,5 @@
import type { App } from "obsidian";
import type { ReviewIndex, ReviewItem } from "@obsidian-smart-review/shared";
import type { ReviewIndex, ReviewItem } from "@smart-review/shared";
const DUE_STATES = new Set<ReviewItem["review_state"]>(["overdue", "today"]);

View file

@ -1,5 +1,5 @@
import { Notice, Plugin, type TFile } from "obsidian";
import type { ReviewIndex, ReviewRating } from "@obsidian-smart-review/shared";
import type { ReviewIndex, ReviewRating } from "@smart-review/shared";
import { buildAiReviewCardsPayload } from "./ai-cards";
import { buildDailyReviewMarkdown } from "./markdown-export";
import { markFileReviewed } from "./review-actions";
@ -39,8 +39,8 @@ export default class SmartReviewPlugin extends Plugin {
});
this.addCommand({
id: "generate-obsidian-smart-review",
name: "Generate Smart Review Index",
id: "generate-smart-review",
name: "Generate Review Index",
callback: () => {
void this.generateReviewIndex();
}

View file

@ -1,6 +1,6 @@
{
"id": "smart-review",
"name": "Obsidian Smart Review",
"name": "Smart Review",
"version": "0.1.0",
"minAppVersion": "1.5.0",
"description": "Smart review system based on Obsidian Properties / YAML frontmatter with Review Center, spaced review feedback, history, and AI payload export.",

View file

@ -1,4 +1,4 @@
import type { ReviewIndex, ReviewItem } from "@obsidian-smart-review/shared";
import type { ReviewIndex, ReviewItem } from "@smart-review/shared";
import { formatLocalDateTime } from "./utils";
export function buildDailyReviewMarkdown(index: ReviewIndex): string {

View file

@ -1,5 +1,5 @@
{
"name": "@obsidian-smart-review/obsidian-plugin",
"name": "@smart-review/obsidian-plugin",
"version": "0.1.0",
"private": true,
"type": "module",
@ -10,7 +10,7 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@obsidian-smart-review/shared": "workspace:*"
"@smart-review/shared": "workspace:*"
},
"devDependencies": {
"builtin-modules": "^4.0.0",

View file

@ -5,7 +5,7 @@ import {
getLocalDateString,
normalizeDate,
type ReviewRating
} from "@obsidian-smart-review/shared";
} from "@smart-review/shared";
import type { SmartReviewSettings } from "./settings";
import {
ensureParentFolder,

View file

@ -1,5 +1,5 @@
import { ItemView, Notice, type WorkspaceLeaf } from "obsidian";
import type { ReviewItem, ReviewRating, ReviewState } from "@obsidian-smart-review/shared";
import type { ReviewItem, ReviewRating, ReviewState } from "@smart-review/shared";
import type SmartReviewPlugin from "./main";
import { REVIEW_RATINGS } from "./settings";
import { formatLocalDateTime } from "./utils";
@ -66,7 +66,7 @@ export class ReviewCenterView extends ItemView {
private renderHeader(container: HTMLElement, index: SmartReviewPlugin["currentIndex"]): void {
const header = container.createDiv({ cls: "smart-review-header" });
header.createEl("h1", { text: "Obsidian Smart Review" });
header.createEl("h1", { text: "Smart Review" });
header.createEl("p", {
text: "基于 Properties / YAML frontmatter 的插件内复习中心。",
cls: "smart-review-subtitle"

View file

@ -6,7 +6,7 @@ import {
summarizeReviewItems,
type ReviewIndex,
type ReviewItem
} from "@obsidian-smart-review/shared";
} from "@smart-review/shared";
import type { SmartReviewSettings } from "./settings";
import {
assignOptionalOrder,

View file

@ -1,6 +1,6 @@
import { App, PluginSettingTab, Setting } from "obsidian";
import type ReviewSmartReviewPlugin from "./main";
import type { ReviewRating } from "@obsidian-smart-review/shared";
import type SmartReviewPlugin from "./main";
import type { ReviewRating } from "@smart-review/shared";
export interface SmartReviewSettings {
vaultName: string;
@ -49,7 +49,7 @@ export const DEFAULT_SETTINGS: SmartReviewSettings = {
export const REVIEW_RATINGS: ReviewRating[] = ["again", "hard", "good", "easy"];
export class SmartReviewSettingTab extends PluginSettingTab {
constructor(app: App, private readonly plugin: ReviewSmartReviewPlugin) {
constructor(app: App, private readonly plugin: SmartReviewPlugin) {
super(app, plugin);
}
@ -57,7 +57,7 @@ export class SmartReviewSettingTab extends PluginSettingTab {
const { containerEl } = this;
containerEl.empty();
containerEl.createEl("h2", { text: "Obsidian Smart Review" });
containerEl.createEl("h2", { text: "Smart Review" });
containerEl.createEl("p", {
text: "插件本体可独立完成复习队列、Review Center、复习反馈、历史记录和 AI Payload 生成。",
cls: "smart-review-setting-note"

View file

@ -1,4 +1,4 @@
import type { ReviewIndex } from "@obsidian-smart-review/shared";
import type { ReviewIndex } from "@smart-review/shared";
export class SmartReviewStatusBar {
constructor(

View file

@ -1,6 +1,6 @@
import type { CachedMetadata } from "obsidian";
import { normalizePath } from "obsidian";
import type { ReviewItem } from "@obsidian-smart-review/shared";
import type { ReviewItem } from "@smart-review/shared";
import { DEFAULT_SETTINGS } from "./settings";
export type Frontmatter = Record<string, unknown>;

View file

@ -1,6 +1,6 @@
{
"id": "smart-review",
"name": "Obsidian Smart Review",
"name": "Smart Review",
"version": "0.1.0",
"minAppVersion": "1.5.0",
"description": "Smart review system based on Obsidian Properties / YAML frontmatter with Review Center, spaced review feedback, history, and AI payload export.",

View file

@ -1,12 +1,12 @@
{
"name": "obsidian-smart-review",
"name": "smart-review",
"version": "0.1.0",
"private": true,
"description": "Obsidian Smart Review plugin and optional companion app workspace.",
"description": "Smart Review plugin workspace.",
"type": "module",
"scripts": {
"build": "pnpm -r build",
"dev": "pnpm --filter @obsidian-smart-review/obsidian-plugin dev",
"dev": "pnpm --filter @smart-review/obsidian-plugin dev",
"lint": "pnpm -r lint",
"audit:review": "node scripts/audit-review-index.js",
"analyze:history": "node scripts/analyze-review-history.js",

View file

@ -1,5 +1,5 @@
{
"name": "@obsidian-smart-review/shared",
"name": "@smart-review/shared",
"version": "0.1.0",
"type": "module",
"main": "dist/index.js",

View file

@ -12,9 +12,9 @@ importers:
specifier: ^5.8.3
version: 5.9.3
apps/obsidian-smart-review-plugin:
apps/smart-review-plugin:
dependencies:
'@obsidian-smart-review/shared':
'@smart-review/shared':
specifier: workspace:*
version: link:../../packages/shared
devDependencies:

View file

@ -1,3 +1,3 @@
packages:
- "apps/obsidian-smart-review-plugin"
- "apps/smart-review-plugin"
- "packages/*"

View file

@ -8,10 +8,10 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
usage() {
cat <<EOF
Usage:
./scripts/install-obsidian-smart-review-plugin.sh "/path/to/your/vault"
./scripts/install-smart-review-plugin.sh "/path/to/your/vault"
Example for iCloud Obsidian vaults:
./scripts/install-obsidian-smart-review-plugin.sh "\$HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/YourVaultName"
./scripts/install-smart-review-plugin.sh "\$HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/YourVaultName"
EOF
}
@ -32,7 +32,7 @@ if ! command -v corepack >/dev/null 2>&1; then
exit 1
fi
PLUGIN_SOURCE_DIR="$REPO_ROOT/apps/obsidian-smart-review-plugin"
PLUGIN_SOURCE_DIR="$REPO_ROOT/apps/smart-review-plugin"
PLUGIN_TARGET_DIR="$VAULT_PATH/.obsidian/plugins/$PLUGIN_ID"
echo "Repository: $REPO_ROOT"
@ -62,11 +62,11 @@ cp "$PLUGIN_SOURCE_DIR/manifest.json" "$PLUGIN_TARGET_DIR/manifest.json"
cp "$PLUGIN_SOURCE_DIR/styles.css" "$PLUGIN_TARGET_DIR/styles.css"
echo
echo "Installed Obsidian Smart Review plugin successfully."
echo "Installed Smart Review plugin successfully."
echo
echo "Next steps:"
echo " 1. Open Obsidian."
echo " 2. Enable the community plugin: Obsidian Smart Review."
echo " 2. Enable the community plugin: Smart Review."
echo " 3. Click the Ribbon icon to open Review Center."
echo " 4. Run Command Palette: Generate Smart Review Index if you want to overwrite review-index.json manually."
echo " 4. Run Command Palette: Generate Review Index if you want to overwrite review-index.json manually."
echo " 5. Check that this file exists: $VAULT_PATH/review-index.json"