-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathepgstation-slack-config.example.yml
176 lines (135 loc) · 6.03 KB
/
epgstation-slack-config.example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# EPGStationの設定
epg-station:
host-name: "http://localhost:8888"
# Slack の設定
slack:
# Slack の API キー
api-key: "YOUR_API_KEY"
# 投稿するチャンネル
# コマンド側で指定がない場合はこの値が使われる
channel: "CHANNEL_ID"
# 各コマンドの設定
commands:
reserve-new-addition: &pre-command-default
# 通知を実行するかの設定
# EPGStation の config/config.yml にコマンドの設定はしてあるけど通知を無効化したいときなどは false にする
enable: true
# Slack の Bot のユーザー名
# chat:write.customize の権限が与えられている場合のみ変更される
userName: "録画予約新規追加通知"
# Slack で使用されるメッセージ
# Box Kit のヘッダーセクションで使われ, 通知の際はこのメッセージが表示される
# 絵文字も使える
# 変数を埋め込むことも可能
# EPGStation で設定される環境変数により作られる struct が渡される
# struct の内容は /pkg/app/reserve_notification.go の ReserveDetail を参照
message: ":new: {{ .ChannelName }} で {{ .Name }} の録画予約が新規追加されました"
# 環境変数を表示するフィールドの設定
# message と同様にフォーマットを自由に変えられる
# Slack API の制限で, フィールドは10個までしか設定できないので注意
fields-section:
- title: "ProgramID"
template: "{{ .ProgramID }}"
- title: "ChannelType, ChannelID, ChannelName"
template: "{{ .ChannelType }}, {{ .ChannelID }}, {{ .ChannelName }}"
- title: "StartAtTime, EndAtTime, DurationMin"
template: "{{ .StartAtTime }}, {{ .EndAtTime }}, {{ .DurationMin }}min"
- title: "Name"
template: "{{ .Name }}"
- title: "Description"
template: "{{ .Description }}"
- title: "Extended"
template: "{{ .Extended }}"
# 特定のコマンドのみ別チャンネルに振り分けたい時に指定する.
# プロパティがない場合は slack の channel が使われる
channel: "CHANNEL_ID"
reserve-update:
<<: *pre-command-default
enable: true
userName: "録画情報更新通知"
message: ":up: {{ .ChannelName }} で {{ .Name }} の録画情報が更新されました"
reserve-deleted:
<<: *pre-command-default
enable: true
userName: "録画予約削除通知"
message: ":black_square_for_stop: {{ .ChannelName }} で {{ .Name }} の録画予約が削除されました"
recording-pre-start:
<<: *pre-command-default
enable: true
userName: "録画準備開始通知"
message: ":soon: {{ .ChannelName }} で {{ .Name }} の録画準備が開始しました"
recording-prep-rec-failed:
<<: *pre-command-default
enable: true
userName: "録画準備失敗通知"
message: ":x: {{ .ChannelName }} で {{ .Name }} の録画準備に失敗しました"
recording-start: &rec-command-default
enable: true
userName: "録画開始通知"
# struct の内容は /pkg/app/recording_notification.go の RecordingDetail を参照
message: ":arrow_forward: {{ .ChannelName }} で {{ .Name }} の録画が開始しました"
fields-section:
- title: "RecordedID, ProgramID"
template: "{{ .RecordedID }}, {{ .ProgramID }}"
- title: "ChannelType, ChannelID, ChannelName"
template: "{{ .ChannelType }}, {{ .ChannelID }}, {{ .ChannelName }}"
- title: "StartAtTime, EndAtTime, DurationMin"
template: "{{ .StartAtTime }}, {{ .EndAtTime }}, {{ .DurationMin }}min"
- title: "Name"
template: "{{ .Name }}"
- title: "Description"
template: "{{ .Description }}"
- title: "Extended"
template: "{{ .Extended }}"
- title: "RecPath"
template: "{{ .RecPath }}"
- title: "LogPath"
template: "{{ .LogPath }}"
recording-finish:
enable: true
userName: "録画終了通知"
message: ":white_check_mark: {{ .ChannelName }} で {{ .Name }} の録画が終了しました"
fields-section:
- title: "RecordedID, ProgramID"
template: "{{ .RecordedID }}, {{ .ProgramID }}"
- title: "ChannelType, ChannelID, HalfWidthChannelName"
template: "{{ .ChannelType }}, {{ .ChannelID }}, {{ .HalfWidthChannelName }}"
- title: "StartAtTime, EndAtTime, DurationMin"
template: "{{ .StartAtTime }}, {{ .EndAtTime }}, {{ .DurationMin }}min"
- title: "HalfWidthName"
template: "{{ .HalfWidthName }}"
- title: "HalfWidthDescription"
template: "{{ .HalfWidthDescription }}"
- title: "HalfWidthExtended"
template: "{{ .HalfWidthExtended }}"
- title: "RecPath"
template: "{{ .RecPath }}"
- title: "LogPath"
template: "{{ .LogPath }}"
- title: "ErrorCnt, DropCnt, ScramblingCount"
template: "{{ .ErrorCnt }}, {{ .DropCnt }}, {{ .ScramblingCount }}"
recording-failed:
<<: *rec-command-default
enable: true
userName: "録画エラー通知"
message: ":x: {{ .ChannelName }} で {{ .Name }} の録画中にエラーが発生しました"
encoding-finish:
enable: true
userName: "エンコード終了通知"
# struct の内容は /pkg/app/encoding_notification.go の EncodingDetail を参照
message: ":white_check_mark: {{ .HalfWidthChannelName }} の {{ .HalfWidthName }} のエンコードが終了しました"
fields-section:
- title: "RecordedID, VideoFileID"
template: "{{ .RecordedID }}, {{ .VideoFileID }}"
- title: "OutputPath"
template: "{{ .OutputPath }}"
- title: "Mode"
template: "{{ .Mode }}"
- title: "ChannelID, HalfWidthChannelName"
template: "{{ .ChannelID }}, {{ .HalfWidthChannelName }}"
- title: "HalfWidthName"
template: "{{ .HalfWidthName }}"
- title: "HalfWidthDescription"
template: "{{ .HalfWidthDescription }}"
- title: "HalfWidthExtended"
template: "{{ .HalfWidthExtended }}"