Skip to content
Merged
Show file tree
Hide file tree
Changes from 80 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
d71cf91
Added click dependency and command structure
jsonvillanueva Jan 28, 2021
1464cef
Refactored code for separation of concerns
jsonvillanueva Jan 28, 2021
f441e8d
Shortened plugins command to plugin, added render options
jsonvillanueva Jan 29, 2021
595fe36
Merge remote-tracking branch 'upstream/master' into click
jsonvillanueva Jan 29, 2021
befeec6
first draft for render -h
jsonvillanueva Jan 31, 2021
8234a5c
First successful render using click
jsonvillanueva Feb 2, 2021
41bdf3b
Merge branch 'master' into click
jsonvillanueva Feb 2, 2021
a5b1345
Cleaned main
jsonvillanueva Feb 2, 2021
a2aaf5b
Moved flush_cache to option, ran black
jsonvillanueva Feb 2, 2021
af3e687
Removed argparse logic, scattered print statements
jsonvillanueva Feb 5, 2021
0ad1a29
corrected tests, all passing
jsonvillanueva Feb 8, 2021
f4e39da
merge upstream
jsonvillanueva Feb 8, 2021
3f635af
fixed test with click's clirunner
jsonvillanueva Feb 8, 2021
2bb6bf2
Merge branch 'master' into click
jsonvillanueva Feb 8, 2021
a98ff12
Fixed doctest configuration.rst
jsonvillanueva Feb 9, 2021
07602b9
Temporarily add in main_utils
jsonvillanueva Feb 9, 2021
c76c39a
Removed main_utils.parse_args, used ManimConfig.digest_args
jsonvillanueva Feb 9, 2021
8f131f0
fixed progress bar
jsonvillanueva Feb 10, 2021
bfe3f1e
Fix jupyter
jsonvillanueva Feb 11, 2021
981f1c0
Merge branch 'master' into click
jsonvillanueva Feb 11, 2021
75d3e90
black
jsonvillanueva Feb 11, 2021
e9eceaf
Fixed incorrectly merged merge conflict
jsonvillanueva Feb 11, 2021
3ab6877
updated README command.png image
jsonvillanueva Feb 12, 2021
e4e67d8
updated configuration.rst expected output
jsonvillanueva Feb 12, 2021
5ecd5b8
Fixed test_plugins and config_file expected type
jsonvillanueva Feb 12, 2021
1b34426
Refixed the jupyter fix
jsonvillanueva Feb 12, 2021
573ded8
Apply 3/5 suggestions
jsonvillanueva Mar 10, 2021
c4a293f
Merge branch 'master' of github.com:ManimCommunity/manim into click
jsonvillanueva Mar 11, 2021
dcbae7f
Updated `main` to `manim` for tests
jsonvillanueva Mar 12, 2021
3ec12eb
Forced `file` positional argument to be Path type
jsonvillanueva Mar 12, 2021
6064723
Fixed main -> manim
jsonvillanueva Mar 12, 2021
39c207e
Added libpango to linux dependency
jsonvillanueva Mar 12, 2021
debe811
Merge branch 'master' of github.com:ManimCommunity/manim into click
jsonvillanueva Mar 21, 2021
d0b3547
Updated poetry.lock
jsonvillanueva Mar 21, 2021
e9c979d
Changed configuration.rst test
jsonvillanueva Mar 22, 2021
c2d6a23
Merge branch 'master' into click
jsonvillanueva Mar 22, 2021
553321f
Fixed test_a_flag test
jsonvillanueva Mar 22, 2021
1f76892
Fixed fps flag in Cairo rendering
jsonvillanueva Mar 22, 2021
82fddfc
Fixed more outdated rst in sphinx docs
jsonvillanueva Mar 22, 2021
cde92bc
Fixed more incorrect rst orderings
jsonvillanueva Mar 22, 2021
95b17ba
Update tests/test_commands.py
jsonvillanueva Mar 22, 2021
72aad0e
Added suggestions
jsonvillanueva Mar 22, 2021
43ca2c0
Removed unused imports
jsonvillanueva Mar 22, 2021
cfde7b6
Fixed relative imports in __main__ and version
jsonvillanueva Mar 22, 2021
1ab0c76
Reverted entry point back to main
jsonvillanueva Mar 22, 2021
c298516
Update manim/_config/default.cfg
jsonvillanueva Mar 22, 2021
b43fd32
Adjusted ipython_magic's call to the entry_point
jsonvillanueva Mar 22, 2021
b0179db
Merge branch 'click' of github.com:jsonvillanueva/manim into click
jsonvillanueva Mar 22, 2021
60e9a6f
Converted frame_rate to int if integer
jsonvillanueva Mar 22, 2021
9582abe
run black
jsonvillanueva Mar 22, 2021
1315f83
Fixed doctest
jsonvillanueva Mar 22, 2021
3e05711
Fixed issue with command name from CliRunner
jsonvillanueva Mar 22, 2021
862fa99
Fixed multiple video windows opening from upstream merge
jsonvillanueva Mar 22, 2021
e840615
to black or not to black
jsonvillanueva Mar 22, 2021
14fa079
Added deprecation warning to render subcommand
jsonvillanueva Mar 22, 2021
1d1866d
warning instead of warn
jsonvillanueva Mar 22, 2021
11a0643
Applied Naveen's suggestions
jsonvillanueva Mar 26, 2021
632c9b9
Made `manim render` show the help page
jsonvillanueva Mar 26, 2021
2f55e01
Update manim/cli/render/commands.py
jsonvillanueva Mar 26, 2021
1f3577f
Update manim/cli/cfg/commands.py
jsonvillanueva Mar 26, 2021
5f51e2d
Update manim/cli/cfg/commands.py
jsonvillanueva Mar 26, 2021
41ad477
Update manim/cli/plugins/commands.py
jsonvillanueva Mar 26, 2021
eace1ff
Addressed some style changes
jsonvillanueva Mar 26, 2021
124adc9
Merge branch 'master' of github.com:ManimCommunity/manim into click
jsonvillanueva Mar 26, 2021
96e9308
add back in write_to_movie temporarily for OpenGL support
jsonvillanueva Mar 26, 2021
eb13ba0
Removed sound flag, deprecated use_opengl_renderer, added renderer op…
jsonvillanueva Mar 30, 2021
9a5cde4
Merge branch 'master' of github.com:ManimCommunity/manim into click
jsonvillanueva Mar 30, 2021
3927bf5
revert webgl_renderer_path removal
jsonvillanueva Mar 30, 2021
a1a14e7
Fixed cfg export
jsonvillanueva Mar 30, 2021
e7bcfb5
Flake8/black
jsonvillanueva Mar 30, 2021
9a44180
Fixed bug in setting renderer choice
jsonvillanueva Mar 31, 2021
72cb545
Removed log message due to default option
jsonvillanueva Mar 31, 2021
a031808
Merge branch 'master' of github.com:ManimCommunity/manim into click
jsonvillanueva Mar 31, 2021
0465e6f
Fix log_to_file tests
jsonvillanueva Mar 31, 2021
10680be
Make '-c' option for config_file, not background_color
jsonvillanueva Mar 31, 2021
f65493c
print colored version always
jsonvillanueva Mar 31, 2021
d17af12
Remove -v = --version shorthand, conflicts with verbosity
jsonvillanueva Mar 31, 2021
31e7c25
Use subprocess.run instead of Click's CliRunner for stdout
jsonvillanueva Mar 31, 2021
77ebf54
Merge branch 'master' into click
jsonvillanueva Mar 31, 2021
df8c955
Merge branch 'master' into click
jsonvillanueva Mar 31, 2021
a0cb7ac
Merge branch 'master' into click
jsonvillanueva Mar 31, 2021
561fb91
Refactor cli/render to use Cloup instead of click-option-group
janluke Mar 31, 2021
b52e757
Merge branch 'click' of github.com:jsonvillanueva/manim into click
jsonvillanueva Apr 1, 2021
437d10d
Fixed bug that changed caching hashing result
jsonvillanueva Apr 1, 2021
0943903
Revert doctest logic for fps filename output
jsonvillanueva Apr 1, 2021
e0172fc
Merge branch 'master' of github.com:ManimCommunity/manim into click
jsonvillanueva Apr 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class SquareToCircle(Scene):
In order to view the output of this scene, save the code in a file called `example.py`. Then, run the following in a terminal window:

