Add documentation for CLI commands and introduce real-time voice command exploration
- Created a new README.md file detailing CLI commands for synchronization and usage. - Added a section discussing the potential of real-time voice commands in daily life. - Introduced a new slides.md file for a presentation on "超级桌面生活指令" (Super Desktop Life Commands). - Included background and theme settings for the presentation slides.
This commit is contained in:
56
.cnb.yml
Normal file
56
.cnb.yml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# .cnb.yml
|
||||||
|
$:
|
||||||
|
vscode:
|
||||||
|
- docker:
|
||||||
|
image: docker.cnb.cool/kevisual/dev-env:latest
|
||||||
|
services:
|
||||||
|
- vscode
|
||||||
|
- docker
|
||||||
|
imports: https://cnb.cool/kevisual/env/-/blob/main/env.yml
|
||||||
|
# 开发环境启动后会执行的任务
|
||||||
|
# stages:
|
||||||
|
# - name: pnpm install
|
||||||
|
# script: pnpm install
|
||||||
|
|
||||||
|
|
||||||
|
main:
|
||||||
|
web_trigger_sync_to_gitea:
|
||||||
|
- services:
|
||||||
|
- docker
|
||||||
|
imports:
|
||||||
|
- https://cnb.cool/kevisual/env/-/blob/main/env.yml
|
||||||
|
stages:
|
||||||
|
- name: 'show username'
|
||||||
|
script: echo "GITEA_USERNAME is ${GITEA_USERNAME} and GITEA_PASSWORD is ${GITEA_PASSWORD}"
|
||||||
|
- name: sync to gitea
|
||||||
|
image: tencentcom/git-sync
|
||||||
|
settings:
|
||||||
|
target_url: https://git.xiongxiao.me/kevisual/cnb.git
|
||||||
|
auth_type: https
|
||||||
|
username: "oauth2"
|
||||||
|
password: ${GITEA_TOKEN}
|
||||||
|
git_user: "abearxiong"
|
||||||
|
git_email: "xiongxiao@xiongxiao.me"
|
||||||
|
sync_mode: rebase
|
||||||
|
branch: main
|
||||||
|
web_trigger_sync_from_gitea:
|
||||||
|
- services:
|
||||||
|
- docker
|
||||||
|
imports:
|
||||||
|
- https://cnb.cool/kevisual/env/-/blob/main/env.yml
|
||||||
|
stages:
|
||||||
|
- name: '添加 gitea的origin'
|
||||||
|
script: |
|
||||||
|
git remote remove gitea 2>/dev/null || true
|
||||||
|
git remote add gitea https://oauth2:${GITEA_TOKEN}@git.xiongxiao.me/template/simple-lit-vite.git
|
||||||
|
- name: '同步gitea代码到当前仓库'
|
||||||
|
script: git pull gitea main
|
||||||
|
- name: '提交到原本的origin'
|
||||||
|
script: git push origin main
|
||||||
|
|
||||||
|
|
||||||
|
"**":
|
||||||
|
web_trigger_test:
|
||||||
|
- stages:
|
||||||
|
- name: 执行任务
|
||||||
|
script: echo "job"
|
||||||
11
.cnb/web_trigger.yml
Normal file
11
.cnb/web_trigger.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# .cnb/web_trigger.yml
|
||||||
|
branch:
|
||||||
|
# 如下按钮在分支名以 release 开头的分支详情页面显示
|
||||||
|
- reg: "^main"
|
||||||
|
buttons:
|
||||||
|
- name: 同步代码到gitea
|
||||||
|
desc: 同步代码到gitea
|
||||||
|
event: web_trigger_sync_to_gitea
|
||||||
|
- name: 同步gitea代码到当前仓库
|
||||||
|
desc: 同步gitea代码到当前仓库
|
||||||
|
event: web_trigger_sync_from_gitea
|
||||||
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
.env
|
||||||
|
!.env*development
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
dist
|
||||||
|
pack-dist
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
.pnpm-store
|
||||||
|
|
||||||
|
.vite
|
||||||
|
|
||||||
|
.astro
|
||||||
29
components/Counter.vue
Normal file
29
components/Counter.vue
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
count: {
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const counter = ref(props.count)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="flex w-min border border-main rounded-md">
|
||||||
|
<button
|
||||||
|
class="border-r border-main p-2 font-mono outline-none hover:bg-gray-400 hover:bg-opacity-20"
|
||||||
|
@click="counter -= 1"
|
||||||
|
>
|
||||||
|
-
|
||||||
|
</button>
|
||||||
|
<span class="m-auto p-2">{{ counter }}</span>
|
||||||
|
<button
|
||||||
|
class="border-l border-main p-2 font-mono outline-none hover:bg-gray-400 hover:bg-opacity-20"
|
||||||
|
@click="counter += 1"
|
||||||
|
>
|
||||||
|
+
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
31
components/GoBack.vue
Normal file
31
components/GoBack.vue
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<template>
|
||||||
|
<div @click="onClick" class="mr-2 py-1 inline text-gray-500" hover:bg="white op-10">
|
||||||
|
<slot>
|
||||||
|
<carbon:arrow-left v-if="props.arrow === 'left'" />
|
||||||
|
<carbon:arrow-right v-else-if="props.arrow === 'right'" />
|
||||||
|
<carbon:arrow-up v-else-if="props.arrow === 'up'" />
|
||||||
|
<carbon:arrow-down v-else-if="props.arrow === 'down'" />
|
||||||
|
<carbon:arrow-left v-else />
|
||||||
|
</slot>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { useSlideContext } from '@slidev/client';
|
||||||
|
|
||||||
|
const { $slidev } = useSlideContext();
|
||||||
|
const props = defineProps({
|
||||||
|
go: {
|
||||||
|
default: 1,
|
||||||
|
type: [Number, String],
|
||||||
|
},
|
||||||
|
arrow: {
|
||||||
|
type: String,
|
||||||
|
default: 'left', // 'left', 'right', 'up', or 'down'
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const onClick = () => {
|
||||||
|
const go = props.go;
|
||||||
|
console.log('GoBack.vue go:', go);
|
||||||
|
$slidev.nav.go(go);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
19
components/MyFooter.vue
Normal file
19
components/MyFooter.vue
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<!-- Foo.vue -->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="fixed bottom-3 right-2 text-gray-300 font-light text-sm">
|
||||||
|
<a :href="link + basename">{{ link + basename }}</a>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
const props = defineProps({
|
||||||
|
link: {
|
||||||
|
type: String,
|
||||||
|
default: 'https://kevisual.cn',
|
||||||
|
},
|
||||||
|
basename: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
611
examples/contents.md
Normal file
611
examples/contents.md
Normal file
@@ -0,0 +1,611 @@
|
|||||||
|
# 欢迎使用 Slidev
|
||||||
|
|
||||||
|
面向开发者的演示文稿工具
|
||||||
|
|
||||||
|
<div @click="$slidev.nav.next" class="mt-12 py-1" hover:bg="white op-10">
|
||||||
|
按空格键进入下一页 <carbon:arrow-right />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="abs-br m-6 text-xl">
|
||||||
|
<button @click="$slidev.nav.openInEditor()" title="Open in Editor" class="slidev-icon-btn">
|
||||||
|
<carbon:edit />
|
||||||
|
</button>
|
||||||
|
<a href="https://github.com/slidevjs/slidev" target="_blank" class="slidev-icon-btn">
|
||||||
|
<carbon:logo-github />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
The last comment block of each slide will be treated as slide notes. It will be visible and editable in Presenter Mode along with the slide. [Read more in the docs](https://sli.dev/guide/syntax.html#notes)
|
||||||
|
-->
|
||||||
|
|
||||||
|
---
|
||||||
|
transition: fade-out
|
||||||
|
---
|
||||||
|
|
||||||
|
# 什么是 Slidev?
|
||||||
|
|
||||||
|
Slidev 是专为开发者设计的演示文稿制作与演示工具,具备以下特性
|
||||||
|
|
||||||
|
- 📝 **基于文本** - 专注于内容创作,使用 Markdown 编写,之后再来美化样式
|
||||||
|
- 🎨 **主题化** - 主题可以作为 npm 包分享和复用
|
||||||
|
- 🧑💻 **开发者友好** - 代码高亮、支持自动补全的实时编码
|
||||||
|
- 🤹 **交互式** - 可以嵌入 Vue 组件来增强表现力
|
||||||
|
- 🎥 **录制** - 内置录制和摄像头视图
|
||||||
|
- 📤 **便携式** - 可导出为 PDF、PPTX、PNG,甚至可托管的 SPA
|
||||||
|
- 🛠 **可扩展** - 几乎任何网页上能实现的功能都可以在 Slidev 中实现
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
了解更多:[为什么选择 Slidev?](https://sli.dev/guide/why)
|
||||||
|
|
||||||
|
<!--
|
||||||
|
You can have `style` tag in markdown to override the style for the current page.
|
||||||
|
Learn more: https://sli.dev/features/slide-scope-style
|
||||||
|
-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
h1 {
|
||||||
|
background-color: #2B90B6;
|
||||||
|
background-image: linear-gradient(45deg, #4EC5D4 10%, #146b8c 20%);
|
||||||
|
background-size: 100%;
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-moz-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
-moz-text-fill-color: transparent;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Here is another comment.
|
||||||
|
-->
|
||||||
|
|
||||||
|
---
|
||||||
|
transition: slide-up
|
||||||
|
level: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
# 导航
|
||||||
|
|
||||||
|
悬停在左下角可以查看导航控制面板,[了解更多](https://sli.dev/guide/ui#navigation-bar)
|
||||||
|
|
||||||
|
## 键盘快捷键
|
||||||
|
|
||||||
|
| | |
|
||||||
|
| --------------------------------------------------- | --------------------------- |
|
||||||
|
| <kbd>→</kbd> / <kbd>空格</kbd> | 下一个动画或幻灯片 |
|
||||||
|
| <kbd>←</kbd> / <kbd>shift</kbd><kbd>空格</kbd> | 上一个动画或幻灯片 |
|
||||||
|
| <kbd>↑</kbd> | 上一张幻灯片 |
|
||||||
|
| <kbd>↓</kbd> | 下一张幻灯片 |
|
||||||
|
|
||||||
|
<!-- https://sli.dev/guide/animations.html#click-animation -->
|
||||||
|
<img
|
||||||
|
v-click
|
||||||
|
class="absolute -bottom-9 -left-7 w-80 opacity-50"
|
||||||
|
src="https://sli.dev/assets/arrow-bottom-left.svg"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
<p v-after class="absolute bottom-23 left-45 opacity-30 transform -rotate-10">Here!</p>
|
||||||
|
|
||||||
|
---
|
||||||
|
layout: two-cols
|
||||||
|
layoutClass: gap-16
|
||||||
|
---
|
||||||
|
|
||||||
|
# 目录
|
||||||
|
|
||||||
|
你可以使用 `Toc` 组件为你的幻灯片生成目录:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<Toc minDepth="1" maxDepth="1" />
|
||||||
|
```
|
||||||
|
|
||||||
|
标题将从你的幻灯片内容中推断,你也可以在 frontmatter 中使用 `title` 和 `level` 来覆盖。
|
||||||
|
|
||||||
|
::right::
|
||||||
|
|
||||||
|
<Toc text-sm minDepth="1" maxDepth="2" />
|
||||||
|
|
||||||
|
---
|
||||||
|
layout: image-right
|
||||||
|
image: https://cover.sli.dev
|
||||||
|
---
|
||||||
|
|
||||||
|
# 代码
|
||||||
|
|
||||||
|
使用代码片段可直接获得语法高亮,甚至支持类型悬停提示!
|
||||||
|
|
||||||
|
```ts [filename-example.ts] {all|4|6|6-7|9|all} twoslash
|
||||||
|
// TwoSlash enables TypeScript hover information
|
||||||
|
// and errors in markdown code blocks
|
||||||
|
// More at https://shiki.style/packages/twoslash
|
||||||
|
import { computed, ref } from 'vue'
|
||||||
|
|
||||||
|
const count = ref(0)
|
||||||
|
const doubled = computed(() => count.value * 2)
|
||||||
|
|
||||||
|
doubled.value = 2
|
||||||
|
```
|
||||||
|
|
||||||
|
<arrow v-click="[4, 5]" x1="350" y1="310" x2="195" y2="342" color="#953" width="2" arrowSize="1" />
|
||||||
|
|
||||||
|
<!-- This allow you to embed external code blocks -->
|
||||||
|
<!-- <<< @/snippets/external.ts#snippet -->
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
|
||||||
|
[了解更多](https://sli.dev/features/line-highlighting)
|
||||||
|
|
||||||
|
<!-- Inline style -->
|
||||||
|
<style>
|
||||||
|
.footnotes-sep {
|
||||||
|
@apply mt-5 opacity-10;
|
||||||
|
}
|
||||||
|
.footnotes {
|
||||||
|
@apply text-sm opacity-75;
|
||||||
|
}
|
||||||
|
.footnote-backref {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Notes can also sync with clicks
|
||||||
|
|
||||||
|
[click] This will be highlighted after the first click
|
||||||
|
|
||||||
|
[click] Highlighted with `count = ref(0)`
|
||||||
|
|
||||||
|
[click:3] Last click (skip two clicks)
|
||||||
|
-->
|
||||||
|
|
||||||
|
---
|
||||||
|
level: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
# Shiki Magic Move
|
||||||
|
|
||||||
|
由 [shiki-magic-move](https://shiki-magic-move.netlify.app/) 提供支持,Slidev 支持跨多个代码片段的动画。
|
||||||
|
|
||||||
|
添加多个代码块,并用 <code>````md magic-move</code>(四个反引号)包裹它们来启用 magic move。例如:
|
||||||
|
|
||||||
|
````md magic-move {lines: true}
|
||||||
|
```ts {*|2|*}
|
||||||
|
// step 1
|
||||||
|
const author = reactive({
|
||||||
|
name: 'John Doe',
|
||||||
|
books: [
|
||||||
|
'Vue 2 - Advanced Guide',
|
||||||
|
'Vue 3 - Basic Guide',
|
||||||
|
'Vue 4 - The Mystery'
|
||||||
|
]
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
```ts {*|1-2|3-4|3-4,8}
|
||||||
|
// step 2
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
author: {
|
||||||
|
name: 'John Doe',
|
||||||
|
books: [
|
||||||
|
'Vue 2 - Advanced Guide',
|
||||||
|
'Vue 3 - Basic Guide',
|
||||||
|
'Vue 4 - The Mystery'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```ts
|
||||||
|
// step 3
|
||||||
|
export default {
|
||||||
|
data: () => ({
|
||||||
|
author: {
|
||||||
|
name: 'John Doe',
|
||||||
|
books: [
|
||||||
|
'Vue 2 - Advanced Guide',
|
||||||
|
'Vue 3 - Basic Guide',
|
||||||
|
'Vue 4 - The Mystery'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
非代码块将被忽略。
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<!-- step 4 -->
|
||||||
|
<script setup>
|
||||||
|
const author = {
|
||||||
|
name: 'John Doe',
|
||||||
|
books: [
|
||||||
|
'Vue 2 - Advanced Guide',
|
||||||
|
'Vue 3 - Basic Guide',
|
||||||
|
'Vue 4 - The Mystery'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
````
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# 组件
|
||||||
|
|
||||||
|
<div grid="~ cols-2 gap-4">
|
||||||
|
<div>
|
||||||
|
|
||||||
|
你可以直接在幻灯片中使用 Vue 组件。
|
||||||
|
|
||||||
|
我们提供了一些内置组件,如 `<Tweet/>` 和 `<Youtube/>`,可以直接使用。添加自定义组件也非常简单。
|
||||||
|
|
||||||
|
```html
|
||||||
|
<Counter :count="10" />
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- ../components/Counter.vue -->
|
||||||
|
<Counter :count="10" m="t-4" />
|
||||||
|
|
||||||
|
查看[指南](https://sli.dev/builtin/components.html)了解更多。
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
```html
|
||||||
|
<Tweet id="1390115482657726468" />
|
||||||
|
```
|
||||||
|
|
||||||
|
<Tweet id="1390115482657726468" scale="0.65" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Presenter note with **bold**, *italic*, and ~~striked~~ text.
|
||||||
|
|
||||||
|
Also, HTML elements are valid:
|
||||||
|
<div class="flex w-full">
|
||||||
|
<span style="flex-grow: 1;">Left content</span>
|
||||||
|
<span>Right content</span>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
|
---
|
||||||
|
class: px-20
|
||||||
|
---
|
||||||
|
|
||||||
|
# 主题
|
||||||
|
|
||||||
|
Slidev 拥有强大的主题支持。主题可以提供样式、布局、组件,甚至工具配置。只需在 frontmatter 中**一次编辑**即可切换主题:
|
||||||
|
|
||||||
|
<div grid="~ cols-2 gap-2" m="t-2">
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
theme: default
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
theme: seriph
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
<img border="rounded" src="https://github.com/slidevjs/themes/blob/main/screenshots/theme-default/01.png?raw=true" alt="">
|
||||||
|
|
||||||
|
<img border="rounded" src="https://github.com/slidevjs/themes/blob/main/screenshots/theme-seriph/01.png?raw=true" alt="">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
了解更多:[如何使用主题](https://sli.dev/guide/theme-addon#use-theme)和
|
||||||
|
[精彩主题画廊](https://sli.dev/resources/theme-gallery)。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# 点击动画
|
||||||
|
|
||||||
|
你可以给元素添加 `v-click` 来添加点击动画。
|
||||||
|
|
||||||
|
<div v-click>
|
||||||
|
|
||||||
|
点击幻灯片时显示此内容:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div v-click>This shows up when you click the slide.</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<v-click>
|
||||||
|
|
||||||
|
<span v-mark.red="3"><code>v-mark</code> 指令</span>
|
||||||
|
还允许你添加
|
||||||
|
<span v-mark.circle.orange="4">行内标记</span>
|
||||||
|
,由 [Rough Notation](https://roughnotation.com/) 提供支持:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<span v-mark.underline.orange>inline markers</span>
|
||||||
|
```
|
||||||
|
|
||||||
|
</v-click>
|
||||||
|
|
||||||
|
<div mt-20 v-click>
|
||||||
|
|
||||||
|
[了解更多](https://sli.dev/guide/animations#click-animation)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# 运动动画
|
||||||
|
|
||||||
|
运动动画由 [@vueuse/motion](https://motion.vueuse.org/) 提供支持,通过 `v-motion` 指令触发。
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div
|
||||||
|
v-motion
|
||||||
|
:initial="{ x: -80 }"
|
||||||
|
:enter="{ x: 0 }"
|
||||||
|
:click-3="{ x: 80 }"
|
||||||
|
:leave="{ x: 1000 }"
|
||||||
|
>
|
||||||
|
Slidev
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
<div class="w-60 relative">
|
||||||
|
<div class="relative w-40 h-40">
|
||||||
|
<img
|
||||||
|
v-motion
|
||||||
|
:initial="{ x: 800, y: -100, scale: 1.5, rotate: -50 }"
|
||||||
|
:enter="final"
|
||||||
|
class="absolute inset-0"
|
||||||
|
src="https://sli.dev/logo-square.png"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
<img
|
||||||
|
v-motion
|
||||||
|
:initial="{ y: 500, x: -100, scale: 2 }"
|
||||||
|
:enter="final"
|
||||||
|
class="absolute inset-0"
|
||||||
|
src="https://sli.dev/logo-circle.png"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
<img
|
||||||
|
v-motion
|
||||||
|
:initial="{ x: 600, y: 400, scale: 2, rotate: 100 }"
|
||||||
|
:enter="final"
|
||||||
|
class="absolute inset-0"
|
||||||
|
src="https://sli.dev/logo-triangle.png"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="text-5xl absolute top-14 left-40 text-[#2B90B6] -z-1"
|
||||||
|
v-motion
|
||||||
|
:initial="{ x: -80, opacity: 0}"
|
||||||
|
:enter="{ x: 0, opacity: 1, transition: { delay: 2000, duration: 1000 } }">
|
||||||
|
Slidev
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- vue script setup scripts can be directly used in markdown, and will only affects current page -->
|
||||||
|
<script setup lang="ts">
|
||||||
|
const final = {
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
rotate: 0,
|
||||||
|
scale: 1,
|
||||||
|
transition: {
|
||||||
|
type: 'spring',
|
||||||
|
damping: 10,
|
||||||
|
stiffness: 20,
|
||||||
|
mass: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-motion
|
||||||
|
:initial="{ x:35, y: 30, opacity: 0}"
|
||||||
|
:enter="{ y: 0, opacity: 1, transition: { delay: 3500 } }">
|
||||||
|
|
||||||
|
[了解更多](https://sli.dev/guide/animations.html#motion)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# LaTeX
|
||||||
|
|
||||||
|
开箱即用的 LaTeX 支持。由 [KaTeX](https://katex.org/) 提供支持。
|
||||||
|
|
||||||
|
<div h-3 />
|
||||||
|
|
||||||
|
行内 $\sqrt{3x-1}+(1+x)^2$
|
||||||
|
|
||||||
|
块级
|
||||||
|
$$ {1|3|all}
|
||||||
|
\begin{aligned}
|
||||||
|
\nabla \cdot \vec{E} &= \frac{\rho}{\varepsilon_0} \\
|
||||||
|
\nabla \cdot \vec{B} &= 0 \\
|
||||||
|
\nabla \times \vec{E} &= -\frac{\partial\vec{B}}{\partial t} \\
|
||||||
|
\nabla \times \vec{B} &= \mu_0\vec{J} + \mu_0\varepsilon_0\frac{\partial\vec{E}}{\partial t}
|
||||||
|
\end{aligned}
|
||||||
|
$$
|
||||||
|
|
||||||
|
[了解更多](https://sli.dev/features/latex)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# 图表
|
||||||
|
|
||||||
|
你可以直接在 Markdown 中根据文本描述创建图表。
|
||||||
|
|
||||||
|
<div class="grid grid-cols-4 gap-5 pt-4 -mb-6">
|
||||||
|
|
||||||
|
```mermaid {scale: 0.5, alt: 'A simple sequence diagram'}
|
||||||
|
sequenceDiagram
|
||||||
|
Alice->John: Hello John, how are you?
|
||||||
|
Note over Alice,John: A typical interaction
|
||||||
|
```
|
||||||
|
|
||||||
|
```mermaid {theme: 'neutral', scale: 0.8}
|
||||||
|
graph TD
|
||||||
|
B[Text] --> C{Decision}
|
||||||
|
C -->|One| D[Result 1]
|
||||||
|
C -->|Two| E[Result 2]
|
||||||
|
```
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
mindmap
|
||||||
|
root((mindmap))
|
||||||
|
Origins
|
||||||
|
Long history
|
||||||
|
::icon(fa fa-book)
|
||||||
|
Popularisation
|
||||||
|
British popular psychology author Tony Buzan
|
||||||
|
Research
|
||||||
|
On effectiveness<br/>and features
|
||||||
|
On Automatic creation
|
||||||
|
Uses
|
||||||
|
Creative techniques
|
||||||
|
Strategic planning
|
||||||
|
Argument mapping
|
||||||
|
Tools
|
||||||
|
Pen and paper
|
||||||
|
Mermaid
|
||||||
|
```
|
||||||
|
|
||||||
|
```plantuml {scale: 0.7}
|
||||||
|
@startuml
|
||||||
|
|
||||||
|
package "Some Group" {
|
||||||
|
HTTP - [First Component]
|
||||||
|
[Another Component]
|
||||||
|
}
|
||||||
|
|
||||||
|
node "Other Groups" {
|
||||||
|
FTP - [Second Component]
|
||||||
|
[First Component] --> FTP
|
||||||
|
}
|
||||||
|
|
||||||
|
cloud {
|
||||||
|
[Example 1]
|
||||||
|
}
|
||||||
|
|
||||||
|
database "MySql" {
|
||||||
|
folder "This is my folder" {
|
||||||
|
[Folder 3]
|
||||||
|
}
|
||||||
|
frame "Foo" {
|
||||||
|
[Frame 4]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Another Component] --> [Example 1]
|
||||||
|
[Example 1] --> [Folder 3]
|
||||||
|
[Folder 3] --> [Frame 4]
|
||||||
|
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
了解更多:[Mermaid 图表](https://sli.dev/features/mermaid) 和 [PlantUML 图表](https://sli.dev/features/plantuml)
|
||||||
|
|
||||||
|
---
|
||||||
|
foo: bar
|
||||||
|
dragPos:
|
||||||
|
square: 691,32,167,_,-16
|
||||||
|
---
|
||||||
|
|
||||||
|
# 可拖拽元素
|
||||||
|
|
||||||
|
双击可拖拽元素可以编辑它们的位置。
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
###### Directive Usage
|
||||||
|
|
||||||
|
```md
|
||||||
|
<img v-drag="'square'" src="https://sli.dev/logo.png">
|
||||||
|
```
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
###### Component Usage
|
||||||
|
|
||||||
|
```md
|
||||||
|
<v-drag text-3xl>
|
||||||
|
<div class="i-carbon:arrow-up" />
|
||||||
|
Use the `v-drag` component to have a draggable container!
|
||||||
|
</v-drag>
|
||||||
|
```
|
||||||
|
|
||||||
|
<v-drag pos="640,212,261,_,-15">
|
||||||
|
<div text-center text-3xl border border-main rounded>
|
||||||
|
Double-click me!
|
||||||
|
</div>
|
||||||
|
</v-drag>
|
||||||
|
|
||||||
|
<img v-drag="'square'" src="https://sli.dev/logo.png">
|
||||||
|
|
||||||
|
###### Draggable Arrow
|
||||||
|
|
||||||
|
```md
|
||||||
|
<v-drag-arrow two-way />
|
||||||
|
```
|
||||||
|
|
||||||
|
<v-drag-arrow pos="360,319,253,46" two-way op70 />
|
||||||
|
|
||||||
|
---
|
||||||
|
src: ./pages/imported-slides.md
|
||||||
|
hide: false
|
||||||
|
---
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Monaco 编辑器
|
||||||
|
|
||||||
|
Slidev 提供了内置的 Monaco 编辑器支持。
|
||||||
|
|
||||||
|
在代码块中添加 `{monaco}` 即可将其转换为编辑器:
|
||||||
|
|
||||||
|
```ts {monaco}
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { emptyArray } from './external'
|
||||||
|
|
||||||
|
const arr = ref(emptyArray(10))
|
||||||
|
```
|
||||||
|
|
||||||
|
使用 `{monaco-run}` 可以创建一个可直接在幻灯片中执行代码的编辑器:
|
||||||
|
|
||||||
|
```ts {monaco-run}
|
||||||
|
import { version } from 'vue'
|
||||||
|
import { emptyArray, sayHello } from './external'
|
||||||
|
|
||||||
|
sayHello()
|
||||||
|
console.log(`vue ${version}`)
|
||||||
|
console.log(emptyArray<number>(10).reduce(fib => [...fib, fib.at(-1)! + fib.at(-2)!], [1, 1]))
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
layout: center
|
||||||
|
class: text-center
|
||||||
|
---
|
||||||
|
|
||||||
|
# 了解更多
|
||||||
|
|
||||||
|
[文档](https://sli.dev) · [GitHub](https://github.com/slidevjs/slidev) · [展示案例](https://sli.dev/resources/showcases)
|
||||||
|
|
||||||
|
<PoweredBySlidev mt-10 />
|
||||||
25
kevisual.json
Normal file
25
kevisual.json
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"metadata": {
|
||||||
|
"name": "kevisual",
|
||||||
|
"share": "public"
|
||||||
|
},
|
||||||
|
"registry": "https://kevisual.cn/root/ai/kevisual/frontend/simple-slide",
|
||||||
|
"clone": {
|
||||||
|
".": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"syncd": [
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"**/*"
|
||||||
|
],
|
||||||
|
"registry": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sync": {
|
||||||
|
".gitignore": {
|
||||||
|
"url": "/gitignore.txt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
28
package.json
Normal file
28
package.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "relatime-work-slide",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"basename": "/root/relatime-work-slide",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "slidev --open slides.md --remote",
|
||||||
|
"build": "slidev build slides.md --base /root/relatime-work-slide/",
|
||||||
|
"pub": "envision deploy ./dist -k relatime-work-slide -v 0.0.1 -u"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
|
||||||
|
"license": "MIT",
|
||||||
|
"packageManager": "pnpm@10.26.1",
|
||||||
|
"type": "module",
|
||||||
|
"devDependencies": {
|
||||||
|
"@slidev/cli": "^52.11.1",
|
||||||
|
"@slidev/client": "^52.11.1",
|
||||||
|
"@slidev/theme-default": "^0.25.0",
|
||||||
|
"@tailwindcss/vite": "^4.1.18",
|
||||||
|
"dayjs": "^1.11.19",
|
||||||
|
"es-toolkit": "^1.43.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"vue": "^3.5.26"
|
||||||
|
}
|
||||||
|
}
|
||||||
61
pages/contents.md
Normal file
61
pages/contents.md
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
---
|
||||||
|
layout: image-right
|
||||||
|
image: https://cdn.jsdelivr.net/gh/slidevjs/slidev-covers@main/static/nC_dpX5Q_bA.webp
|
||||||
|
---
|
||||||
|
## 为什么需要实时语音指令?
|
||||||
|
|
||||||
|
我们日常生活中有很多语言, 打字是比语音输入要慢很多的。我们的很多行为。比如,打开灯,打开电视,电脑打开软件,发送消息,询问问题,等等。
|
||||||
|
|
||||||
|
这些任何需求只要表述出来,AI就能通过这些分析,然后执行我们相应的动作。
|
||||||
|
|
||||||
|
但是所有的这些行为,它都有一个。前提条件为伪代码一样的,语音指令。
|
||||||
|
|
||||||
|
> 打开客厅灯。伪代码 “命令” 是 打开,“参数”是客厅灯。这些自然语言,AI已经清晰的理解了我们期望做的事情。
|
||||||
|
|
||||||
|
<div class="mt-4 p3 text-xs bg-gray-100 rounded-md text-red-600">
|
||||||
|
我们不在需要语音唤醒
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<my-footer link="https://kevisual.cn/root/relatime-work-slide/" />
|
||||||
|
|
||||||
|
---
|
||||||
|
transition: fade-out
|
||||||
|
layout: image-right
|
||||||
|
image: https://cdn.jsdelivr.net/gh/slidevjs/slidev-covers@main/static/SHE_ZiroE0g.webp
|
||||||
|
---
|
||||||
|
|
||||||
|
## 什么指令可以标记
|
||||||
|
|
||||||
|
任何的动作的行为,都可以根据需要去标记为实时语音指令,根据输入的关键字前缀去实现某一个行为。这里列出一些常用的语音动作。
|
||||||
|
|
||||||
|
- 打开/关闭
|
||||||
|
- 记录/停止
|
||||||
|
- 总结/统计
|
||||||
|
- 模式切换为(某某模式)
|
||||||
|
- 修改
|
||||||
|
- 生成/创建/删除
|
||||||
|
- 搜索
|
||||||
|
- 语音转文字
|
||||||
|
|
||||||
|
<div class="p3 text-xs bg-gray-100 rounded-md">
|
||||||
|
播放/暂停,开始,发送,导航到, 提交,保存,分享,下载,上传,等等。
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<my-footer link="https://kevisual.cn/root/relatime-work-slide/" />
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
transition: fade-out
|
||||||
|
layout: image-right
|
||||||
|
image: https://cdn.jsdelivr.net/gh/slidevjs/slidev-covers@main/static/3XXSKa4jKaM.webp
|
||||||
|
---
|
||||||
|
|
||||||
|
# 如何实现?
|
||||||
|
|
||||||
|
基本原理是:实时的录制语音,语音转文字。文字给ai,分析指令,然后执行相应的动作。
|
||||||
|
|
||||||
|
需要一个电脑或者手机,实时语音转文字。
|
||||||
|
|
||||||
|
如果指令符合预设的语音指令,那么就执行相应的动作。
|
||||||
|
|
||||||
|
<my-footer link="https://kevisual.cn/root/relatime-work-slide/" />
|
||||||
6033
pnpm-lock.yaml
generated
Normal file
6033
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
27
readme.md
Normal file
27
readme.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
## cli
|
||||||
|
|
||||||
|
```sh
|
||||||
|
ev sync clone -i https://kevisual.cn/root/ai/kevisual/frontend/simple-slide/kevisual.json
|
||||||
|
```
|
||||||
|
|
||||||
|
## 同步命令
|
||||||
|
```sh
|
||||||
|
ev sync list
|
||||||
|
ev sync upload
|
||||||
|
``
|
||||||
|
|
||||||
|
## 语音指令-如果实时识别,是否能更高效的生活
|
||||||
|
|
||||||
|
现在语音转文本的技术非常的方便,然后AI判断逻辑也非常的厉害。我们可以结合这两项技术,来实现一个实时语音转文字,并且AI根据文字内容来执行函数的功能。
|
||||||
|
|
||||||
|
我发现AI玩具最近很出众,但是对于真实的应用功能来说,我觉得,在我们日常生活中,不需要任何的语音唤醒,只需要关键文本表述,前缀语言关键字,就能够实现,如果说了那个字,去执行对应可能需要,想做的事情。
|
||||||
|
|
||||||
|
比如,“打开 灯”, 让AI去执行智能家居打开灯的动作,不需要唤醒智能音箱,也不需要去唤醒智能音箱。
|
||||||
|
|
||||||
|
而除了“打开”指令之外,还有很多指令,比如关闭,记录/停止,总结/统计,模式,生成,删除,搜索等等。对电脑来说的,打开软件,关闭软件,发送消息等等。
|
||||||
|
|
||||||
|
还可以自己定义自己需要的指令,实现对应的需要执行的动作。
|
||||||
|
|
||||||
|
大家还有什么可能的指令,然后感觉可以实现在AI的理解的环境下的动作是什么?
|
||||||
|
|
||||||
|
```sh
|
||||||
39
slides.md
Normal file
39
slides.md
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
# theme: default
|
||||||
|
# random image from a curated Unsplash collection by Anthony
|
||||||
|
# background: https://cover.sli.dev
|
||||||
|
background: https://cdn.jsdelivr.net/gh/slidevjs/slidev-covers@main/static/9jFPVQzUgNY.webp
|
||||||
|
# 介绍文档: https://sli.dev
|
||||||
|
title: 超级桌面生活指令
|
||||||
|
info: |
|
||||||
|
## 关于Slidev的介绍
|
||||||
|
演示稿
|
||||||
|
class: text-center
|
||||||
|
# https://sli.dev/features/drawing
|
||||||
|
drawings:
|
||||||
|
persist: false
|
||||||
|
# slide transition: https://sli.dev/guide/animations.html#slide-transitions
|
||||||
|
transition: slide-left
|
||||||
|
# enable MDC Syntax: https://sli.dev/features/mdc
|
||||||
|
mdc: true
|
||||||
|
htmlAttrs:
|
||||||
|
dir: ltr
|
||||||
|
lang: zh-CN
|
||||||
|
fonts:
|
||||||
|
# 基础字体
|
||||||
|
sans: Robot
|
||||||
|
# 与 UnoCSS 的 `font-serif` css 类一同使用
|
||||||
|
serif: Robot Slab
|
||||||
|
# 用于代码块、内联代码等
|
||||||
|
mono: Fira Code
|
||||||
|
# duration of the presentation
|
||||||
|
duration: 35min
|
||||||
|
---
|
||||||
|
|
||||||
|
# 超级桌面生活指令
|
||||||
|
|
||||||
|
这是一份关于实时语音指令的探索的幻灯片,内容涵盖了实时语音指令的概念、应用场景、技术实现。
|
||||||
|
|
||||||
|
---
|
||||||
|
src: ./pages/contents.md
|
||||||
|
---
|
||||||
Reference in New Issue
Block a user