diff --git a/README.md b/README.md index f7124d52d3..a26816b114 100644 --- a/README.md +++ b/README.md @@ -193,11 +193,6 @@ For users: ```sh manim example_scenes.py SquareToCircle -pl ``` -1. Run the following command: -For developers: -```sh -python3 manim.py example_scenes.py SquareToCircle -pl -``` ![](./readme-assets/command.png) diff --git a/manim/config.py b/manim/config.py index 1fb2e11ced..73e5a90b86 100644 --- a/manim/config.py +++ b/manim/config.py @@ -23,67 +23,72 @@ def parse_cli(): "-p", "--preview", action="store_true", help="Automatically open the saved file once its done", - ), + ) parser.add_argument( "-w", "--write_to_movie", action="store_true", help="Render the scene as a movie file", - ), + ) parser.add_argument( "-s", "--save_last_frame", action="store_true", help="Save the last frame", - ), + ) + parser.add_argument( + "--dry_run", + action="store_true", + help= "Do a dry run (render scenes but generate no output files)", + ) parser.add_argument( "-l", "--low_quality", action="store_true", help="Render at a low quality (for faster rendering)", - ), + ) parser.add_argument( "-m", "--medium_quality", action="store_true", help="Render at a medium quality", - ), + ) parser.add_argument( "--high_quality", action="store_true", help="Render at a high quality", - ), + ) parser.add_argument( "-k", "--four_k", action="store_true", help="Render at a 4K quality", - ), + ) parser.add_argument( "-g", "--save_pngs", action="store_true", help="Save each frame as a png", - ), + ) parser.add_argument( "-i", "--save_as_gif", action="store_true", help="Save the video as gif", - ), + ) parser.add_argument( "-f", "--show_file_in_finder", action="store_true", help="Show the output file in finder", - ), + ) parser.add_argument( "-t", "--transparent", action="store_true", help="Render to a movie file with an alpha channel", - ), + ) parser.add_argument( "-q", "--quiet", action="store_true", help="", - ), + ) parser.add_argument( "-a", "--write_all", action="store_true", help="Write all the scenes from a file", - ), + ) parser.add_argument( "-o", "--file_name", help="Specify the name of the output file, if" @@ -140,8 +145,8 @@ def parse_cli(): def get_configuration(args): file_writer_config = { # By default, write to file - "write_to_movie": args.write_to_movie or not args.save_last_frame, - "save_last_frame": args.save_last_frame, + "write_to_movie": (args.write_to_movie or not args.save_last_frame) and not args.dry_run, + "save_last_frame": args.save_last_frame and not args.dry_run, "save_pngs": args.save_pngs, "save_as_gif": args.save_as_gif, # If -t is passed in (for transparent), this will be RGBA diff --git a/tests/tests_sample_scenes.py b/tests/tests_sample_scenes.py index feca458be3..438568822a 100644 --- a/tests/tests_sample_scenes.py +++ b/tests/tests_sample_scenes.py @@ -2,7 +2,11 @@ # This file is intended to test any new feature added. # Feel free to add a test or to modify one when adding a new/changing a feature. - +class Test(Scene): + def construct(self): + square = Square() + self.play(ShowCreation(square)) + class Test_geometry(Scene): def construct(self): circle = Circle()