Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andxyz/slack-history-export
export your slack-history
https://github.com/andxyz/slack-history-export
export export-json slack slack-api slack-extension
Last synced: about 2 months ago
JSON representation
export your slack-history
- Host: GitHub
- URL: https://github.com/andxyz/slack-history-export
- Owner: andxyz
- Created: 2016-10-04T22:02:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-10-30T22:13:47.000Z (about 2 years ago)
- Last Synced: 2024-08-05T17:35:28.897Z (5 months ago)
- Topics: export, export-json, slack, slack-api, slack-extension
- Language: Python
- Size: 13.7 KB
- Stars: 25
- Watchers: 2
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-hacking-lists - andxyz/slack-history-export - export your slack-history (Python)
README
a fork of https://gist.github.com/Chandler/fb7a070f52883849de35
My fork is solely to document how to use the code with python3. If you are
unfamiliar with python3 but own a mac laptop.The script finds all channels, private channels and direct messages
that your user participates in. it downloads the complete history for
those converations and writes each conversation out to seperate json files.This user centric history gathering is nice because the official slack data exporter
only exports public channels.PS, this only works if your slack team has a paid account which allows for unlimited history.
PPS, this use of the API is blessed by Slack.
https://get.slack.help/hc/en-us/articles/204897248> If you want to export the contents of your own private groups and direct messages please see our API documentation.
- step 1 visit https://api.slack.com/docs/oauth-test-tokens and click "generate-test-token"
```shell
open 'https://api.slack.com/docs/oauth-test-tokens'
```- step 2 check https://api.slack.com/tokens
```shell
open 'https://api.slack.com/tokens'
```#### A simple usage example
```shell
cd slack-history-export/
brew install python3
pip3 install pipenv
pipenv --python=/usr/local/bin/python3 shell
pipenv install
pipenv run python slack_history.py --token='123token'
```#### other usage examples
```shell
pipenv run python slack_history.py --token='123token'
pipenv run python slack_history.py --token='123token' --dryRun=True
pipenv run python slack_history.py --token='123token' --skipDirectMessages
pipenv run python slack_history.py --token='123token' --skipDirectMessages --skipPrivateChannels
```see [./slack_history.py](slack_history.py)