Dough - A Rich Presentation Tool
A rich presentation tool built in Rust that uses markdown for content generation.
- January 31, 2024
A rich presentation tool built in Rust that uses markdown for content generation.
Imagine a presentation tool that seamlessly blends simplicity with power. Welcome to Dough – your new favorite presentation companion. Say goodbye to clunky interfaces and hello to a tool that’s as intuitive as it is efficient.
(Why, though? - Get it? xD)
At StackIt, the team gathers every Saturday for their weekly showcase. Each member presents their progress, showcasing the fruits of their week-long hike. Inspired by this collaborative spirit, I came to the idea of Dough - a presentation generator tool like no other. Built in Rust, Dough is a rich, modular, command-line tool to generate presentations. I found similar tools like slidev by antfu and presenterm that inspired me to create Dough.
--template
flag is used to specify the template. The default template is used if not specified. If not, simply spawn a new folder and a markdown file, and you’re good to go. Dough’s intuitive navigation system lets you scroll through slides with ease. You can choose between scrolling top-down or bottom-up. Presentations start from 1
to the last slide. Dough supports arrow keys and VIM keybindings to navigate through slides. There are two modes of navigation:ctrl+r
to reflect in the presentation instantly. The auto hot reload is still in the works.The default style settings are stored in a style.yaml
file which looks like this: style.yaml
Dough thrives on markdown, transforming simple text files into captivating slides. Leveraging the syntax of pulldown-cmark, it effortlessly transforms your ideas into visual stories.
Projects are created by simply writing a markdown file inside a folder. The folder name is the name of the project. Just mkdir my_folder
and touch my_folder/1.md
and you’re good to go. You can also use templates using the new
command. The slides are presented using the present
command. The optional --template
flag is used to specify the template. The default template is used if not specified.
At the heart of dough lie two pivotal components:
The parser parses the markdown file, prettifies it, and then passes it to the renderer to render it. The renderer then renders the slide in the terminal
to display it.
The parser takes in the markdown text and converts it into Nodes
of mdast
(markdown abstract syntax tree). The tree is reccursively traversed and each node is then styled according to the Node
( Markdown Element ) type. After combining all the nodes, a prettified
version of the text is returned. It then modifies the prettified
content, applies custom alignment, styles, and spacing, and adds a margin to the content to fit the terminal.
There are two stages of rendering:
prettified
content and renders it in the terminal.Here is the source code of dough - Dough
If you’re eager to dive into the world of Rust and looking for a project to contribute to, Dough presents an exciting opportunity. Here’s a breakdown of what’s currently working and what areas could benefit from your expertise:
What’s working and what’s not?
Feel free to explore these areas, open new issues, or submit pull requests to contribute to Dough’s evolution. Your insights and contributions are highly valued as we strive to make Dough the go-to presentation tool for Rust enthusiasts everywhere.
Let your presentations shine like never before :)