fulin87 / manim_document_zh

一份manim中文教程文档 / manim tutorial document in Chinese (完善中)

Home Page:https://docs.manim.org.cn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

manim_document_zh

docs GPL License QQ manim_sandbox manim tutorial

manim-kindergarten成员整理的一份manim中文文档教程,目前还在完善当中。如果关于文档内容有问题,可以在这个repo中提出issue。 如果你想要为这个文档做出贡献,可以提交pr。详细内容见贡献规则及编写指南页面。

manim分支中为带有文档字符串的manim源码,用于文档中自动构建文档字符串。

文档地址

https://docs.manim.org.cn

还在完善中,目前完成情况:

  • 安装指南
  • 快速入门
  • constants
  • container
  • animation
  • mobject
  • scene
  • camera
  • utils

关于文档构建

当前这个repo使用了GitHub ActionsSphinx自动构建文档。当向master分支push后,会自动触发构建部署在 GitHub PagesNetlify上。向master分支提出pr后,会触发构建,并且部署在Netlify上提供预览。

手动构建文档

Step 1. 安装环境:

  • 确保安装了manim环境
  • pip install -r requirements.txt 安装文档环境

Step 2. 准备目录结构:

.
├── manim_with_doc/
│   ├── manimlib/
│   ├── manim_sandbox/
│   ├── ...
│   └── manim.py
└── manim_document_zh/
    ├── source/
    │   ├── ...
    │   └── conf.py
    ├── ...
    ├── make.bat
    └── Makefile 

Step 3. 构建文档:

manim_document_zh文件夹中执行make html构建文档

附. 文件格式转换:

sphinx要求使用rst格式(reStructuredText语法),可以使用pandoc把markdown等文件转换rst,或者JupyterNoteBook把py等文件转换rst。

pandoc readme.md --from markdown --to rst -s -o readme.rst

或者

pip install pypandoc

然后

import pypandoc
output = pypandoc.convert_file('somefile.md', 'rst').replace("\r", "")
with open("outputfile.rst", "w", encoding="utf8") as f:
    f.write(output)

About

一份manim中文教程文档 / manim tutorial document in Chinese (完善中)

https://docs.manim.org.cn

License:Creative Commons Attribution 4.0 International


Languages

Language:Python 84.4%Language:Batchfile 7.4%Language:Makefile 6.0%Language:Shell 2.1%