Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Данила Беляков authored and Данила Беляков committed Nov 21, 2024
1 parent 569926e commit e731712
Show file tree
Hide file tree
Showing 50 changed files with 1,055 additions and 445 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build-deploy-mk-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Deploy MkDocs
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material
- name: Build MkDocs site
run: mkdocs build --config-file mk-docs/mkdocs.yml

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.1.2
with:
branch: gh-pages
folder: mk-docs/site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ bin/
.DS_Store

.idea
.kotlin
.kotlin

mk-docs/venv/
mk-docs/.idea/
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<p align="center">
<a href="https://github.com/danbeldev/alice-ktx/tree/master">
<img width="200px" height="200px" alt="alice-skill" src="/documentation/resources/alice_ktx.png">
<img width="200px" height="200px" alt="alice-skill" src="/mk-docs/docs/assets/alice-ktx.png">
</a>
</p>
<h1 align="center">
Alice-ktx
</h1>

<div align="center">

Expand Down Expand Up @@ -37,7 +34,7 @@
```kotlin
fun main() {
skill {
webServer = ktorWebServer {
webhookServer = ktorWebhookServer {
port = 8080
path = "/alice"
}
Expand All @@ -50,7 +47,7 @@ fun main() {

message {
response {
text = message.request.command.toString()
text = messageText
}
}
}
Expand All @@ -59,7 +56,7 @@ fun main() {
```

## Документация
- [Документация](documentation/)
- [Документация](mk-docs/)
- [Примеры](https://github.com/danbeldev/alice-ktx/tree/master/examples/src/main/kotlin/com/github/examples)


Expand Down
1 change: 0 additions & 1 deletion alice-ktx/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
kotlin("jvm")
kotlin("plugin.serialization")
id("io.ktor.plugin")
id("org.jetbrains.dokka")
id("com.vanniktech.maven.publish") version "0.28.0"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ interface Filter {
override fun ShouldRequestEnvironment.predicate(): Boolean = true
}

class Text(private val text: String? = null): Filter {
class Text(private val text: String, private val ignoreCase: Boolean = true): Filter {
override fun ShouldRequestEnvironment.predicate(): Boolean {
return text?.let {
message.request.originalUtterance?.contains(it, ignoreCase = true) == true
} ?: (message.request.originalUtterance != null)
return message.request.originalUtterance?.contains(text, ignoreCase = ignoreCase) == true
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ data class ButtonPressedShouldHandleEnvironment(
private val requestEnvironment: ShouldRequestEnvironment
): ShouldRequestEnvironment by requestEnvironment {

val payload: Map<String, Any> = requestEnvironment.message.request.payload
val payload: Map<String, String> = requestEnvironment.message.request.payload
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ data class StorageKey(
fun build(skillId: String?, message: MessageRequest, strategy: FSMStrategy): StorageKey {
return StorageKey(
skillId = skillId,
userId = message.session.user?.userId,
userId = message.session.user?.userId ?: message.session.application.applicationId,
sessionId = message.session.sessionId,
applicationId = message.session.application.applicationId,
strategy = strategy
Expand Down
21 changes: 0 additions & 21 deletions documentation/Audio_Player.md

This file was deleted.

Binary file removed documentation/resources/alice_ktx.png
Binary file not shown.
23 changes: 0 additions & 23 deletions documentation/Авторизация.md

This file was deleted.

125 changes: 0 additions & 125 deletions documentation/Машина_состояний.md

This file was deleted.

48 changes: 0 additions & 48 deletions documentation/Мидлвари.md

This file was deleted.

40 changes: 0 additions & 40 deletions documentation/Начало.md

This file was deleted.

Loading

0 comments on commit e731712

Please sign in to comment.