```sh
manim example.py SquareToCircle -p -ql
manim -p -ql example.py SquareToCircle
```

You should see your native video player program pop up and play a simple scene in which a square is transformed into a circle. You may find some more simple examples within this
Expand Down
Binary file modified docs/source/_static/command.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions docs/source/installation/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ your available plugins, see the following help output:
.. code-block:: bash

manim plugins -h
usage: manim plugins -h -l
Usage: manim plugins [OPTIONS]

Utility command for managing plugins
Manages Manim plugins.

optional arguments:
-h, --help show this help message and exit
-l, --list Lists all available plugins
Options:
-l, --list List available plugins
-h, --help Show this message and exit.

Made with <3 by the ManimCommunity devs
Made with <3 by Manim Community developers.

You can list plugins as such:

Expand Down
6 changes: 3 additions & 3 deletions docs/source/tutorials/a_deeper_look.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ At this point, you have just executed the following command.

.. code-block:: bash

$ manim scene.py SquareToCircle -pql
$ manim -pql scene.py SquareToCircle

Let's dissect what just happened step by step. First, this command executes
manim on the file ``scene.py``, which contains our animation code. Further,
Expand Down Expand Up @@ -57,7 +57,7 @@ the following command,

.. code-block:: bash

$ manim scene.py SquareToCircle -pqh
$ manim -pqh scene.py SquareToCircle

