funlesson
funlesson 的核心处理库:把一条课程视频链接(B 站等)转成结构化图文教案素材——转写、大纲、思维导图、PPT、架构图。被 funlesson-api 后端服务封装调用。
功能特性
- 视频下载:基于
yt-dlp,原生支持 B 站等多平台 - 语音转写:复用 funtalk 的 Whisper 封装
- 大纲结构化 / PPT 文案 / 架构图代码:统一通过
claude -p单任务调用完成内容理解, 不依赖额外 LLM API Key(详见doc/API.md) - 思维导图:输出 markmap 兼容的 markdown 文本,交给前端渲染成可交互导图
- PPT:用
python-pptx渲染成.pptx文件
快速开始
安装
包发布在私有 index(组织私有 PyPI,非公开 pypi.org),需要组织账号密码(找管理员要,
不要把密码提交进仓库);该 index 不代理公网包,funtalk 等公开依赖需要额外指定公网 index:
pip install funlesson \
--index-url https://<user>:<password>@packages.aliyun.com/5fc5eb115dbd287006145e5f/pypi/funpy/simple/ \
--extra-index-url https://pypi.org/simple
从源码开发用可编辑模式:pip install -e .
环境要求
- 系统已安装
ffmpeg - 本机已安装并登录 Claude Code CLI(
claude命令可用) - 首次转写会下载 Whisper 模型权重,需要能访问模型源的网络环境
运行
from funlesson import process
note = process("https://www.bilibili.com/video/BVxxxxxxxx", workdir="./data/demo")
print(note.outline.title)
print(note.mindmap)
API 文档
见 doc/API.md。
变更日志
见 CHANGELOG.md。
许可证
MIT
Metadata
Release files for funlesson 0.1.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| funlesson-0.1.11-py3-none-any.whl | Python 3 | none | any | Details |
Release files / funlesson-0.1.11-py3-none-any.whl
| Download URL | funlesson-0.1.11-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93319e68bfdfe1d3e6777871f202efab9a1859615829bdba2a9a47be90836cb1
|
|
BLAKE2b-256 checksum How to use checksums |
59364ad0b4c3a28116fb552aeaa575600f93a0fd910d5e8c118ee7815744fe19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|