{"id":17005434,"url":"https://github.com/erikkalkoken/slackchannel2pdf","last_synced_at":"2025-04-30T19:32:49.408Z","repository":{"id":40387810,"uuid":"195134367","full_name":"ErikKalkoken/slackchannel2pdf","owner":"ErikKalkoken","description":"Export the text contents of any Slack channel to a PDF file.","archived":false,"fork":false,"pushed_at":"2023-09-06T18:51:22.000Z","size":1806,"stargazers_count":99,"open_issues_count":8,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-15T13:26:52.777Z","etag":null,"topics":["pdf","python","python3","slack"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/slackchannel2pdf/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ErikKalkoken.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-03T22:33:01.000Z","updated_at":"2025-03-07T09:34:52.000Z","dependencies_parsed_at":"2024-10-26T21:20:57.909Z","dependency_job_id":"dc969260-825e-409f-bbb2-6cdbb8cbf175","html_url":"https://github.com/ErikKalkoken/slackchannel2pdf","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikKalkoken%2Fslackchannel2pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikKalkoken%2Fslackchannel2pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikKalkoken%2Fslackchannel2pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikKalkoken%2Fslackchannel2pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ErikKalkoken","download_url":"https://codeload.github.com/ErikKalkoken/slackchannel2pdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251769377,"owners_count":21640889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pdf","python","python3","slack"],"created_at":"2024-10-14T04:46:25.524Z","updated_at":"2025-04-30T19:32:49.360Z","avatar_url":"https://github.com/ErikKalkoken.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slackchannel2pdf\n\n**slackchannel2pdf** is a command line tool for exporting the text contents of any Slack channel to a PDF file.\n\n[![release](https://img.shields.io/pypi/v/slackchannel2pdf?label=release)](https://pypi.org/project/slackchannel2pdf/)\n[![python](https://img.shields.io/pypi/pyversions/slackchannel2pdf)](https://pypi.org/project/slackchannel2pdf/)\n[![license](https://img.shields.io/github/license/ErikKalkoken/slackchannel2pdf)](https://github.com/ErikKalkoken/slackchannel2pdf/blob/master/LICENSE)\n[![Tests](https://github.com/ErikKalkoken/slackchannel2pdf/actions/workflows/main.yml/badge.svg)](https://github.com/ErikKalkoken/slackchannel2pdf/actions/workflows/main.yml)\n[![codecov](https://codecov.io/gh/ErikKalkoken/slackchannel2pdf/branch/master/graph/badge.svg?token=omhTxW8ALq)](https://codecov.io/gh/ErikKalkoken/slackchannel2pdf)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n## Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Installation](#installation)\n- [Token](#token)\n- [Usage](#usage)\n- [Arguments](#arguments)\n- [Configuration](#configuration)\n- [Limitations](#limitations)\n\n## Overview\n\nThis tool is aimed at end users that want to make backups of Slack conversations or be able to share them outside Slack. It will create a PDF file for every exported channel and will work both for public and private channels.\n\n**slackchannel2pdf** is an open source project and offered free of charge and under the MIT license. Please check attached licence file for details.\n\n## Features\n\nHere is a short summary of the key features of **slackchannel2pdf**:\n\n- Export of any public and private Slack channel to a PDF file (text only)\n- Automatic detection of timezone and locale based from Slack. Can also be set manually if needed.\n- Exporting support for all Slack features incl. threads and layout blocks\n- Ability to export only the portion of a channel for a specific time period\n- Ability to configure page layout of PDF file (e.g. Portrait vs. Landscape)\n- Many defaults and behaviors can be configured with configuration files\n\n## Installation\n\n### Python\n\nYou can install the tool from PyPI with `pip install`. This wil require you to have Python reinstalled in your machine and it will work with any OS supported by Python. We recommend installing it into a virtual environment like venv.\n\n```bash\npip install slackchannel2pdf\n```\n\nYou can then run the tool with the command `slackchannel2pdf` as explained in detail under [Usage](#usage).\n\n### Windows\n\nFor windows users we also provide a Windows EXE that does not require you to install Python. You find the EXE file under [releases](https://github.com/ErikKalkoken/slackchannel2pdf/releases).\n\n## Token\n\nTo run **slackchannel2pdf** your need to have a token for your Slack workspace with the following permissions:\n\n- `channels:history`\n- `channels:read`\n- `groups:history`\n- `groups:read`\n- `users:read`\n- `usergroups:read`\n\nTo get a working token you need to create a Slack app in your workspace with a user token. Here is one way on how to do that:\n\n1. Create a new Slack app in your workspace (you can give it any name).\n1. Under Oauth \u0026 Permissions / User Token Scopes add all the required scopes as documented above.\n1. Install the app into your workspace\n\nAfter successful installation the token for your app will then shown under Basic Information / App Credentials.\n\n## Usage\n\nIn order to use **slackchannel2pdf** you need:\n\n1. have it installed on your system (see [Installation](#installation))\n2. have a Slack token for the respective Slack workspace with the required permissions (see [Token](#token)).\n\nHere are some examples on how to use **slackchannel2pdf**:\n\nTo export the Slack channel \"general\":\n\n```bash\nslackchannel2pdf --token MY_TOKEN general\n```\n\nTo export the Slack channels \"general\", \"random\" and \"test\":\n\n```bash\nslackchannel2pdf --token MY_TOKEN general random test\n```\n\nTo export all message from channel \"general\" starting from July 5th, 2019 at 11:00.\n\n```bash\nslackchannel2pdf --token MY_TOKEN --oldest \"2019-JUL-05 11:00\" general\n```\n\n\u003e Tip: You can provide the Slack token either as command line argument `--token` or by setting the environment variable `SLACK-TOKEN`.\n\n## Arguments\n\n```text\nusage: slackchannel2pdf [-h] [--token TOKEN] [--oldest OLDEST]\n                        [--latest LATEST] [-d DESTINATION]\n                        [--page-orientation {portrait,landscape}]\n                        [--page-format {a3,a4,a5,letter,legal}]\n                        [--timezone TIMEZONE] [--locale LOCALE] [--version]\n                        [--max-messages MAX_MESSAGES] [--write-raw-data]\n                        [--add-debug-info] [--quiet]\n                        channel [channel ...]\n\nThis program exports the text of a Slack channel to a PDF file\n\npositional arguments:\n  channel               One or several: name or ID of channel to export.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --token TOKEN         Slack OAuth token (default: None)\n  --oldest OLDEST       don't load messages older than a date (default: None)\n  --latest LATEST       don't load messages newer then a date (default: None)\n  -d DESTINATION, --destination DESTINATION\n                        Specify a destination path to store the PDF file.\n                        (TBD) (default: .)\n  --page-orientation {portrait,landscape}\n                        Orientation of PDF pages (default: portrait)\n  --page-format {a3,a4,a5,letter,legal}\n                        Format of PDF pages (default: a4)\n  --timezone TIMEZONE   Manually set the timezone to be used e.g.\n                        'Europe/Berlin' Use a timezone name as defined here: h\n                        ttps://en.wikipedia.org/wiki/List_of_tz_database_time_\n                        zones (default: None)\n  --locale LOCALE       Manually set the locale to be used with a IETF\n                        language tag, e.g. ' de-DE' for Germany. See this page\n                        for a list of valid tags:\n                        https://en.wikipedia.org/wiki/IETF_language_tag\n                        (default: None)\n  --version             show the program version and exit\n  --max-messages MAX_MESSAGES\n                        max number of messages to export (default: 10000)\n  --write-raw-data      will also write all raw data returned from the API to\n                        files, e.g. messages.json with all messages (default:\n                        None)\n  --add-debug-info      wether to add debug info to PDF (default: False)\n  --quiet               When provided will not generate normal console output,\n                        but still show errors (console logging not affected\n                        and needs to be configured through log levels instead)\n                        (default: False)\n```\n\n## Configuration\n\nYou can configure many defaults and behaviors via configuration files. Configuration files must have the name `slackchannel2pdf.ini` and can be placed in two locations:\n\n- home directory (home)\n- current working directory (cwd)\n\nYou can also have a configuration file in both. Settings in cwd will overwrite the same settings in home. And calling this app with command line arguments will overwrite the corresponding configuration setting.\n\nPlease see the master configuration file for a list of all available configuration sections, options and the current defaults. The master configuration file is `slackchannel2pdf/slackchannel2pdf.ini` in this repo.\n\n## Limitations\n\n- Text only: **slackchannel2pdf** will export only text from a channel, but not images or icons. This is by design.\n- No Emojis: the tools is currently not able to write emojis as icons will will use their text representation instead (e.g. `:laughing:` instead of :laughing:).\n- DMs, Group DM: Currently not supported\n- Limited blocks support:Some non-text features of layout blocks not yet supported\n- Limited script support: This tool is rendering all text with the [Google Noto Sans](https://www.google.com/get/noto/#sans-lgc) font and will therefore support all 500+ languages that are support by that font. It does however not support many Asian languages / scripts like Chinese, Japanese, Korean, Thai and others\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikkalkoken%2Fslackchannel2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikkalkoken%2Fslackchannel2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikkalkoken%2Fslackchannel2pdf/lists"}