The ``-ql`` flag (for low quality) has been replaced by the ``-qh`` flag, for
high quality. Manim will take considerably longer to render this file, and it
Expand Down Expand Up @@ -144,7 +144,7 @@ When executing the command

.. code-block:: bash

$ manim scene.py SquareToCircle -pql
$ manim -pql scene.py SquareToCircle

it was necessary to specify which ``Scene`` class to render. This is because a
single file can contain more than one ``Scene`` class. If your file contains
Expand Down
161 changes: 49 additions & 112 deletions docs/source/tutorials/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ high, and 4k quality, respectively.

.. code-block:: bash

$ manim <file.py> SceneName -ql
$ manim -ql <file.py> SceneName

These flags set the values of the config options ``config.pixel_width``,
``config.pixel_height``, ``config.frame_rate``, and ``config.quality``.
Expand All @@ -110,7 +110,7 @@ instead of the whole video, you can execute

.. code-block:: bash

$ manim <file.py> SceneName -sqh
$ manim -sqh <file.py> SceneName

The following example specifies the output file name (with the :code:`-o`
flag), renders only the first ten animations (:code:`-n` flag) with a white
Expand All @@ -120,7 +120,7 @@ open the file after it is rendered.

.. code-block:: bash

$ manim <file.py> SceneName -o myscene -i -n 0,10 -c WHITE
$ manim -o myscene -i -n 0,10 -c WHITE <file.py> SceneName

.. tip:: There are many more command line flags that manim accepts. All the
possible flags are shown by executing ``manim -h``. A complete list
Expand Down Expand Up @@ -162,7 +162,7 @@ Now, executing the following command

.. code-block:: bash

$ manim <file.py> SceneName -o myscene -i -c WHITE
$ manim -o myscene -i -c WHITE <file.py> SceneName

is equivalent to executing the following command, provided that ``manim.cfg``
is in the same directory as <file.py>,
Expand All @@ -187,7 +187,7 @@ file being rendered, and **not** in the directory of execution. For example,

.. code-block:: bash

$ manim <path/to/file.py> SceneName -o myscene -i -c WHITE
$ manim -o myscene -i -c WHITE <path/to/file.py> SceneName

will use the config file found in ``path/to/file.py``, if any. It will **not**
use the config file found in the current working directory, even if it exists.
Expand Down Expand Up @@ -260,15 +260,16 @@ using any config files and executing

.. code-block:: bash

manim <file.py> SceneName -o myscene -c WHITE
manim -o myscene -c WHITE <file.py> SceneName

