Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 1.49 KB

README.md

File metadata and controls

59 lines (45 loc) · 1.49 KB

Slack Channel Exporter

Dependency Status Code Scanning Test Status

This project allows you to export Slack channel messages, including threads and images, to JSON or PDF format.

Features

  • Exports messages in chronological order
  • Includes user avatars and names
  • Preserves threaded conversations
  • Embeds images as base64 data
  • Supports JSON and PDF output formats

Status

  • Dependency Status: This badge indicates that the project's dependencies are up to date.
  • Code Scanning: This badge shows the status of the project's code scanning workflow using GitHub's CodeQL analysis.
  • Test Status: This badge displays the status of the project's test workflow.

Requirements

  • Python 3.11+
  • Slack Bot Token with required permissions:
    • channels:history
    • channels:read
    • files:read
    • users:read

Installation

pip install -r requirements.txt

Usage

Set your Slack token:

export SLACK_TOKEN='xoxb-your-token'

Run the exporter:

# Export to JSON
python exporter.py --format json

# Export to PDF
python exporter.py --format pdf

Docker

Build:

docker build -t slack-exporter .

Run:

docker run -v "$(pwd):/app" -e SLACK_TOKEN='xoxb-your-token' slack-exporter --format pdf