Last active
November 26, 2024 11:01
-
-
Save up1/9ca731666ac7533ebaddb62e1eed3a7e to your computer and use it in GitHub Desktop.
Terminal-based presentaion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$brew install slides | |
$slides slide.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Welcome to Slides | |
A terminal based presentation tool | |
--- | |
## Everything is markdown | |
In fact, this entire presentation is a markdown file. | |
--- | |
## Everything happens in your terminal | |
Create slides and present them without ever leaving your terminal. | |
--- | |
## Code execution | |
```go | |
package main | |
import "fmt" | |
func main() { | |
fmt.Println("Execute code directly inside the slides") | |
} | |
``` | |
You can execute code inside your slides by pressing `<C-e>`, | |
the output of your command will be displayed at the end of the current slide. | |
--- | |
## Pre-process slides | |
You can add a code block with three tildes (`~`) and write a command to run *before* displaying | |
the slides, the text inside the code block will be passed as `stdin` to the command | |
and the code block will be replaced with the `stdout` of the command. | |
``` | |
~~~graph-easy --as=boxart | |
[ A ] - to -> [ B ] | |
~~~ | |
``` | |
The above will be pre-processed to look like: | |
┌───┐ to ┌───┐ | |
│ A │ ────> │ B │ | |
└───┘ └───┘ | |
For security reasons, you must pass a file that has execution permissions | |
for the slides to be pre-processed. You can use `chmod` to add these permissions. | |
```bash | |
chmod +x file.md | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment