• This repository has been archived on 26/Oct/2023
  • Stars
    star
    287
  • Rank 144,232 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 9 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A NPM module that allows slack users export their history

slack-history-export

Command line module to allow you download your slack history. Supports IM/DM, channels and private groups now, support for multiparty direct message coming soon.

Travis Build Status Codecov Coverage Status David Dependencies Status David devDependencies Status

Installation

npm install slack-history-export -g

Options

Usage: slack-history-export [options]
Options:

  --help, -h      Show help text.                                      [boolean]
  --version, -v   Show version number                                  [boolean]
  --token, -t     Slack Token. You can generate it
                  from here https://api.slack.com/custom-integrations/legacy-tokens
  --type, -T      Type of export you want to do         [choices: "dm", "group"]
  --username, -u  Username of the person who chat
                  history with you you want to download
  --group, -g     Name of the group to download history
  --logLevel, -l  Enable and set log level
        [choices: "info", "silly", "verbose", "warn", "error"] [default: "info"]
  --channel, -c   Name of the channel to download history
  --filepath, -f  Path to the json file to save the history  [default: "stdout"]

You can provide token to the module in several ways

  • CLI flag
  • Environment variable SLACK_HISTORY_EXPORT_TOKEN
  • File. File location is ~/.config/slack-history-export/config.json with key of SLACK_HISTORY_EXPORT_TOKEN
{
  "SLACK_HISTORY_EXPORT_TOKEN": "testingtoken"
}

Usage

slack-history-export -t "slack-token-123456abcde" -u abimbola -f 'amimbola.json'

Contributing

See CONTRIBUTING.md for info on contributing to slack-history-export