GithubHelp home page GithubHelp logo

manimcommunity / discordmanimator Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 20.0 132 KB

A Manim Rendering Bot for Discord. Requires a Functioning Manim install.

License: MIT License

Python 100.00%
bot discord discord-bot hacktoberfest hacktoberfest2021

discordmanimator's People

Contributors

aathish04 avatar ad-chaos avatar behackl avatar chirag-droid avatar darylgolden avatar hydrobeam avatar infiniteregrets avatar jsonvillanueva avatar kolibril13 avatar kraktus avatar lgtm-com[bot] avatar naveen521kk avatar nveshaan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

discordmanimator's Issues

Add an option to translate scene code to docstings with -docsting

image
Would be possible with this script.

import re
from textwrap import indent
inputstring= """
class EllipseExample(Scene):
    def construct(self):
        ellipse_1 = Ellipse(width=2.0, height=4.0, color=BLUE_B)
        self.add(ellipse_1)
"""
inputstring= indent(inputstring, '    ')
template="""
\"""
Examples
--------

.. manim:: CLASSNAMEHERE
    :save_last_frame:

    CODEHERE
\"""
"""

outputstring=template.replace("CODEHERE", inputstring)
#possible_scene_names = ["Scene", "GraphScene"]
first_word = "class "
scene_name = "Scene" # does not support e.g. GraphScene yet. Maybe with a for loop ?
classname=re.search(fr'{first_word}(.*?).({scene_name})', inputstring).group(1)
outputstring= outputstring.replace("CLASSNAMEHERE", classname)
print(outputstring)

"""

outputstring=template.replace("CODEHERE", inputstring)
first_word = "class "
scene_name = "Scene" # does not support e.g. GraphScene yet. Maybe with a for loop ? #possible_scene_names = ["Scene", "GraphScene"]
classname=re.search(fr'{first_word}(.*?).({scene_name})', inputstring).group(1)
outputstring= outputstring.replace("CLASSNAMEHERE", classname)
print(outputstring)

Making `!mhelp` more descriptive

Making !mhelp more descriptive by adding info about !mdocstring, !mdoc, !msearch would be nice, as beginners can know how to use DiscordManimator bot efficiently in discord.

Currently, !mhelp is returning info only about !manimate. It is much better if we include info about !mdocstring, !mdoc, !msearch as well.

Manim version in !mdoc

It would be nice if you could specify the manim version you want !mdoc for for users troubleshooting a problem on old versions. Something like !mdoc 0.4.0 LaggedStart

Current passed cli flags should be persistent with the rerender button

Currently the bot resets the cli flags when pressing the rerender button and automagically rerender when pressing the change settings button which makes it pretty difficult to test scenes which actually use command line flags because you have to retype them everytime you want to render something.

Long render queries block the heartbeat of the bot

          It seems as if long (>30 sec?) render queries block the heartbeat of the bot; the communication with docker should be made asynchronous if possible. (There is https://aiodocker.readthedocs.io/en/latest/index.html which could be a suitable replacement for the docker package.)

Originally posted by @behackl in #38 (comment)

Send long tracebacks as file

Currently, the bot does not send anything if attempting to manimate something results in a traceback that is too long.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.