Any command line flags have precedence over any config file. For example,
using the previous two config files and executing :code:`manim <file.py>
SceneName -c RED` is equivalent to not using any config files and executing
using the previous two config files and executing :code:`manim -c RED
<file.py> SceneName` is equivalent to not using any config files and
executing

.. code-block:: bash

manim <file.py> SceneName -o myscene -c RED
manim -o myscene -c RED <file.py> SceneName

There is also a **library-wide** config file that determines manim's default
behavior, and applies to every user of the library. It has the least
Expand Down Expand Up @@ -337,114 +338,50 @@ highest precedence, is:
A list of all config options
****************************

.. testcode::
:hide:

from manim._config import ManimConfig
from inspect import getmembers
print(sorted([n for n, _ in getmembers(ManimConfig, lambda v: isinstance(v, property))]))

.. testoutput::
:options: -ELLIPSIS, +NORMALIZE_WHITESPACE

['aspect_ratio', 'assets_dir', 'background_color', 'background_opacity', 'bottom',
'custom_folders', 'disable_caching', 'dry_run', 'ffmpeg_loglevel', 'flush_cache',
'frame_height', 'frame_rate', 'frame_size', 'frame_width', 'frame_x_radius',
'frame_y_radius', 'from_animation_number', 'images_dir', 'input_file',
'leave_progress_bars', 'left_side', 'log_dir', 'log_to_file',
'max_files_cached', 'media_dir', 'media_width', 'movie_file_extension', 'output_file',
'partial_movie_dir', 'pixel_height', 'pixel_width', 'plugins', 'png_mode',
'preview', 'progress_bar', 'quality', 'right_side', 'save_as_gif', 'save_last_frame',
.. code::

['aspect_ratio', 'assets_dir', 'background_color', 'background_opacity',
'bottom', 'custom_folders', 'disable_caching', 'dry_run',
'ffmpeg_loglevel', 'flush_cache', 'frame_height', 'frame_rate',
'frame_size', 'frame_width', 'frame_x_radius', 'frame_y_radius',
'from_animation_number', 'images_dir', 'input_file', 'left_side',
'log_dir', 'log_to_file', 'max_files_cached', 'media_dir', 'media_width',
'movie_file_extension', 'output_file', 'partial_movie_dir',
'pixel_height', 'pixel_width', 'plugins', 'png_mode', 'preview',
'progress_bar', 'quality', 'right_side', 'save_as_gif', 'save_last_frame',
'save_pngs', 'scene_names', 'show_in_file_browser', 'sound', 'tex_dir',
'tex_template', 'tex_template_file', 'text_dir', 'top', 'transparent',
'upto_animation_number', 'use_opengl_renderer', 'use_webgl_renderer', 'verbosity',
'video_dir', 'webgl_renderer_path', 'webgl_updater_fps', 'write_all',
'upto_animation_number', 'use_opengl_renderer', 'use_webgl_renderer',
'verbosity', 'video_dir', 'webgl_renderer_path', 'write_all',
'write_to_movie']


A list of all CLI flags
***********************

.. testcode::
:hide:

import subprocess
import os
is_windows = os.name == 'nt'
result = subprocess.run(['manim', '-h'], shell=is_windows, stdout=subprocess.PIPE)
print(result.stdout.decode('utf-8'))

.. testoutput::
:options: +ELLIPSIS, +NORMALIZE_WHITESPACE

Manim Community v...
usage: manim file [flags] [scene [scene ...]]
manim {cfg,init,plugins} [opts]

Animation engine for explanatory math videos

positional arguments:
file Path to file holding the python code for the scene
scene_names Name of the Scene class you want to see

optional arguments:
-h, --help show this help message and exit
-o OUTPUT_FILE, --output_file OUTPUT_FILE
Specify the name of the output file, if it should be different from the scene class name
-p, --preview Automatically open the saved file once its done
-f, --show_in_file_browser
Show the output file in the File Browser
--sound Play a success/failure sound
--leave_progress_bars
Leave progress bars displayed in terminal
-a, --write_all Write all the scenes from a file
-w, --write_to_movie Render the scene as a movie file (this is on by default)
-s, --save_last_frame
Save the last frame only (no movie file is generated)
-g, --save_pngs Save each frame as a png
-i, --save_as_gif Save the video as gif
--disable_caching Disable caching (will generate partial-movie-files anyway)
--flush_cache Remove all cached partial-movie-files
--log_to_file Log terminal output to file
-c BACKGROUND_COLOR, --background_color BACKGROUND_COLOR
Specify background color
--media_dir MEDIA_DIR
Directory to store media (including video files)
--log_dir LOG_DIR Directory to store log files
--tex_template TEX_TEMPLATE
Specify a custom TeX template file
--dry_run Do a dry run (render scenes but generate no output files)
-t, --transparent Render a scene with an alpha channel
-q {k,p,h,m,l}, --quality {k,p,h,m,l}
Render at specific quality, short form of the --*_quality flags
--low_quality Render at low quality
--medium_quality Render at medium quality
--high_quality Render at high quality
--production_quality Render at default production quality
--fourk_quality Render at 4K quality
-l DEPRECATED: USE -ql or --quality l
-m DEPRECATED: USE -qm or --quality m
-e DEPRECATED: USE -qh or --quality h
-k DEPRECATED: USE -qk or --quality k
-r RESOLUTION, --resolution RESOLUTION
Resolution, passed as "height,width". Overrides the -l, -m, -e, and -k flags, if present
-n FROM_ANIMATION_NUMBER, --from_animation_number FROM_ANIMATION_NUMBER
Start rendering at the specified animation index, instead of the first animation. If you pass in two comma separated values, e.g. '3,6', it will end
the rendering at the second value
--use_opengl_renderer
Render animations using the OpenGL renderer
--use_webgl_renderer Render animations using the WebGL frontend
--webgl_renderer_path WEBGL_RENDERER_PATH
Path to the WebGL frontend
--webgl_updater_fps WEBGL_UPDATER_FPS
Frame rate to use when generating keyframe data for animations that use updaters while using the WebGL frontend
--config_file CONFIG_FILE
Specify the configuration file
--custom_folders Use the folders defined in the [custom_folders] section of the config file to define the output folder structure
-v {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --verbosity {DEBUG,INFO,WARNING,ERROR,CRITICAL}
Verbosity level. Also changes the ffmpeg log level unless the latter is specified in the config
--version Print the current version of Manim you are using
--progress_bar True/False
Display the progress bar

Made with <3 by the ManimCommunity devs
.. code::

manim -h

Usage: manim [OPTIONS] COMMAND [ARGS]...

Animation engine for explanatory math videos

Options:
--version Show the version and exit.
-h, --help Show this message and exit.

Commands:
render* Render SCENE(S) from the input FILE.
cfg Manages Manim configuration files.
plugins Manages Manim plugins.

Made with <3 by Manim Community developers.

Each of the subcommands has their own help page which can be

.. code::

manim render -h
manim cfg -h
manim plugins -h
4 changes: 2 additions & 2 deletions docs/source/tutorials/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ the following command:

.. code-block:: bash

$ manim scene.py SquareToCircle -pql
$ manim -pql scene.py SquareToCircle

After showing some output, manim should render the scene into a .mp4 file,
and open that file with the default movie player application. You should see a
Expand Down Expand Up @@ -155,7 +155,7 @@ And render it using the following command:

.. code-block:: bash

$ manim scene.py SquareToCircle -pql
$ manim -pql scene.py SquareToCircle

The output should look as follows.

Expand Down
4 changes: 2 additions & 2 deletions example_scenes/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
from manim import *

# To watch one of these scenes, run the following:
# python --quality m manim example_scenes.py SquareToCircle -p
# python --quality m manim -p example_scenes.py SquareToCircle
#
# Use the flag --quality l for a faster rendering at a lower quality.
# Use -s to skip to the end and just save the final frame
# Use the -p to have preview of the animation (or image, if -s was
# used) pop up once done.
# Use -n <number> to skip ahead to the nth animation of a scene.
# Use -r <number> to specify a resolution (for example, -r 1080
# Use -r <number> to specify a resolution (for example, -r 1920,1080
# for a 1920x1080 video)


Expand Down
Loading