Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
VimでSlackがしたい
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
higashi
August 30, 2019
0
990
VimでSlackがしたい
ゴリラ.vim 第七回で発表したスライド
higashi
August 30, 2019
Tweet
Share
More Decks by higashi
See All by higashi
Neovim × リアルタイムチャット
higashi000
1
180
Go! Go! WebAssembly!!
higashi000
0
75
Can we use Slack on Vim?
higashi000
1
330
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
180
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
Mind Mapping
helmedeiros
PRO
1
110
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
How to train your dragon (web standard)
notwaldorf
97
6.5k
Done Done
chrislema
186
16k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Facilitating Awesome Meetings
lara
57
6.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
270
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Transcript
VimでSlackがしたい! @higashi136_2
自己紹介 ・Name : ひがし ・Twitter : @higashi136_2 ・GitHub : higashi000
・Like : Vim, D言語
本題
Slack使ってますか?
Slackとは ・チャットサービス ・ワークスペース(団体)の中にチャンネル(部署)を作り, チャンネルごとに色々話せる. ・企業内,部内で導入している団体も多い
VimでSlackがしたい!
したくない?
github.com/higashi000/sarahck.vim
sarahck.vim ・VimでSlackをするためのプラグイン ・レガシートークンを発行してもらい, そのトークンを使ってAPIを叩いている ・動作確認済み環境 : Ubuntu18.04
作ろうとしたきっかけ Slackのデスクトップ版 重い...
作ろうとしたきっかけ Vimでやれば解決じゃん!
作ろうとしたきっかけ Vimでやれば解決じゃん! Slack様
作ろうとしたきっかけ デスクトップ版も ブラウザ版も 高速化したよ Slack様
作ろうとしたきっかけ 神 デスクトップ版も ブラウザ版も 高速化したよ Slack様
作ろうとしたきっかけ でも楽しそうだからやるよ
使用言語 ・Python ・VimScript
使用ライブラリ ・requests ・Vim
Pythonでやってること ・Slackへのリクエスト送信 ・帰ってきたjsonのparse
VimScriptでやってること ・コマンドの定義 ・命令の入力 ・結果の出力
現在できること ・メッセージの送信 ・メッセージの確認 ・所属チャンネル一覧の確認
一つ一つ説明(デモ)
メッセージの送信 ・chat.postMessageを使用 ・SarahckPostMessage チャンネル名 テキスト で使用可能 ・テキストに :thinking_face: と入れるとちゃんと表示される
デモ
メッセージ確認 ・channels.historyを使用 ・SarahckDispChannel チャンネル名 で使用可能
デモ
所属チャンネル表示 ・users.conversationsを使用 ・SarahckChannelList で使用可能
所属チャンネル表示 ・チャンネルの一覧はpopupで表示 ・選択したチャンネルのメッセージが確認できる でも...
所属チャンネル表示 ・Vim8.1.1593以前,Neovimで実行した場合 「未実装〜」と出力するだけになっている ・ごめんなさい
デモ
苦労した部分 ・リクエストを送るときのパラメーターのチャンネル部分 ・チャンネル名ではなくチャンネルIDをつける必要がある ・channels.listですべてのチャンネルを引っ張ってきて その中からチャンネル名が一致するものを探した
今後追加予定の機能 ・メッセージにリアクションをつけたい ・メッセージの表示にpopupを使いたい ・チャンネルの入退出機能
アドバイスお願いします!
VimでSlackがしたい! @higashi136_2