Manim-Code-Blocks
Manim-Code-Blocks is a library for Manim that allows animating blocks of code in Manim videos and scenes.
Example Usage
from manim import *
from manim_code_blocks import *
class Main(Scene):
def construct(self):
java = CodeBlock(
"""
public class Main {
public static void main(String[] args) {
System.out.println("Hello world");
}
}
""",
language = Java
)
self.play(*java.create(run_time = 3))
Outputs:
Problems & Limitations
Limited Language Support
Currently only the following languages are supported for syntax highlighting:
- C
- C#
- C++
- Java
- JavaScript
- Lua
- Go
- Python
- Rust
- TypeScript
To add language support, submit a pull request to to the Tokenize-All module.
Unintelligent Highlighting
Manim-Code-Block uses syntax highlighting, not semantic highlighting. The source code is only tokenized, not parsed, and as such accurate highlighting can be impossible for certain circumstances. Syntax highlighting is provided by the Tokenize-All module, which lacks thorough language support. Additionally many languages have not been thoroughly tested enough for accurate highlighting. If you find an issue in your syntax highlighting, please report it to the issues thread.
Lack of Themes
Currently the only theme supported out of the box is the One Dark Pro theme from Atom and used in Visual Studio Code. Adding a custom theme is possible (and simple), however currently this is the only theme supported out of the box.
Metadata
Release files for manim-code-blocks 1.0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| manim_code_blocks-1.0.13.tar.gz | 6.0 kB | Without provenance | Details for manim_code_blocks-1.0.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| manim_code_blocks-1.0.13-py3-none-any.whl | Python 3 | none | any | Details for manim_code_blocks-1.0.13-py3-none-any.whl |
Total release size: 12.8 kB
Release files / manim_code_blocks-1.0.13.tar.gz
| Download URL | manim_code_blocks-1.0.13.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddd389b5d425c81f9a6358ac266589e6e5d7be4001662af6f1bc9154927fa534
|
|
BLAKE2b-256 checksum How to use checksums |
91805d088f732d011cbf9a19b576c0aeaf095b599cfee988e2f88a699119cc7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / manim_code_blocks-1.0.13-py3-none-any.whl
| Download URL | manim_code_blocks-1.0.13-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98c1a135f7ea5aa010806c7d1ff8d84e7378e42365a232db0de81ce344a4f336
|
|
BLAKE2b-256 checksum How to use checksums |
2975fdc551b64d2951c7f98f0f65d41b32048ee49daf9715eb4cf0ae964182b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Security for manim-code-blocks 1.0.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.