summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSho Sakuma <me@m1sk9.dev>2026-01-11 18:27:53 +0900
committerSho Sakuma <me@m1sk9.dev>2026-01-11 18:49:01 +0900
commita7c47276162f40e7e3fa673c4afbc74e52d8c6ee (patch)
tree3d7854a0b6ca9800e475cc9577149475875c57ae
parentca9bfd0b0f572c889837bedd41ef4eac76fdb558 (diff)
downloadLunaticChat-a7c47276162f40e7e3fa673c4afbc74e52d8c6ee.tar.gz
LunaticChat-a7c47276162f40e7e3fa673c4afbc74e52d8c6ee.tar.bz2
LunaticChat-a7c47276162f40e7e3fa673c4afbc74e52d8c6ee.zip
docs: Update docs
-rw-r--r--CHANGELOG.md10
-rw-r--r--docs/.vitepress/config.mts5
-rw-r--r--docs/src/guide/configuration.md26
-rw-r--r--docs/src/guide/getting-started.md2
-rw-r--r--docs/src/guide/japanese-romanization.md61
-rw-r--r--docs/src/static/favicon.icobin0 -> 4286 bytes
-rw-r--r--docs/src/static/icon.pngbin0 -> 8069496 bytes
-rw-r--r--platform-paper/src/main/resources/config.yml5
8 files changed, 96 insertions, 13 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index abc3346..a8e3bc0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
### v0.3.1
+#### Breaking Changes:
+
+- Change user settings file format from JSON to TOML.
+ - **As a result, players will need to re-enable the `/jp` setting**.
+ - The old JSON format user configuration files are no longer used. You can safely delete them.
+- The configuration file has been deleted or modified.
+ - It must be initialized when the server starts.
+
+----
+
- Fixed an issue where Japanese text was being converted to Romanized characters.
### v0.3.0
diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts
index 2cd9c07..4894ff9 100644
--- a/docs/.vitepress/config.mts
+++ b/docs/.vitepress/config.mts
@@ -8,6 +8,7 @@ export default defineConfig({
cleanUrls: true,
srcDir: './src',
outDir: './dist',
+ head: [['link', { rel: 'icon', href: '/static/favicon.ico' }]],
themeConfig: {
nav: [
{ text: 'Guide', link: '/guide/getting-started' },
@@ -27,6 +28,10 @@ export default defineConfig({
text: 'パーミッション',
link: '/guide/permissions',
},
+ {
+ text: 'ローマ字変換',
+ link: '/guide/japanese-romanization',
+ },
],
'/reference/': [
{
diff --git a/docs/src/guide/configuration.md b/docs/src/guide/configuration.md
index b1d606a..14177b4 100644
--- a/docs/src/guide/configuration.md
+++ b/docs/src/guide/configuration.md
@@ -12,11 +12,14 @@
# Please specify appropriate values to ensure LunaticChat functions correctly.
#
# For detailed configuration options, please refer to the documentation:
-# https://lc.m1sk9.dev/guide//configuration
+# https://lc.m1sk9.dev/guide/configuration
# ----------------------------------------------
# If enabled, Activate LunaticChat's debug mode, which provides detailed logging for troubleshooting.
-debug: false
+debug: true
+
+# Path to the YAML file storing player settings
+userSettingsFilePath: "player-settings.yaml"
# ----------------------------------------------
# ----------- Features Settings ------------
@@ -28,7 +31,7 @@ features:
enabled: true
japaneseConversion:
# If enabled, enables the conversion function from Roman letters to hiragana.
- enabled: false
+ enabled: true
cache:
maxEntries: 500
saveIntervalSeconds: 300
@@ -36,8 +39,6 @@ features:
api:
timeout: 3000
retryAttempts: 2
- settings:
- directory: "settings"
# ----------------------------------------------
# --------- Message Format Settings --------
@@ -47,6 +48,7 @@ features:
# You can use placeholders such as {sender}, {message}, etc.
#
# {sender} - The name of the message sender
+# {recipient} - The name of the message recipient
# {message} - The content of the message
# ----------------------------------------------
@@ -64,6 +66,13 @@ messageFormat:
LunaticChat をデバッグモードで起動します.
+### `userSettingsFilePath`
+
+- Type: `string`
+- Default: `player-settings.yaml`
+
+LunaticChat がプレイヤーの設定を保存する YAML ファイルのパスを指定します.
+
## Features Settings
### `features.quickReplies.enabled`
@@ -125,13 +134,6 @@ LunaticChat の [`/reply`](../reference/commands/reply.md) コマンドによる
ローマ字変換 API へのリクエストが失敗した場合の再試行回数を指定します.
-#### `settings.directory`
-
-- Type: `string`
-- Default: `settings`
-
-ローマ字変換のユーザーごとの設定ファイルを保存するディレクトリを指定します.
-
## Message Format Settings
使用できるプレースホルダー:
diff --git a/docs/src/guide/getting-started.md b/docs/src/guide/getting-started.md
index db922f6..85fbf31 100644
--- a/docs/src/guide/getting-started.md
+++ b/docs/src/guide/getting-started.md
@@ -14,7 +14,7 @@
LunaticChat を起動すると以下のファイルが作成されます.
- `plugins/LunaticChat/config.yml`:プラグインの設定ファイル
-- `plugins/LunaticChat/settings/`:ユーザーごとの設定ファイルが保存されるフォルダ
+- `plugins/LunaticChat/player-settings.yaml`:ユーザーごとの設定ファイル
- `plugins/LunaticChat/conversion_cache.json`: ローマ字変換のキャッシュファイル
設定ファイル `config.yml` を開き,必要に応じて設定を変更します.設定項目の詳細については,[設定ガイド](./configuration.md)を参照してください.
diff --git a/docs/src/guide/japanese-romanization.md b/docs/src/guide/japanese-romanization.md
new file mode 100644
index 0000000..3e9d702
--- /dev/null
+++ b/docs/src/guide/japanese-romanization.md
@@ -0,0 +1,61 @@
+# ローマ字変換
+
+LunaticChat では、日本語のテキストをローマ字に変換する機能が提供されています.
+
+## 設定を有効化する
+
+ローマ字変換機能を有効にするには `features.japaneseConversion.enabled` の値を `true` にする必要があります.
+
+```yaml{4}
+features:
+ # ...
+ japaneseConversion:
+ enabled: true
+```
+
+## 変換の仕組み
+
+LunaticChat はプレイヤーからのテキストを以下の手順で変換を行います.
+
+1. プレイヤーからのテキストがローマ字で構成されているかを検証する
+2. メモリキャッシュから該当のフレーズがあるかどうかを調べる
+ 1. ここで該当フレーズがヒットした場合はそれをサーバーに返す
+3. メモリキャッシュに存在していない場合は,ローマ字からひらがなに変換する
+4. 変換した文字列を Google IME API へ送り,人が読める形に変換する
+5. メモリキャッシュに保存し,それをサーバーに返す
+
+```
+┌───────────────────────────────────────────────────┐
+│ User Input │
+│ (Romanji Text) │
+└─────────────────────┬─────────────────────────────┘
+ │
+ ▼
+┌───────────────────────────────────────────────────┐
+│ RomanjiConverter │
+│ ┌───────────────────────────────────────────┐ │
+│ │ 1. Check Memory Cache │ │
+│ │ └─→ Hit: Return immediately │ │
+│ │ │ │
+│ │ 2. Call Google IME API │ │
+│ │ │ │
+│ │ 3. Store in Memory Cache │ │
+│ │ │ │
+│ │ 4. Queue for Disk Save (async) │ │
+│ └───────────────────────────────────────────┘ │
+└─────────────────────┬─────────────────────────────┘
+ │
+ ▼
+┌───────────────────────────────────────────────────┐
+│ Converted Text │
+│ (Japanese Text) │
+└───────────────────────────────────────────────────┘
+```
+
+::: tip ファイルへの保存
+
+メモリキャッシュの内容は負荷にならないよう,設定した秒毎にファイルキャッシュへ自動でセーブします.
+
+:::
+
+##
diff --git a/docs/src/static/favicon.ico b/docs/src/static/favicon.ico
new file mode 100644
index 0000000..5a2affe
--- /dev/null
+++ b/docs/src/static/favicon.ico
Binary files differ
diff --git a/docs/src/static/icon.png b/docs/src/static/icon.png
new file mode 100644
index 0000000..a6865f7
--- /dev/null
+++ b/docs/src/static/icon.png
Binary files differ
diff --git a/platform-paper/src/main/resources/config.yml b/platform-paper/src/main/resources/config.yml
index bd41d8f..f1ebe64 100644
--- a/platform-paper/src/main/resources/config.yml
+++ b/platform-paper/src/main/resources/config.yml
@@ -30,11 +30,16 @@ features:
# If enabled, enables the conversion function from Roman letters to hiragana.
enabled: false
cache:
+ # Specifies the maximum number of entries to store in the Romanization conversion cache.
maxEntries: 500
+ # Specify the interval (in seconds) for saving the Romanization conversion cache to disk.
saveIntervalSeconds: 300
+ # Specify the file path where the cache for Romanization conversion is saved.
filePath: "conversion_cache.json"
api:
+ # Specify the timeout duration (in milliseconds) for API requests to the Romanization conversion service.
timeout: 3000
+ # Specify the number of retry attempts for failed API requests to the Romanization conversion service.
retryAttempts: 2
# ----------------------------------------------