diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 0000000..3dbd1b4 --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,12 @@ +[bumpversion] +current_version = 4.13.1 +commit = True +message = chore(version): bump {current_version} to {new_version} + +[bumpversion:file:manim_slides/__version__.py] +search = __version__ = "{current_version}" +replace = __version__ = "{new_version}" + +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b96e101 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: +- package-ecosystem: github-actions + directory: / + schedule: + interval: daily + labels: + - dependencies diff --git a/.github/workflows/clearcache.yml b/.github/workflows/clearcache.yml new file mode 100644 index 0000000..d2295b3 --- /dev/null +++ b/.github/workflows/clearcache.yml @@ -0,0 +1,34 @@ +# From: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries +name: Cleanup caches by a branch +on: + pull_request: + types: + - closed + +jobs: + cleanup: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Cleanup + run: | + gh extension install actions/gh-actions-cache + + REPO=${{ github.repository }} + BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" + + echo "Fetching list of cache key" + cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 ) + + ## Setting this to not fail the workflow while deleting cache keys. + set +e + echo "Deleting caches..." + for cacheKey in $cacheKeysForPR + do + gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm + done + echo "Done" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml new file mode 100644 index 0000000..1ad0c0c --- /dev/null +++ b/.github/workflows/draft-pdf.yml @@ -0,0 +1,33 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Create JOSE Paper + +on: + # Runs on pushes targeting the default branch + push: + paths: + - paper/* + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + paper: + runs-on: ubuntu-latest + name: Paper Draft + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build draft PDF + uses: openjournals/openjournals-draft-action@master + with: + journal: jose + # This should be the path to the paper within your repo. + paper-path: paper/paper.md + - name: Upload + uses: actions/upload-artifact@v1 + with: + name: paper + # This is the output path where Pandoc will write the compiled + # PDF. Note, this should be the same directory as the input + # paper.md + path: paper/paper.pdf diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index ea94e3e..6055b18 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -25,6 +25,7 @@ concurrency: jobs: # Single deploy job since we're just deploying deploy: + permissions: write-all environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} @@ -42,23 +43,33 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v2 - name: Install Linux Dependencies - run: sudo apt install libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev - - name: Install Python dependencies - run: pip install manim sphinx sphinx_click furo + run: | + sudo apt-get update + sudo apt-get install libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev - name: Install local Python package - run: poetry install --with docs + run: poetry install --extras=manim --with docs - name: Restore cached media id: cache-media-restore uses: actions/cache/restore@v3 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 + gh actions-cache delete ${{ steps.cache-media-restore.outputs.cache-primary-key }} --confirm || true + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Save media to cache id: cache-media-save uses: actions/cache/save@v3 @@ -73,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' diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 02ba7ff..42c32a9 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,4 +1,3 @@ -# Modified from: https://github.com/pypa/cibuildwheel name: Upload Python Package on: @@ -8,41 +7,28 @@ on: types: [published] jobs: - build_wheels: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] + build_and_release: + name: Build and release + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v3 - - uses: actions/setup-python@v2 + - name: Install Poetry + run: pipx install poetry - - name: Install build package - run: python -m pip install -U build + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + cache: poetry - name: Build wheels - run: python -m build --sdist + run: poetry build - - uses: actions/upload-artifact@v2 - with: - name: dist - path: dist/*.tar.* - - release: - name: Release - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - runs-on: ubuntu-latest - needs: [build_wheels] - steps: - - uses: actions/download-artifact@v2 - with: - name: dist - path: dist/ - - name: Upload to PyPI - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + - name: Publish to PyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + env: + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }} + run: poetry publish diff --git a/.github/workflows/test_examples.yml b/.github/workflows/test_examples.yml index 38d9914..6dfb629 100644 --- a/.github/workflows/test_examples.yml +++ b/.github/workflows/test_examples.yml @@ -1,6 +1,8 @@ on: pull_request: paths: + - pyproject.toml + - poetry.lock - '**.py' - .github/workflows/test_examples.yml workflow_dispatch: @@ -74,6 +76,9 @@ jobs: - name: Install manimgl dependencies on MacOS if: matrix.os == 'macos-latest' && matrix.manim == 'manimgl' run: brew install ffmpeg + - name: Run apt-get update on Ubuntu + if: matrix.os == 'ubuntu-latest' + run: sudo apt-get update - name: Install manim dependencies on Ubuntu if: matrix.os == 'ubuntu-latest' && matrix.manim == 'manim' run: | diff --git a/.gitignore b/.gitignore index 9b36bef..edef042 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,9 @@ docs/source/_static/basic_example.html docs/source/_static/three_d_example.html docs/source/_static/three_d_example_assets/ + +paper/media/ + +*.jats + +paper/paper.pdf diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 05c047d..0aa3e04 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: isort name: isort (python) - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.6.0 + rev: v2.8.0 hooks: - id: pretty-format-yaml args: [--autofix] @@ -20,15 +20,15 @@ repos: exclude: poetry.lock args: [--autofix] - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.3.0 hooks: - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.237 + rev: v0.0.265 hooks: - id: ruff - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.991 + rev: v1.2.0 hooks: - id: mypy additional_dependencies: [types-requests, types-setuptools] diff --git a/README.md b/README.md index 6c01190..c4f5db0 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,18 @@ -![Manim Slides Logo](https://raw.githubusercontent.com/jeertmans/manim-slides/main/static/logo.png) + + + + Manim Slides Logo + [![Latest Release][pypi-version-badge]][pypi-version-url] [![Python version][pypi-python-version-badge]][pypi-version-url] -![PyPI - Downloads](https://img.shields.io/pypi/dm/manim-slides) +[![PyPI - Downloads][pypi-download-badge]][pypi-version-url] +[![Documentation][documentation-badge]][documentation-url] # Manim Slides Tool for live presentations using either [Manim (community edition)](https://www.manim.community/) or [ManimGL](https://3b1b.github.io/manim/). Manim Slides will *automatically* detect the one you are using! -> **_NOTE:_** This project extends the work of [`manim-presentation`](https://github.com/galatolofederico/manim-presentation), with a lot more features! +> **NOTE:** this project extends the work of [`manim-presentation`](https://github.com/galatolofederico/manim-presentation), with a lot more features! - [Installation](#installation) * [Dependencies](#dependencies) @@ -22,6 +27,9 @@ Tool for live presentations using either [Manim (community edition)](https://www - [F.A.Q](#faq) * [How to increase quality on Windows](#how-to-increase-quality-on-windows) - [Contributing](#contributing) + * [Reporting an Issue](#reporting-an-issue) + * [Seeking for Help](#seeking-for-help) + * [Contact](#contact) ## Installation @@ -49,6 +57,16 @@ The recommended way to install the latest release is to use pip: pip install manim-slides ``` +Optionally, you can also install Manim or ManimGL using extras[^1]: + +```bash +pip install manim-slides[manim] # For Manim +# or +pip install manim-slides[manimgl] # For ManimGL +``` + +[^1]: NOTE: you still need to have Manim or ManimGL platform-specific dependencies installed on your computer. + ### Install From Repository An alternative way to install Manim Slides is to clone the git repository, and install from there: read the [contributing guide](https://eertmans.be/manim-slides/contributing/workflow.html) to know how. @@ -60,7 +78,7 @@ An alternative way to install Manim Slides is to clone the git repository, and i Using Manim Slides is a two-step process: -1. Render animations using `Slide` (resp. `ThreeDSlide`) as a base class instead of `Scene` (resp. `ThreeDScene`), and add calls to `self.pause()` everytime you want to create a new slide. +1. Render animations using `Slide` (resp. `ThreeDSlide`) as a base class instead of `Scene` (resp. `ThreeDScene`), and add calls to `self.next_slide()` everytime you want to create a new slide. 2. Run `manim-slides` on rendered animations and display them like a *Power Point* presentation. The documentation is available [online](https://eertmans.be/manim-slides/). @@ -82,14 +100,14 @@ class BasicExample(Slide): dot = Dot() self.play(GrowFromCenter(circle)) - self.pause() # Waits user to press continue to go to the next slide + self.next_slide() # Waits user to press continue to go to the next slide self.start_loop() # Start loop self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear) self.end_loop() # This will loop until user inputs a key self.play(dot.animate.move_to(ORIGIN)) - self.pause() # Waits user to press continue to go to the next slide + self.next_slide() # Waits user to press continue to go to the next slide ``` First, render the animation files: @@ -118,7 +136,11 @@ manim-slides BasicExample The default key bindings to control the presentation are: -![manim-wizard](https://user-images.githubusercontent.com/27275099/197468787-19c83a81-d757-47b9-8f68-218427d30298.png) + + + + Manim Slides Wizard + You can run the **configuration wizard** to change those key bindings: @@ -181,6 +203,58 @@ in *Settings*->*Display*. Contributions are more than welcome! Please read through [our contributing section](https://eertmans.be/manim-slides/contributing/index.html). +### Reporting an Issue + + + +If you think you found a bug, +an error in the documentation, +or wish there was some feature that is currently missing, +we would love to hear from you! + +The best way to reach us is via the +[GitHub issues](https://github.com/jeertmans/manim-slides/issues). +If your problem is not covered by an already existing (closed or open) issue, +then we suggest you create a +[new issue](https://github.com/jeertmans/manim-slides/issues/new/choose). +You can choose from a list of templates, or open a +[blank issue](https://github.com/jeertmans/manim-slides/issues/new) +if your issue does not fit one of the proposed topics. + +The more precise you are in the description of your problem, the faster we will +be able to help you! + + + +### Seeking for help + + + +Sometimes, you may have a question about Manim Slides, +not necessarily an issue. + +There are two ways you can reach us for questions: + +- via the `Question/Help/Support` topic when +[choosing an issue template](https://github.com/jeertmans/manim-slides/issues/new/choose); +- or via +[GitHub discussions](https://github.com/jeertmans/manim-slides/discussions). + + + +### Contact + + + +Finally, if you do not have any GitHub account, +or just wish to contact the author of Manim Slides, +you can do so at: [jeertmans@icloud.com](mailto:jeertmans@icloud.com). + + + [pypi-version-badge]: https://img.shields.io/pypi/v/manim-slides?label=manim-slides [pypi-version-url]: https://pypi.org/project/manim-slides/ [pypi-python-version-badge]: https://img.shields.io/pypi/pyversions/manim-slides +[pypi-download-badge]: https://img.shields.io/pypi/dm/manim-slides +[documentation-badge]: https://img.shields.io/website?down_color=lightgrey&down_message=offline&label=documentation&up_color=green&up_message=online&url=https%3A%2F%2Feertmans.be%2Fmanim-slides%2F +[documentation-url]: https://eertmans.be/manim-slides/ diff --git a/docs/source/_static/logo.png b/docs/source/_static/logo.png deleted file mode 100644 index 0b71c00..0000000 Binary files a/docs/source/_static/logo.png and /dev/null differ diff --git a/docs/source/_static/logo.png b/docs/source/_static/logo.png new file mode 120000 index 0000000..7e21ebe --- /dev/null +++ b/docs/source/_static/logo.png @@ -0,0 +1 @@ +../../../static/logo.png \ No newline at end of file diff --git a/docs/source/_static/logo_dark_docs.png b/docs/source/_static/logo_dark_docs.png new file mode 120000 index 0000000..51aeeae --- /dev/null +++ b/docs/source/_static/logo_dark_docs.png @@ -0,0 +1 @@ +../../../static/logo_dark_docs.png \ No newline at end of file diff --git a/docs/source/_static/logo_dark_github.png b/docs/source/_static/logo_dark_github.png new file mode 120000 index 0000000..b069161 --- /dev/null +++ b/docs/source/_static/logo_dark_github.png @@ -0,0 +1 @@ +../../../static/logo_dark_github.png \ No newline at end of file diff --git a/docs/source/_static/logo_dark_transparent.png b/docs/source/_static/logo_dark_transparent.png new file mode 120000 index 0000000..73a4e6e --- /dev/null +++ b/docs/source/_static/logo_dark_transparent.png @@ -0,0 +1 @@ +../../../static/logo_dark_transparent.png \ No newline at end of file diff --git a/docs/source/_static/logo_light_transparent.png b/docs/source/_static/logo_light_transparent.png new file mode 120000 index 0000000..1cff6fd --- /dev/null +++ b/docs/source/_static/logo_light_transparent.png @@ -0,0 +1 @@ +../../../static/logo_light_transparent.png \ No newline at end of file diff --git a/docs/source/_static/wizard_dark.png b/docs/source/_static/wizard_dark.png new file mode 120000 index 0000000..ed73bb3 --- /dev/null +++ b/docs/source/_static/wizard_dark.png @@ -0,0 +1 @@ +../../../static/wizard_dark.png \ No newline at end of file diff --git a/docs/source/_static/wizard_light.png b/docs/source/_static/wizard_light.png new file mode 120000 index 0000000..e2ad159 --- /dev/null +++ b/docs/source/_static/wizard_light.png @@ -0,0 +1 @@ +../../../static/wizard_light.png \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index a0de36c..cc8f7d4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,6 +24,11 @@ extensions = [ "sphinx_copybutton", ] +myst_enable_extensions = [ + "colon_fence", + "html_admonition", +] + templates_path = ["_templates"] exclude_patterns = [] @@ -35,6 +40,8 @@ html_theme = "furo" html_static_path = ["_static"] html_theme_options = { + "light_logo": "logo_light_transparent.png", + "dark_logo": "logo_dark_transparent.png", "footer_icons": [ { "name": "GitHub", @@ -52,10 +59,15 @@ html_theme_options = { "source_directory": "docs/source/", } -## -- Intersphinx mapping +# -- Intersphinx mapping intersphinx_mapping = { "python": ("https://docs.python.org/3", None), "manim": ("https://docs.manim.community/en/stable/", None), "manimlib": ("https://3b1b.github.io/manim/", None), } + +# -- OpenGraph settings + +ogp_site_url = "https://eertmans.be/manim-slides/" +ogp_use_first_image = True diff --git a/docs/source/contributing/index.md b/docs/source/contributing/index.md index 7cf0fe7..fc99e12 100644 --- a/docs/source/contributing/index.md +++ b/docs/source/contributing/index.md @@ -2,10 +2,14 @@ Thank you for your interest in Manim Slides! ✨ -Manim Slides is an open source project, first created as a fork of [manim-presentation](https://github.com/galatolofederico/manim-presentation) (now deprecated in favor to Manim Slides), and we welcome contributions of all forms. - -This section is here to help fist-time contributors know how they can help this project grow. Whether you are already familiar with Manim or GitHub, it is worth taking a few minutes to read those documents! +Manim Slides is an open source project, first created as a fork of +[manim-presentation](https://github.com/galatolofederico/manim-presentation) +(now deprecated in favor to Manim Slides), +and we welcome contributions of all forms. +This section is here to help fist-time contributors know how they can help this +project grow. Whether you are already familiar with Manim or GitHub, +it is worth taking a few minutes to read those documents! ```{toctree} :hidden: @@ -19,3 +23,24 @@ internals [Internals](./internals) : how Manim Slides is built and how the various parts of it work. + +## Reporting an Issue + +```{include} ../../../README.md +:start-after: +:end-before: +``` + +## Seeking for Help + +```{include} ../../../README.md +:start-after: +:end-before: +``` + +## Contact + +```{include} ../../../README.md +:start-after: +:end-before: +``` diff --git a/docs/source/contributing/workflow.md b/docs/source/contributing/workflow.md index 6480751..f397fbe 100644 --- a/docs/source/contributing/workflow.md +++ b/docs/source/contributing/workflow.md @@ -11,7 +11,7 @@ This document is there to help you recreate a working environment for Manim Slid ## Forking the repository and cloning it locally -We used GitHub to host Manim Slides' repository, and we encourage contributors to use git. +We use GitHub to host Manim Slides' repository, and we encourage contributors to use git. Useful links: @@ -30,6 +30,32 @@ With Poetry, installation becomes straightforward: poetry install ``` +This, however, only installs the minimal set of dependencies to run the package. + +If you would like to install Manim or ManimGL, as documented in the [quickstart](../quickstart), +you can use the `--extras` option: + +```bash +poetry install --extras manim # For Manim +# or +poetry install --extras manimgl # For ManimGL +``` + +Additionnally, Manim Slides comes with group dependencies for development purposes: + +```bash +poetry install --with dev # For linters and formatters +# or +poetry install --with docs # To build the documentation locally +``` + +Another group is `test`, but it is only used for +[GitHub actions](https://github.com/jeertmans/manim-slides/blob/main/.github/workflows/test_examples.yml). + +:::{note} +You can combine any number of groups or extras when installing the package locally. +::: + ## Running commands As modules were installed in a new Python environment, you cannot use them directly in the shell. @@ -42,7 +68,7 @@ poetry run manim-slides wizard or enter a new shell that uses this new Python environment: ``` -poetry run +poetry shell manim-slides wizard ``` diff --git a/docs/source/features_table.md b/docs/source/features_table.md new file mode 100644 index 0000000..da366a4 --- /dev/null +++ b/docs/source/features_table.md @@ -0,0 +1,27 @@ +# Features Table + +The following summarizes the different presentation features Manim Slides offers. + +:::{table} Comparison of the different presentation methods. +:widths: auto +:align: center + +| Feature / Constraint | [`present`](reference/cli.md) | [`convert --to=html`](reference/cli.md) | [`convert --to=pptx`](reference/cli.md) | +| :--- | :---: | :---: | :---: | +| Basic navigation through slides | Yes | Yes | Yes | +| Replay slide | Yes | No | No | +| Pause animation | Yes | No | No | +| Play slide in reverse | Yes | No | No | +| Slide count | Yes | Yes (optional) | Yes (optional) | +| Animation count | Yes | No | No | +| Needs Python with Manim Slides installed | Yes | No | No | +| Requires internet access | No | Yes | No | +| Auto. play slides | Yes | Yes | Yes | +| Loops support | Yes | Yes | Yes | +| Fully customizable | No | Yes (`--use-template` option) | No | +| Other dependencies | None | A modern web browser | PowerPoint or LibreOffice Impress[^1] +| Works cross-platforms | Yes | Yes | Partly[^1][^2] | +::: + +[^1]: If you encounter a problem where slides do not automatically play or loops do not work, please [file an issue on GitHub](https://github.com/jeertmans/manim-slides/issues/new/choose). +[^2]: PowerPoint online does not seem to support automatic playing of videos, so you need LibreOffice Impress on Linux platforms. diff --git a/docs/source/index.md b/docs/source/index.md index e044a29..d3d30ac 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -1,11 +1,21 @@ --- hide-toc: true +og:description: Manim Slides makes creating slides with Manim super easy! --- ```{eval-rst} -.. image:: _static/logo.png +.. image:: _static/logo_light_transparent.png :width: 600px :align: center + :class: only-light + :alt: Manim Slide logo +``` + +```{eval-rst} +.. image:: _static/logo_dark_transparent.png + :width: 600px + :align: center + :class: only-dark :alt: Manim Slide logo ``` @@ -29,6 +39,7 @@ Slide through the demo below to get a quick glimpse on what you can do with Mani quickstart reference/index +features_table ``` ```{toctree} diff --git a/docs/source/reference/api.md b/docs/source/reference/api.md index 62ea77f..7c6a586 100644 --- a/docs/source/reference/api.md +++ b/docs/source/reference/api.md @@ -1,12 +1,12 @@ # Application Programming Interface -Manim Slides' API is very limited: it simply consists in two classes, `Slide` and `ThreeDSlide`, which are subclasses of `Scene` and `ThreeDScene` from Manim. +Manim Slides' API is very limited: it simply consists of two classes, `Slide` and `ThreeDSlide`, which are subclasses of `Scene` and `ThreeDScene` from Manim. Thefore, we only document here the methods we think the end-user will ever use, not the methods used internally when rendering. ```{eval-rst} .. autoclass:: manim_slides.Slide - :members: start_loop, end_loop, pause, play + :members: start_loop, end_loop, pause, next_slide .. autoclass:: manim_slides.ThreeDSlide :members: diff --git a/docs/source/reference/gui.md b/docs/source/reference/gui.md new file mode 100644 index 0000000..75ec189 --- /dev/null +++ b/docs/source/reference/gui.md @@ -0,0 +1,71 @@ +# Graphical User Interface + +Manim Slides' graphical user interface (GUI) is the *de facto* way to present slides. + +If you do not specify one of the commands listed in the [CLI reference](./cli), +Manim Slides will use **present** by default, which launches a GUI window, +playing your scene(s) like so: + +```bash +manim-slides [present] [SCENES]... +``` + +Some optional parameters can be specified and can be listed with: + +```bash +manim-slides present --help +``` + +:::{note} +All the `SCENES` must be in the same folder (`--folder DIRECTORY`), which +defaults to `./slides`. If you rendered your animations without changing +directory, you should not worry about that :-) +::: + +## Configuration File + +It is possible to configure Manim Slides via a configuration file, even though +this feature is currently limited. You may initiliaze the default configuration +file with: + +```bash +manim-slides init +``` + +:::{warning} +Note that, by default, Manim Slides will use default key bindings that are +platform-dependent. If you decide to overwrite those with a config file, you may +encounter some problems from platform to platform. +::: + +## Configuring Key Bindings + +If you wish to use other key bindings than the defaults, you can run the +configuration wizard with: + +```bash +manim-slides wizard +``` + +A similar window to the image below will pop up and prompt to change keys. + +```{eval-rst} +.. image:: ../_static/wizard_light.png + :width: 300px + :align: center + :class: only-light + :alt: Manim Slide Wizard +``` + +```{eval-rst} +.. image:: ../_static/wizard_dark.png + :width: 300px + :align: center + :class: only-dark + :alt: Manim Slide Wizard +``` + +:::{note} +Even though it is not currently supported through the GUI, you can select +multiple key binding for the same action by modifying the config file. +::: diff --git a/docs/source/reference/html.md b/docs/source/reference/html.md new file mode 100644 index 0000000..01c2186 --- /dev/null +++ b/docs/source/reference/html.md @@ -0,0 +1,40 @@ +# HTML Presentations + +Manim Slides allows you to convert presentations into one HTML file, with +[RevealJS](https://revealjs.com/). This file can then be opened with any modern +web browser, allowing for a nice portability of your presentations. + +As with every command with Manim Slides, converting slides' fragments into one +HTML file (and its assets) can be done in one command: + +```bash +manim-slides convert [SCENES]... DEST +``` + +where `DEST` is the `.html` destination file. + +## Configuring the Template + +Many configuration options are available through the `-c