Compare commits

...

10 Commits

Author SHA1 Message Date
ea2ce6505f Merge branch 'main' into gui-scenes 2023-05-11 10:30:08 +02:00
b3fd1d209e [pre-commit.ci] pre-commit autoupdate (#184)
updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.263 → v0.0.265](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.263...v0.0.265)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-09 10:27:21 +02:00
8c38db0989 chore(convert): add debug message 2023-05-08 19:15:31 +02:00
6da0c36c96 Revert "try(ci): remove cache for media"
This reverts commit 3b01efa6018dfb0902cfcd92e713ac8dd8f70e67.
2023-05-08 19:10:48 +02:00
3b01efa601 try(ci): remove cache for media 2023-05-08 18:39:14 +02:00
c9ef5e9a75 fix(pages): missing assets (#183)
* fix(pages): missing assets

This is a PR to try understanding why some assets are not present

* fix(ci): correct path

* fix(ci): fix path..

* chore(ci): add debug

* chore(ci): more and more debug
2023-05-08 17:43:58 +02:00
6903919767 Merge branch 'main' into gui-scenes 2023-02-01 10:21:35 +01:00
f4971d3a43 Merge branch 'main' into gui-scenes 2022-12-14 08:53:45 +01:00
e62a3b05ed [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-12-09 10:09:39 +00:00
152050612e feat(cli): prompt scenes from gui 2022-12-09 11:08:26 +01:00
4 changed files with 32 additions and 6 deletions

View File

@ -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'

View File

@ -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

View File

@ -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:

View File

@ -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