Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Pythonでslackの困りごとを何とかしてみた①
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
しみず ゆうき
September 09, 2020
Programming
360
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pythonでslackの困りごとを何とかしてみた①
しみず ゆうき
September 09, 2020
More Decks by しみず ゆうき
See All by しみず ゆうき
技術イベントの甲府一極集中問題をオープンデータで解決してみる
yuukis
0
130
12年前のAndroidアプリを蘇らせた話
yuukis
0
81
EventBridgeで地域イベントのイベントストリームを作ってみた
yuukis
0
150
2025年 山梨の技術コミュニティを振り返る
yuukis
0
520
サイトを作ったらNFCタグキーホルダーを爆速で作れ!
yuukis
0
1.3k
Perlで痩せる
yuukis
1
940
Pythonで遊べるLEDボードの紹介
yuukis
0
180
今話題のMCPサーバーをFastAPIでサッと作ってみた
yuukis
0
770
地域ITコミュニティの活性化とAWSに移行してみた話
yuukis
0
660
Other Decks in Programming
See All in Programming
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
150
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
430
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
120
ActionController meets Protocol Buffers
sorah
1
720
残高管理から台帳サービスへの進化
artoy
1
210
AI-Powered Domain-Driven Design
ziobrando
0
320
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
280
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
110
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
Next.js: The final boss of Web Performance
guaca
0
340
AmebaブログはKMPから卒業します
kmars0605
0
250
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
160
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Code Review Best Practice
trishagee
74
20k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
580
Faster Mobile Websites
deanohume
310
32k
It's Worth the Effort
3n
188
29k
A better future with KSS
kneath
240
18k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Why Our Code Smells
bkeepers
PRO
340
58k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Code Reviewing Like a Champion
maltzj
529
40k
Bash Introduction
62gerente
615
220k
Transcript
ʲ৴ݰύΠ ΦϯϥΠϯಡॻձ ୈ -5ʳ PythonͰ slackͷ ࠔΓ͝ͱΛԿͱ͔ͯ͠Έͨᶃ 2020. 9. 9
͠Έͣ Ώ͏͖ 1
͓·͑୭Αʁ ͠Έͣ Ώ͏͖ • ࢁསݝߕࢢग़ɺ౦ژʹग़Ք͗த • ϞόΠϧΞϓϦ ΤϯδχΞ(Android/iOS) • Python
৴ݰύΠͰ͞ΘΔ͘Β͍ 2
ં֯ͷ LT ͳͷͰɺ Python ͰࠔΓ͝ͱΛ ղܾ͍ͨ͠ʂ 3
ۀͰͷ࠷ۙͷࠔΓ͝ͱ 4 ձࣾ Slack ͷνϟϯωϧ͕૿͑͗ͯ͢୳͢ͷ͕େมʂ શࣾ࿈བྷ ܽ੮࿈བྷ ߪೖਃ ࡶஊ ։ൃؔ࿈ใڞ༗
֤छϩάग़ྗ ֤Ҋ݅ͷνʔϜ࿈བྷ χϡʔεڞ༗ πʔϧ༡ͼ ֤ϝϯόʔͷใ ΠϕϯτࢀՃใࠂ FUD ׆ಈͷແ͍νϟϯωϧϦετ͔ΒӅ͍ͨ͠
աڈͷ LT Ͱ Slack API Λ͞Θ͍ͬͯΔͷͰɺ 5
ٱ͠ৼΓʹ Python ίʔυॻͧ͘ ʙ !! 6
ͱࢥ͚ͬͨͲɺطͷπʔϧΛݟ͚ͭ·ͨ͠ 7
Symantec/slack-autoarchive • Python Ͱॻ͔Εͨ Slack ༻ ࣗಈΞʔΧΠϒ εΫϦϓτ • աڈؒͰʢCPUҎ֎ͷʣϝοηʔδ͕ͳ͍νϟϯωϧΛ
ࣗಈͰΞʔΧΠϒ͢Δ • ΞʔΧΠϒͤͨ͘͞ͳ͍νϟϯωϧΛࢦఆՄೳ ʢϗϫΠτϦετʣ 8
αΫοͱಋೖͯ͠Έͨ 9
ᶃ ϦϙδτϦΛ Fork 10
ᶄ Slack API Token Λऔಘɾઃఆ 11 API Token
ᶅ GitHub Actions ϫʔΫϑϩʔ࡞ • ຖ݄ 9:00AM(JST) ʹ࣮ߦ • Ҏ্ϝοηʔδ͕ແ͍
νϟϯωϧ͕ରͱͳΔΑ͏ ઃఆ • ϗϫΠτϦετΛڥมͰ ઃఆ 12 name: CI on: schedule: - cron: "0 0 1 * *" jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python 3.8 uses: actions/setup-python@v1 with: python-version: 3.8 - name: Install dependencies run: | pip install -r requirements.txt - name: Run auto-archive run: | SLACK_TOKEN=$SLACK_TOKEN ¥ DRY_RUN=$DRY_RUN ¥ python slack_autoarchive.py env: SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} DRY_RUN: false DAYS_INACTIVE: 180 WHITELIST_KEYWORDS: 'general,times_' ADMIN_CHANNEL: activity .github/workflows/main.yml
݁ՌɺࣗಈͰΞʔΧΠϒ͞Εͨ 13
·ͱΊ ʮPython Ͱ Slack ͷࠔΓ͝ͱΛԿͱ͔ͯ͠Έͨʯ • Γ͍ͨ͜ͱΛ͍ίʔυͰαΫοͱ࣮ݱͰ͖ͯྑ͍ʂ • ࣍ Slack
ʹΞοϓϩʔυͨ͠ϑΝΠϧΛཧ͢Δπʔϧ Λ࡞Γ͍ͨʂ 14