Manim: Deprecated CLI flag is advertised on our github front page

Created on 19 Oct 2020  路  11Comments  路  Source: ManimCommunity/manim

The main picture on our github landing page is

manim file.py Scene -pl

We should change it to manim myFile.py myScene -p -ql ... or even manimce if that is what we decide on as an entrypoint.

bug documentation

Most helpful comment

cliExample

All 11 comments

Adding this to #148

How was that picture even created?

This has been there since The Beginning.

Yeah, that'd be perfect

class cliExample(Scene):
    def construct(self):
        def myTex(*args, **kwargs):
            return Tex(
                *args,
                tex_template=TexFontTemplates.latin_modern_tw,
                background_stroke_width=0,
                **kwargs
            )

        cmd = myTex(
            r"\textbf{manim}",
            r"\textbf{  myfile.py}",
            r"\textbf{  MyScene}",
            r"\textbf{  -ql -p}",
        ).shift(1.5 * UP)
        cmd.set_color_by_tex("manim", "#AA0000")
        cmd.set_color_by_tex("file", "#0000AA")
        cmd.set_color_by_tex("Scene", PURPLE)
        cmd.set_color_by_tex("ql", GREEN)

        e1 = (
            myTex(r"The manim\\command", color=BLACK, tex_environment=None)
            .scale(0.4)
            .align_to(cmd[0], LEFT, alignment_vect=LEFT)
            .set_y(cmd[1].get_y(direction=DOWN) - 0.15, direction=UP)
        )
        e2 = (
            myTex(r"File containing\\your animation", color=BLACK, tex_environment=None)
            .scale(0.4)
            .align_to(cmd[1], LEFT, alignment_vect=LEFT)
            .set_y(cmd[1].get_y(direction=DOWN) - 0.15, direction=UP)
        )
        e3 = (
            myTex(
                r"(Optional) \\Name of the\\ scene to render",
                color=BLACK,
                tex_environment=None,
            )
            .scale(0.4)
            .align_to(cmd[2], LEFT, alignment_vect=LEFT)
            .set_y(cmd[2].get_y(direction=DOWN) - 0.15, direction=UP)
        )
        e4 = (
            myTex(
                r"(Optional) \\Render in \\low quality,\\ autoplay when\\ done rendering",
                color=BLACK,
                tex_environment=None,
            )
            .scale(0.4)
            .align_to(cmd[3], LEFT, alignment_vect=LEFT)
            .set_y(cmd[3].get_y(direction=DOWN) - 0.15, direction=UP)
        )

        self.add(cmd, e1, e2, e3, e4)
        self.wait(1)

^^ UPDATED SCRIPT ^^

How was that picture even created?

@eulertour in case you were still curious, I made that with Google Drawings 馃槅

image
Two things to note here: myscene should not have the .py ending and further, it should be CamelCase.
I updated the script:

class cliExample(Scene):
    def construct(self):
        def myTex(*args, **kwargs):
            return Tex(
                *args,
                tex_template=TexFontTemplates.latin_modern_tw,
                background_stroke_width=0,
                **kwargs
            )

        cmd = myTex(
            r"\textbf{manim}",
            r"\textbf{  myfile.py}",
            r"\textbf{  MyScene}",
            r"\textbf{  -ql -p}",
        ).shift(1.5 * UP)
        cmd.set_color_by_tex("manim", "#AA0000")
        cmd.set_color_by_tex("file", DARK_BLUE)
        cmd.set_color_by_tex("MyScene", PURPLE)
        cmd.set_color_by_tex("ql", GREEN)

        e1 = (
            myTex(r"The manim\\command", color=BLACK, tex_environment=None)
                .scale(0.4)
                .align_to(cmd[0], LEFT, alignment_vect=LEFT)
                .set_y(cmd[1].get_y(direction=DOWN) - 0.15, direction=UP)
        )
        e2 = (
            myTex(r"File containing\\your animation", color=BLACK, tex_environment=None)
                .scale(0.4)
                .align_to(cmd[1], LEFT, alignment_vect=LEFT)
                .set_y(cmd[1].get_y(direction=DOWN) - 0.15, direction=UP)
        )
        e3 = (
            myTex(
                r"(Optional) \\Name of the\\ scene to render",
                color=BLACK,
                tex_environment=None,
            )
                .scale(0.4)
                .align_to(cmd[2], LEFT, alignment_vect=LEFT)
                .set_y(cmd[2].get_y(direction=DOWN) - 0.15, direction=UP)
        )
        e4 = (
            myTex(
                r"(Optional) \\Render in \\low quality,\\ autoplay when\\ done rendering",
                color=BLACK,
                tex_environment=None,
            )
                .scale(0.4)
                .align_to(cmd[3], LEFT, alignment_vect=LEFT)
                .set_y(cmd[3].get_y(direction=DOWN) - 0.15, direction=UP)
        )

        self.add(cmd, e1, e2, e3, e4)
        self.wait(1)

cliExample

It's worth note, you can combine the options -ql and -p into -pql

@jsonvillanueva yes, but separating them is better for explanation

Was this page helpful?
0 / 5 - 0 ratings

Related issues

XorUnison picture XorUnison  路  6Comments

ChristianCoenen picture ChristianCoenen  路  5Comments

huguesdevimeux picture huguesdevimeux  路  4Comments

nilaybhatia picture nilaybhatia  路  7Comments

PgBiel picture PgBiel  路  5Comments