Skip to content

Commit

Permalink
chore(lib): simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jeertmans committed Nov 1, 2024
1 parent d9c7e3f commit debd631
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions manim_slides/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,19 +395,16 @@ def convert_to(self, dest: Path) -> None: # noqa: C901
Convert this configuration into a RevealJS HTML presentation, saved to
DEST.
"""
if self.data_uri and not self.offline:
assets_dir = None # Actually we won't care.
else:
dirname = dest.parent
basename = dest.stem
ext = dest.suffix
dirname = dest.parent
basename = dest.stem
ext = dest.suffix

assets_dir = Path(
self.assets_dir.format(dirname=dirname, basename=basename, ext=ext)
)
full_assets_dir = dirname / assets_dir
assets_dir = Path(
self.assets_dir.format(dirname=dirname, basename=basename, ext=ext)
)
full_assets_dir = dirname / assets_dir

if assets_dir is not None:
if not self.data_uri or self.offline:
logger.debug(f"Assets will be saved to: {full_assets_dir}")
full_assets_dir.mkdir(parents=True, exist_ok=True)

Expand Down

0 comments on commit debd631

Please sign in to comment.