Matias Fontanini aa7cdae105
chore: refactor async renders (#556)
This refactors how async renders work. Before this change, the presenter
had to periodically poll them to pull their state into the operation,
and had to figure out which slides had async renders to be able to poll
them at the right times. This was tedious and error prone, especially
once slide transitions were introduced: we now had to preemptively poll
the next/previous slide because there could be something being async
rendered (e.g. a mermaid diagram) and we didn't want to transition into
a slide with a "Loading..." text when the generated image was available,
just not polled yet.

This now moves all polling to a separate thread. When an operation needs
to be polled (be it because it automatically starts async rendering or
it requires to be triggered by pressing `<c-e>`), now a `Pollable` type
is created that is essentially a container for the logic to poll and a
state shared with the operation. This lets a `Poller` periodically poll
all `Pollables` that need polling (lols). The result is a lot less code
around `Presenter`/`Presentation` to deal with triggering and polling
async renders. Also the handling for async render errors is now much
nicer because it can be treated almost the same way as a successfully
finished async render.
2025-04-20 14:15:57 -07:00
2025-04-20 14:04:41 -07:00
2023-08-27 14:14:02 -07:00
2025-03-24 18:24:28 -07:00
2025-04-13 14:21:04 -07:00
2023-10-08 07:25:02 -07:00
2023-08-27 14:14:02 -07:00

presenterm

crates-badge brew-badge nix-badge arch-badge scoop-badge

presenterm lets you create presentations in markdown format and run them from your terminal, with support for image and animated gifs, highly customizable themes, code highlighting, exporting presentations into PDF format, and plenty of other features. This is how the demo presentation looks like when running in the kitty terminal:

Check the rest of the example presentations in the examples directory.

Documentation

Visit the documentation to get started.

Features

See the introduction page to learn more.

Presenterm in Action

Here are some talks and demos that feature presenterm:

Gave a talk using presenterm? We would love to feature it here! Open a PR or issue to get it added.

Languages
Rust 99.2%
Shell 0.4%
Nix 0.2%
JavaScript 0.2%