Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCrane committed Jul 30, 2020
1 parent c46b105 commit b47ceb1
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 14 deletions.
31 changes: 24 additions & 7 deletions README-CN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# manim_action_renderer
[![logo](test/header.png)](https://github.com/manim-kindergarten/manim_action_renderer)

[![Test Github Action](https://github.com/manim-kindergarten/manim_action_renderer/workflows/Test%20Github%20Action/badge.svg)](https://github.com/manim-kindergarten/manim_action_renderer/actions)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://choosealicense.com/licenses/mit/)
Expand All @@ -20,7 +20,15 @@
* `scene_names`

在源文件中想要渲染的场景名,字符串形式,多个场景需要用空格隔开。默认为全部渲染。
在源文件中想要渲染的场景名,字符串形式。默认为全部渲染。多个场景需要用空格隔开,或写成多行,例如:
```yaml
- uses: manim-kindergarten/manim_action_renderer@master
with:
source_file: path/to/your/file.py
scene_names: |
SceneName1
SceneName2
```

* `args`

Expand All @@ -38,15 +46,22 @@

* `extra_packages`

需要用到的额外python模块,使用`pip`安装。每两个之间用空格隔开,例如:`"packageA packageB"`。
需要用到的额外python模块,使用`pip`安装。每两个之间用空格隔开,或写成多行,例如:`"packageA packageB"`,或:
```yaml
- uses: manim-kindergarten/manim_action_renderer@master
with:
extra_packages: |
packageA
packageB
```

* `extra_system_packages`

需要用到的系统文件,使用`apk`安装。

* `extra_repos`

需要clone到当前工作区的额外存储库,每两个之间用空格隔开。
需要clone到当前工作区的额外存储库,每两个之间用空格隔开,或写成多行

* `pre_render`

Expand All @@ -62,7 +77,7 @@

* `fonts_dir`

视频中需要的额外字体ttf文件所在文件夹在当前文件夹中的相对路径,将在渲染前自动安装
视频中需要的额外字体ttf文件所在文件夹在当前文件夹中的相对路径,将在渲染前自动安装文件夹中的字体

## 输出Outputs

Expand All @@ -83,7 +98,9 @@ jobs:
id: renderer
with:
source_file: example_scenes.py
scene_names: "OpeningManimExample WriteStuff"
scene_names: |
OpeningManimExample
WriteStuff
args: "--high_quality"
- name: Save output as artifacts
uses: actions/upload-artifact@v2
Expand All @@ -92,7 +109,7 @@ jobs:
path: ${{ steps.renderer.outputs.video_path }}
```

由于安装依赖和渲染耗时等原因,开始渲染场景之前需要5分钟左右的时间<br/>
由于拉拽镜像,安装依赖等原因,开始渲染场景之前需要4分钟左右的时间<br/>
最终生成的视频文件将投放至该Action运行页面的artifacts部分(国内下载较慢)

## 许可证License
Expand Down
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# manim_action_renderer
[![logo](test/header.png)](https://github.com/manim-kindergarten/manim_action_renderer)

[![Test Github Action](https://github.com/manim-kindergarten/manim_action_renderer/workflows/Test%20Github%20Action/badge.svg)](https://github.com/manim-kindergarten/manim_action_renderer/actions)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://choosealicense.com/licenses/mit/)
Expand All @@ -22,7 +22,15 @@ It runs on [a docker image](https://github.com/manim-kindergarten/manim_texlive_
* `scene_names`

The name of the scenes to be rendered in the source file, in the form of a string, multiple scenes need to be separated by spaces in `""`. The default is to render all (with a `-a` flag).
The name of the scenes to be rendered in the source file, in the form of a string. The default is to render all (with a `-a` flag). Multiple scenes need to be separated by spaces in `""` or write them in multiple lines, e.g.:
```yaml
- uses: manim-kindergarten/manim_action_renderer@master
with:
source_file: path/to/your/file.py
scene_names: |
SceneName1
SceneName2
```

* `args`

Expand All @@ -41,15 +49,22 @@ It runs on [a docker image](https://github.com/manim-kindergarten/manim_texlive_

* `extra_packages`

Additional python modules that need to be used, use `pip` to install them. Use a space to separate every two, e.g.: `"packageA packageB"`.
Additional python modules that need to be used, use `pip` to install them. Use a space to separate every two or write them in multiple lines, e.g.: `"packageA packageB"` or :
```yaml
- uses: manim-kindergarten/manim_action_renderer@master
with:
extra_packages: |
packageA
packageB
```

* `extra_system_packages`

The system packages that need to be used, use the `apk` to install them.

* `extra_repos`

Extra repositories you want to clone to the current workspace. Use a space to separate every two repos.
Extra repositories you want to clone to the current workspace. Use a space to separate every two repos, or write them in multiple lines.

* `pre_render`

Expand Down Expand Up @@ -86,16 +101,18 @@ jobs:
id: renderer
with:
source_file: example_scenes.py
scene_names: "OpeningManimExample WriteStuff"
args: "--high_quality"
scene_names: |
OpeningManimExample
WriteStuff
args: "--high_quality"
- name: Save output as artifacts
uses: actions/upload-artifact@v2
with:
name: Videos
path: ${{ steps.renderer.outputs.video_path }}
```

Due to installation dependencies and time-consuming rendering, it takes about 5 minutes before starting to render the scenes<br/>
Due to pull image from DockerHub, install dependencies, etc., it takes about 4 minutes before starting to render the scenes<br/>
The final generated video file will be delivered to the artifacts part of the action running page.

## License
Expand Down
Binary file added test/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b47ceb1

Please sign in to comment.