Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(docs): document changes
  • Loading branch information
jeertmans committed Aug 21, 2023
commit a8d5f3f74e27cec959d067b41d75567095fc1edd
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,42 @@ pull requests.

In an effort to better document changes, this CHANGELOG document is now created.

### Chore
### Added

- Added the following option aliases to `manim-slides present`:
`-F` and `--full-screen` for `fullscreen`,
`-H` for `--hide-mouse`,
and `-S` for `--screen-number`.
[#243](https://github.com/jeertmans/manim-slides/pull/243)
- Added a full screen key binding (defaults to <kbd>F</kbd>) in the
presenter.
[#243](https://github.com/jeertmans/manim-slides/pull/243)

### Changed

- Automatically concatenate all animations from a slide into one.
This is a **breaking change** because the config file format is
different from the previous one. For migration help, see associated PR.
[#242](https://github.com/jeertmans/manim-slides/pull/242)
- Changed the player interface to only use PySide6, and not a combination of
PySide6 and OpenCV. A few features have been removed (see removed section),
but the new player should be much easier to maintain and more performant,
than its predecessor.
[#243](https://github.com/jeertmans/manim-slides/pull/243)
- Changed the slide config format to exclude unecessary information.
`StypeType` is removed in favor to one boolean `loop` field. This is
a **breaking change** and one should re-render the slides to apply changes.
[#243](https://github.com/jeertmans/manim-slides/pull/243)
- Renamed key bindings in the config. This is a **breaking change** and one
should either manually rename them (see list below) or re-init a config.
List of changes: `CONTINUE` to `NEXT`, `BACK` to `PREVIOUS`, and
`REWIND` to `REPLAY`.
[#243](https://github.com/jeertmans/manim-slides/pull/243)

### Removed

- Removed `--start-at-animation-number` option from `manim-slides present`.
[#242](https://github.com/jeertmans/manim-slides/pull/242)
- Removed the following options from `manim-slides present`:
`--resolution`, `--record-to`, `--resize-mode`, and `--background-color`.
[#243](https://github.com/jeertmans/manim-slides/pull/243)
40 changes: 16 additions & 24 deletions manim_slides/present/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QApplication

from ..commons import config_path_option, verbosity_option
from ..commons import config_path_option, folder_path_option, verbosity_option
from ..config import Config, PresentationConfig
from ..defaults import FOLDER_PATH
from ..logger import logger
from .player import Player

Expand All @@ -22,14 +21,7 @@


@click.command()
@click.option(
"--folder",
metavar="DIRECTORY",
default=FOLDER_PATH,
type=click.Path(exists=True, file_okay=False, path_type=Path),
help="Set slides folder.",
show_default=True,
)
@folder_path_option
@click.help_option("-h", "--help")
@verbosity_option
def list_scenes(folder: Path) -> None:
Expand Down Expand Up @@ -151,34 +143,30 @@ def str_to_int_or_none(value: str) -> Optional[int]:
@click.command()
@click.argument("scenes", nargs=-1)
@config_path_option
@click.option(
"--folder",
metavar="DIRECTORY",
default=FOLDER_PATH,
type=click.Path(exists=True, file_okay=False, path_type=Path),
help="Set slides folder.",
show_default=True,
)
@folder_path_option
@click.option("--start-paused", is_flag=True, help="Start paused.")
@click.option(
"--fullscreen",
"-F",
"--full-screen",
"--fullscreen",
"full_screen",
is_flag=True,
help="Full screen mode.",
help="Toggle full screen mode.",
)
@click.option(
"-s",
"--skip-all",
is_flag=True,
help="Skip all slides, useful the test if slides are working. Automatically sets `--exit-after-last-slide` to True.",
help="Skip all slides, useful the test if slides are working. "
"Automatically sets `--exit-after-last-slide` to True.",
)
@click.option(
"--exit-after-last-slide",
is_flag=True,
help="At the end of last slide, the application will be exited.",
)
@click.option(
"-H",
"--hide-mouse",
is_flag=True,
help="Hide mouse cursor.",
Expand All @@ -198,7 +186,8 @@ def str_to_int_or_none(value: str) -> Optional[int]:
type=str,
callback=start_at_callback,
default=(None, None),
help="Start presenting at (x, y), equivalent to --sacn x --sasn y, and overrides values if not None.",
help="Start presenting at (x, y), equivalent to --sacn x --sasn y, "
"and overrides values if not None.",
)
@click.option(
"--sacn",
Expand All @@ -219,6 +208,7 @@ def str_to_int_or_none(value: str) -> Optional[int]:
help="Start presenting at a given slide number (0 is first, -1 is last).",
)
@click.option(
"-S",
"--screen",
"screen_number",
metavar="NUMBER",
Expand Down Expand Up @@ -246,11 +236,13 @@ def present(
"""
Present SCENE(s), one at a time, in order.

Each SCENE parameter must be the name of a Manim scene, with existing SCENE.json config file.
Each SCENE parameter must be the name of a Manim scene,
with existing SCENE.json config file.

You can present the same SCENE multiple times by repeating the parameter.

Use `manim-slide list-scenes` to list all available scenes in a given folder.
Use `manim-slide list-scenes` to list all available
scenes in a given folder.
"""

if skip_all:
Expand Down
2 changes: 1 addition & 1 deletion manim_slides/present/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def full_screen(self) -> None:

@Slot()
def hide_mouse(self) -> None:
if self.cursor() == Qt.BlankCursor:
if self.cursor().shape() == Qt.BlankCursor:
self.setCursor(Qt.ArrowCursor)
else:
self.setCursor(Qt.BlankCursor)
Expand Down