9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

slackの今日の会話をcurlで取得しjqで解析

9
Posted at

今日の会話を取得

# !/bin/sh
TOKEN="XXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXX"
DAY="2015-10-16"
URL="https://slack.com/api/search.all?token=${TOKEN}&query=on%3A${DAY}%20&pretty=1"

curl -s -X GET "${URL}" \
| jq -r '.messages.matches[].text'
# 時間の降順に出力されるので、昇順に変える場合は以下(作りかけ)
# | jq '[.messages.matches[] | {ts: .ts, username: .username, text:.text}] | group_by(.ts)'

jq使い方

9
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?