mirror of
https://github.com/mfontanini/presenterm.git
synced 2025-05-05 15:32:58 +00:00
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.
presenterm
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
- Define your presentation in a single markdown file.
- Images and animated gifs on terminals like kitty, iterm2, and wezterm.
- Customizable themes including colors, margins, layout (left/center aligned content), footer for every slide, etc. Several built-in themes can give your presentation the look you want without having to define your own.
- Code highlighting for a wide list of programming languages.
- Font sizes for terminals that support them.
- Selective/dynamic code highlighting that only highlights portions of code at a time.
- Column layouts.
- mermaid graph rendering.
- LaTeX and typst formula rendering.
- Introduction slide that displays the presentation title and your name.
- Slide titles.
- Snippet execution for various programming languages.
- Export presentations to PDF.
- Pause portions of your slides.
- Custom key bindings.
- Automatically reload your presentation every time it changes for a fast development loop.
- Define speaker notes to aid you during presentations.
See the introduction page to learn more.
Presenterm in Action
Here are some talks and demos that feature presenterm:
- Bringing Terminal Aesthetics to the Web With Rust by Orhun Parmaksız
- 7 Rust Terminal Tools That You Should Use by Orhun Parmaksız
- Renaissance of Terminal User Interfaces with Rust by Orhun Parmaksız
Gave a talk using presenterm? We would love to feature it here! Open a PR or issue to get it added.
Description
Languages
Rust
99.2%
Shell
0.4%
Nix
0.2%
JavaScript
0.2%