Github每日精选(第88期):命令行下的ppt-slides

Slides是一个基于终端的演示工具,允许用户使用markdown编写内容,并直接在终端中展示。它支持代码执行和预处理功能,如图形渲染,且可以实时更新演示文稿。用户可以通过简单的命令行操作来创建、执行和展示幻灯片。
摘要由CSDN通过智能技术生成

slides

基于终端的演示工具,在终端中,我们想要ppt的形式来展现我们的文件,文件可以用markdown的形式来编写,这样是不是很方便呢?

slides 就是这样的一个应用。

在这里插入图片描述
github上的地址在这里

安装

macos下的安装:

brew install slides

go语言进行安装:

go install github.com/maaslalani/slides@latest

从源中,进行安装:

git clone https://github.com/maaslalani/slides.git
cd slides
go install
用法

创建一个包含幻灯片的简单降价文件:

# 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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

go2coding

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值