vim-jp slacklog/log-data
vim-jp slacklogのログ置き場
log-data
データ構造がいまいちわからん
Go読めないtakker.icon
生成されたJSONを直接読んで構造を手書きするか
ログ生成方法:/icons/github.iconHow to update log-data | vim-jp/slacklog-generator
JSON構造
必要そうな項目だけ抜粋
user情報
code:schema.ts
type User = {
id: string;
name: string;
profile: {
image_24: string;
image_32: string;
image_48: string;
image_72: string;
image_192: string;
image_512: string;
image_1024: string;
image_original: string; // ないこともある
};
};
vim-jpのuser情報をscrapbox json dataに変換する
channel情報
code:schema.ts
type Channel = {
id: string;
name: string;
created: number;
is_archived: boolean;
topic: {
value: string;
};
purpose: {
value: string;
};
};
vim-jpのchannel情報をscrapbox json dataに変換する
messages
Slack からエクスポートしたデータの読み方 | Slackに解説があった
https://github.com/vim-jp/slacklog/tree/log-data/slacklog_data/:channelId/:yyyy-MM-dd.json
code:schema.ts
type Message = {
type: 'message';
user: string;
ts: string;
reactions: {
name: string;
count: number;
users: string[];
}[];
text: string;
attachments?: {
fallback: string;
id: number;
title: string;
title_link string;
text: string;
image_url: string;
service_name: string;
service_icon: string;
from_url: string;
original_url: string;
}[];
thread_ts?: string; // threadのID
subtype?: 'thread_broadcast'; // channelにも投稿した場合
replies?: {
user: string;
ts: string;
}[];
};
OGPとかが展開されるとattachmentsが使われる
mentionとかはどういうデータ形式なんだろう?
threadの取り扱いも気になる
そもそもtsってなんだろう?
time stampかな?
とりあえず一覧だけ取得してみるか
vim-jpの全てのmessageを取得する
Slackのmessageをscrapbox記法に変換する
channel join message
code:ts
type JoinMessage = {
type: 'message';
subtype: 'channel_join';
user: string;
text: string;
};
ファイルとか
https://github.com/vim-jp/slacklog/raw/log-data/files/:fileId/:filename
https://github.com/vim-jp/slacklog/raw/log-data/emojis/:emoji.:ext
vim-jpのemoji情報をscrapbox json dataに変換する
scrapboxに取り込みたいけど、どういうformatにすればいいかな……?
各channelのログは、1日ごとに区切ってページにする
threadはどうする?
indentを一段下げて表示するか
アイコンは一つずつページにしておく
user profileもページにしておく
user iconは行の先頭に置く
2021-07-31 16:28:31 scriptはgithubに移しておくか
23:39:59 repoだけつくった
/icons/github.icontakker99/vim-jp-slacklog2scrapbox
#2021-07-31 16:28:50
#2021-07-01 18:41:06
#2021-06-04 14:57:28
#2021-05-23 05:10:42