mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-05-20 03:57:38 +08:00

* chore(lib/cli): one video per slide As titled, this PR changes how Manim Slides used to work by only storing one video file per slide. Previously, a slide would store all animations that occur during the given slide. Up to now, the only "advantage" of this was that it would allow the user to know which animation is played. But, at the cost of a very complex logic in present, just especially for reversed slides. On top of top, all converter actually need to concatenate the animations from each slide into one, so it is now performed at rendering time. To migrate from previous Manim Slides versions, the best is the render the slides again, using `manim render` or `manimgl render`. Currently, it is not possible to start at a given animation anymore. However, if wanted, I may re-implement this, but this would require to change the config file again. * fix(ci): trying to fix tests * chore(test): renaming files * chore(docs): remove old line from changelog * fix(docs): typo * fix(ci): manimgl and smarter comparison * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
24 lines
608 B
Python
24 lines
608 B
Python
from pathlib import Path
|
|
from typing import List
|
|
|
|
from manim_slides.utils import merge_basenames
|
|
|
|
|
|
def test_merge_basenames(paths: List[Path]) -> None:
|
|
path = merge_basenames(paths)
|
|
assert path.suffix == paths[0].suffix
|
|
assert path.parent == paths[0].parent
|
|
|
|
|
|
def test_merge_basenames_same_with_different_parent_directories(
|
|
paths: List[Path],
|
|
) -> None:
|
|
d1 = Path("a/b/c")
|
|
d2 = Path("d/e/f")
|
|
p1 = d1 / "one.txt"
|
|
p2 = d1 / "a/b/c/two.txt"
|
|
p3 = d2 / "d/e/f/one.txt"
|
|
p4 = d2 / "d/e/f/two.txt"
|
|
|
|
assert merge_basenames([p1, p2]).name == merge_basenames([p3, p4]).name
|