Convert to csv from exported json data in slack service.
Qiitaに日本語でも記事を書いています。
- OS: macOS Monterey (12.5)
- python: 3.10.5
check for official site.
Because there is a file called converter.py
In the terminal,
specify the top folder of the exported data expanded by slack
with the full path in the first argument as shown below,
and execute it with python.
$ python converter.ph /Users/username/Desktop/my_workspace
After execution, a folder name slack_csv_output will be created in parallel with the specified folder.
A file called channel_name.csv
is created in it.
If there is already a folder with the same name, an error will occur, so delete it in advance.
Columns are created in each csv with the following correspondence, and each message is converted as a row.
date
> Post date (obtained from file name)
name
> full name or display name
text
> Posted message
files
> URL of attached file (If there are multiple attachments, display them with line breaks)