Skip to main content

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.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for funlesson 0.1.10
File Interpreter ABI Platform
funlesson-0.1.10-py3-none-any.whl Python 3 none any Details

Release files / funlesson-0.1.10-py3-none-any.whl

Download URL funlesson-0.1.10-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac90b90f80bfaca13096bb9574cbf1e8da99ef51289c2c477e30b2c1a22dff75
BLAKE2b-256 checksum
How to use checksums
5c14b5722ec9091225e40f4661e9de6544bb9098c81e7c74883b126059472079
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}

Release history Release notifications | RSS feed

0.1.12

1 release file

0.1.11

1 release file

This release

0.1.10 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page