-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add remote option #6
Conversation
Add `-r` or `--remote` option which sends the video using a `data:video/mp4,base64` URL instead of a relative path.
Accidentally used `-r` when it was already being used for resolution, changed to just `--remote`
Thank you, this is a great idea! I'm just not sure about the reassignment of |
@krassowski Yeah I realized that after my first commit and changed it from |
@@ -83,7 +85,6 @@ def manim(self, line, cell): | |||
settings[arg] = False | |||
|
|||
resolution_index = ( | |||
user_args.index('-r') if '-r' in user_args else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant keeping this...
jupyter_manim/__init__.py
Outdated
|
||
|
||
remote_index = ( | ||
user_args.index('-r') if '-r' in user_args else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
....and renaming this.
How about now? If you have anything specific in mind I honestly don't care what the name is. |
Great! Thank you for you contribution. I will look into #5 and release a new version then. |
Oops, forgot to change the README. It still says |
Adds a
--remote
option which sends the video with adata:video/mp4;base64,
URL instead of a relative path. This is useful for when you are working on a remote machine like Google Colab and don't have access to the filesystem. Thedata:
URL sends the entire base64 encoded file in thesrc
of the video HTML if the--remote
option is passed to the cell magic.I have tested this on Google Colab and it works like a charm. Would love to see this pushed so I can shorten by setup cell to just an import rather that all this code.
Appreciate this library!