Skip to content

Deprecated CLI flag is advertised on our github front page #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cobordism opened this issue Oct 19, 2020 · 12 comments · Fixed by #586
Closed

Deprecated CLI flag is advertised on our github front page #572

cobordism opened this issue Oct 19, 2020 · 12 comments · Fixed by #586
Labels
documentation Improvements or additions to documentation pr:bugfix Bug fix for use in PRs solving a specific issue:bug

Comments

@cobordism
Copy link
Member

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.

@leotrs
Copy link
Contributor

leotrs commented Oct 19, 2020

Adding this to #148

@leotrs leotrs mentioned this issue Oct 19, 2020
13 tasks
@eulertour
Copy link
Member

How was that picture even created?

@leotrs
Copy link
Contributor

leotrs commented Oct 19, 2020

This has been there since The Beginning.

@cobordism
Copy link
Member Author

@eulertour
Copy link
Member

Yeah, that'd be perfect

@cobordism
Copy link
Member Author

cobordism commented Oct 20, 2020

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 ^^

@behackl behackl added this to the v0.2 milestone Oct 22, 2020
@eulertour eulertour mentioned this issue Oct 22, 2020
6 tasks
@behackl behackl added pr:bugfix Bug fix for use in PRs solving a specific issue:bug documentation Improvements or additions to documentation labels Oct 22, 2020
@cobordism cobordism mentioned this issue Oct 22, 2020
1 task
@safinsingh
Copy link
Contributor

safinsingh commented Oct 22, 2020

How was that picture even created?

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

@kolibril13
Copy link
Member

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)

@cobordism
Copy link
Member Author

cliExample

@jsonvillanueva
Copy link
Member

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

@leotrs
Copy link
Contributor

leotrs commented Oct 28, 2020

@jsonvillanueva yes, but separating them is better for explanation

@behackl behackl linked a pull request Oct 31, 2020 that will close this issue
1 task
@cobordism
Copy link
Member Author

Shall we update the image to include the subcommand "render"?

Context: since release 0.5.0 the command manim render is / can be used to render video output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation pr:bugfix Bug fix for use in PRs solving a specific issue:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants