mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-07-04 15:37:58 +08:00
Compare commits
10 Commits
v4.13.1
...
gui-scenes
Author | SHA1 | Date | |
---|---|---|---|
ea2ce6505f | |||
b3fd1d209e | |||
8c38db0989 | |||
6da0c36c96 | |||
3b01efa601 | |||
c9ef5e9a75 | |||
6903919767 | |||
f4971d3a43 | |||
e62a3b05ed | |||
152050612e |
14
.github/workflows/pages.yml
vendored
14
.github/workflows/pages.yml
vendored
@ -54,12 +54,16 @@ jobs:
|
||||
with:
|
||||
path: media
|
||||
key: ${{ runner.os }}-media
|
||||
- name: Build animation and convert it into HTML slides
|
||||
- name: Build animations
|
||||
run: |
|
||||
poetry run manim example.py ConvertExample BasicExample ThreeDExample
|
||||
poetry run manim-slides convert ConvertExample docs/source/_static/slides.html -ccontrols=true
|
||||
poetry run manim-slides convert BasicExample docs/source/_static/basic_example.html -ccontrols=true
|
||||
poetry run manim-slides convert ThreeDExample docs/source/_static/three_d_example.html -ccontrols=true
|
||||
- name: Convert animations to HTML slides
|
||||
run: |
|
||||
poetry run manim-slides convert -v DEBUG ConvertExample docs/source/_static/slides.html -ccontrols=true
|
||||
poetry run manim-slides convert -v DEBUG BasicExample docs/source/_static/basic_example.html -ccontrols=true
|
||||
poetry run manim-slides convert -v DEBUG ThreeDExample docs/source/_static/three_d_example.html -ccontrols=true
|
||||
- name: Show docs/source/_static/ dir content (video only)
|
||||
run: tree -L 3 docs/source/_static/ -P '*.mp4'
|
||||
- name: Clear cache
|
||||
run: |
|
||||
gh extension install actions/gh-actions-cache
|
||||
@ -80,6 +84,8 @@ jobs:
|
||||
with:
|
||||
# Upload docs/build/html dir
|
||||
path: docs/build/html/
|
||||
- name: Show docs/build/html/_static/ dir content (video only)
|
||||
run: tree -L 3 docs/build/html/_static/ -P '*.mp4'
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
if: github.event_name != 'pull_request'
|
||||
|
@ -24,7 +24,7 @@ repos:
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: v0.0.263
|
||||
rev: v0.0.265
|
||||
hooks:
|
||||
- id: ruff
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
|
@ -314,6 +314,8 @@ class RevealJS(Converter):
|
||||
file = presentation_config.files[slide_config.start_animation]
|
||||
file = assets_dir / file.name
|
||||
|
||||
logger.debug(f"Writing video section with file {file}")
|
||||
|
||||
# TODO: document this
|
||||
# Videos are muted because, otherwise, the first slide never plays correctly.
|
||||
# This is due to a restriction in playing audio without the user doing anything.
|
||||
@ -349,6 +351,8 @@ class RevealJS(Converter):
|
||||
)
|
||||
full_assets_dir = dirname / assets_dir
|
||||
|
||||
logger.debug(f"Assets will be saved to: {full_assets_dir}")
|
||||
|
||||
os.makedirs(full_assets_dir, exist_ok=True)
|
||||
|
||||
for presentation_config in self.presentation_configs:
|
||||
|
@ -14,7 +14,7 @@ from pydantic import ValidationError
|
||||
from pydantic.color import Color
|
||||
from PySide6.QtCore import Qt, QThread, Signal, Slot
|
||||
from PySide6.QtGui import QCloseEvent, QIcon, QImage, QKeyEvent, QPixmap, QResizeEvent
|
||||
from PySide6.QtWidgets import QApplication, QGridLayout, QLabel, QWidget
|
||||
from PySide6.QtWidgets import QApplication, QFileDialog, QGridLayout, QLabel, QWidget
|
||||
from tqdm import tqdm
|
||||
|
||||
from .commons import config_path_option, verbosity_option
|
||||
@ -1027,6 +1027,22 @@ def present(
|
||||
Use `manim-slide list-scenes` to list all available scenes in a given folder.
|
||||
"""
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
app.setApplicationName("Manim Slides")
|
||||
dialog = QFileDialog()
|
||||
dialog.setDirectory(FOLDER_PATH if os.path.exists(FOLDER_PATH) else "")
|
||||
dialog.setFileMode(QFileDialog.ExistingFiles)
|
||||
dialog.setNameFilters(["JSON (*.json)", "* (*.*)"])
|
||||
if dialog.exec():
|
||||
filenames = dialog.selectedFiles()
|
||||
print(filenames)
|
||||
|
||||
# TODO:
|
||||
# - get files in selected order
|
||||
# - kill dialog
|
||||
# - add cli option (+ envvar) to prompt gui instead of cli
|
||||
# - use scenes selected from gui
|
||||
|
||||
if skip_all:
|
||||
exit_after_last_slide = True
|
||||
|
||||
|
Reference in New Issue
Block a user