catalog/repos/ainergiz--notebooklm-superskill.md

164 lines
4.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# NotebookLM内容生成工具
`NotebookLM` `浏览器自动化` `幻灯片生成` `播客` `信息图` `视频生成` `Python`
# NotebookLM 超级技能
通过浏览器自动化,从 NotebookLM 笔记本生成幻灯片、播客、信息图和视频。
## 功能特性
- **幻灯片** - 为不同受众生成演示文稿(技术人员、投资者、客户、高管、初学者)
- **音频概述** - 以 80 多种语言创建 AI 播客风格的讨论
- **信息图** - 支持多种方向的可视化摘要
- **视频概述** - 可自定义主题的解说视频
## 安装
### 作为 Claude Code 技能安装
1. 将此仓库克隆到技能目录:
```bash
git clone https://github.com/ainergiz/notebooklm-superskill.git ~/.claude/skills/notebooklm-superskill
```
2. 重启 Claude Code 以加载技能。
### 独立使用
1. 克隆仓库:
```bash
git clone https://github.com/ainergiz/notebooklm-superskill.git
cd notebooklm-superskill
```
2. 运行任意脚本(虚拟环境会自动配置):
```bash
python scripts/run.py auth_manager.py setup
```
## 快速开始
### 1. 身份认证(仅需一次)
```bash
python scripts/run.py auth_manager.py setup
```
浏览器窗口打开后,登录你的 Google 账号,会话将保存供后续使用。
### 2. 生成内容
```bash
# 幻灯片
python scripts/run.py generate_slides.py --notebook-url URL --audience technical
# 音频播客
python scripts/run.py generate_audio.py --notebook-url URL --format deep-dive
# 信息图
python scripts/run.py generate_infographic.py --notebook-url URL --orientation landscape
# 视频
python scripts/run.py generate_video.py --notebook-url URL --format explainer
```
## 参数说明
### 幻灯片生成
| 参数 | 可选值 | 默认值 |
|------|--------|--------|
| `--audience` | technical, investor, customer, executive, beginner | technical |
| `--audiences` | 逗号分隔的列表 | - |
| `--format` | detailed, presenter | detailed |
| `--length` | short, default, long | default |
| `--source` | 文件路径 | - |
| `--prompt` | 自定义文本 | - |
### 音频生成
| 参数 | 可选值 | 默认值 |
|------|--------|--------|
| `--format` | deep-dive, brief, critique, debate | deep-dive |
| `--language` | en-US, es-ES, fr-FR 等 | en-US |
| `--prompt` | 自定义文本 | - |
### 信息图生成
| 参数 | 可选值 | 默认值 |
|------|--------|--------|
| `--orientation` | square, portrait, landscape | landscape |
| `--detail` | concise, standard, detailed | standard |
| `--prompt` | 自定义文本 | - |
### 视频生成
| 参数 | 可选值 | 默认值 |
|------|--------|--------|
| `--format` | brief, explainer | brief |
| `--theme` | retro-90s, futuristic, corporate, minimal | corporate |
| `--custom-theme` | 自定义描述 | - |
| `--prompt` | 自定义文本 | - |
## 通用参数
所有脚本均支持:
- `--output DIR` - 输出目录
- `--headless` - 无界面运行浏览器
- `--help` - 显示帮助信息
## 项目结构
```
notebooklm-superskill/
├── SKILL.md # Claude Code 技能文件
├── scripts/
│ ├── run.py # 通用入口(处理虚拟环境)
│ ├── auth_manager.py # 身份认证
│ ├── generate_slides.py
│ ├── generate_audio.py
│ ├── generate_infographic.py
│ └── generate_video.py
└── data/ # 运行时数据(已加入 .gitignore
└── browser_state/ # Cookie、配置文件
```
## 工作原理
1. **浏览器自动化** - 使用 PatchrightPlaywright 的分支)配合真实 Chrome确保稳定性
2. **反检测机制** - 持久化浏览器配置、Cookie 注入、模拟人类操作行为
3. **产物监控** - 通过检测加载动画来判断内容生成是否完成
4. **下载处理** - 通过 Playwright 的下载处理器捕获下载内容
## 环境要求
- Python 3.8+
- 拥有 NotebookLM 访问权限的 Google 账号
- Chrome 浏览器(由 Patchright 自动安装)
## 常见问题
### 认证过期
```bash
python scripts/run.py auth_manager.py reauth
```
### 生成超时
音频和视频生成可能需要 5-15 分钟。脚本内置了超时时间:
- 幻灯片/信息图3 分钟
- 音频10 分钟
- 视频15 分钟
### 浏览器问题
```bash
# 为 Patchright 重新安装 Chrome
python -m patchright install chrome
```
## 许可证
MIT