maaslalani-slides基于终端的演示工具
maaslalani-slides 是一个基于终端的演示工具。
安装
macOS
brew install slides
Arch
yay -S slides
Nixpkgs (unstable)
nix-env -iA nixpkgs.slides
Linux
sudo snap install slides
Go
go install github.com/maaslalani/slides@latest
从源代码
git clone https://github.com/maaslalani/slides.git
cd slides
go install
用法
创建一个包含幻灯片的简单 Markdown 文件:
# 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
```
然后,为了呈现,运行:
slides presentation.md
如果给定文件名,slides将自动查找文件中的更改并实时更新演示文稿。
slides还通过stdin接受输入:
curl http://example.com/slides.md | slides
配置
slides允许你在slides.md的顶部使用元数据定义演示文稿的外观。
此部分完全是可选的,slides如果省略此部分或该部分中的任何字段,将使用默认值。
---
theme: ./path/to/theme.json
author: Gopher
date: January 2, 2006
paging: Slide %d / %d
---
评论
