RcloneView Slackリモートコントロール
Slackリモートコントロールを使うと、PCの前に座っていなくても、RcloneViewのジョブ通知を受け取り、Slackから直接ジョブを制御できます。
このチュートリアルでは、以下の内容を扱います。
- Slackアプリの作成(App Manifestを使用)
- 必要なトークンの発行(App TokenとBot Token)
- Slackメンバー IDの確認方法
- RcloneViewでのSlackリモートコントロールの有効化
- Slackコマンドを使ったジョブの一覧表示、開始、停止、ステータス確認
Slackリモートコントロールとは?
Slackリモートコントロールは、以下のことを可能にするRcloneViewの組み込み機能です。
- ジョブの開始、完了、エラーのリアルタイム通知の受信
- 登録済みジョブの一覧表示
- ジョブのリモート開始
- 実行中ジョブの停止
- ジョブの進捗とステータスをその都度確認
RcloneViewが実行されている 限り、モバイルのSlackアプリだけでクラウドジョブを管理できます。
要件
- RcloneViewがインストール済みで実行中であること(Desktop版またはHeadless版)
- Slackアカウントとワークスペース
- インターネット接続
Step 1: Slackアプリの作成(App Manifest)
最も速く正確にセットアップするために、"App Manifest"方式でボットを作成します。
1-1 Slack API Dashboardを開く
- Slack API Dashboard にアクセスします。
- Create New App ボタンをクリックします。
1-2 Manifestを使って作成
- From an app manifest オプションを選択します。
- アプリをインストールしたい Workspace を選択します。
- JSON タブを選択し、以下の設定コードを貼り付けます。
{
"display_information": {
"name": "RcloneView",
"description": "Effortlessly browse, organize, transfer files across your cloud storages.",
"background_color": "#3f2f3f"
},
"features": {
"bot_user": {
"display_name": "RcloneView",
"always_online": false
},
"slash_commands": [
{
"command": "/help",
"description": "Show all commands",
"should_escape": false
},
{
"command": "/joblist",
"description": "List jobs",
"should_escape": false
},
{
"command": "/start",
"description": "Starts a job (Enter number or name)",
"usage_hint": "<#number> or <jobName>",
"should_escape": false
},
{
"command": "/stop",
"description": "Stop a running job by JobId",
"usage_hint": "<JobId>",
"should_escape": false
},
{
"command": "/jobstatus",
"description": "Check status by JobId",
"usage_hint": "<JobId>",
"should_escape": false
}
]
},
"oauth_config": {
"scopes": {
"bot": [
"commands",
"chat:write",
"chat:write.public",
"im:write",
"app_mentions:read",
"files:write"
]
}
},
"settings": {
"interactivity": {
"is_enabled": true
},
"org_deploy_enabled": false,
"socket_mode_enabled": true,
"token_rotation_enabled": false
}
}