CLI#
After pip installation, you can use slack_transfer CLI command instead of python -m slack_transfer.cli.*
pip install slack-transfer
slack-transfer --help
run#
Run message migration. No intaractive mode. All settings are given through CLI args.
- usage:
slack_transfer run [-h] --data_dir DATA_DIR [--downloader_token DOWNLOADER_TOKEN] [--uploader_token UPLOADER_TOKEN] [--override] [--skip_download] [--skip_upload] [--name_mappings NAME_MAPPINGS]- optional arguments:
-h, --helpshow this help message and exit
--data_dir DATA_DIR, -d DATA_DIRData directory for saving download data or loading upload data. This is required.
--downloader_token DOWNLOADER_TOKEN, -td DOWNLOADER_TOKENDownload token obtained from slack (the original workspace). Starts with xoxb-
--uploader_token UPLOADER_TOKEN, -tu UPLOADER_TOKENUpload token obtained from slack (the destination workspace). Starts with xoxb-
--overrideThis flag enables message migration to the destination workspace even when a channel already exists. This means that additional messages are inserted after the message already sent to the channel. If you want not to do so, please delete the channel on the destination workspace first.
--skip_downloadSkip download. This is usually used when the download is already finished.
--skip_uploadSkip upload. This is usually used when only the download is necessary.
--name_mappings NAME_MAPPINGSYou can set name mappings between the channel names of the original and destination workspaces. Comma-separated dictionaries (key:value) are available. For example, old_name1:new_name1,old_name2:new_name2.
file_volume#
Check file volumes before downloading. Return the total file size of given channels.
- usage:
slack_transfer file_volume [-h] --token TOKEN [--channel_ids CHANNEL_IDS] [--auto_join]- optional arguments:
-h, --helpshow this help message and exit
--token TOKENToken obtained from slack. Starts with xoxb-
--channel_ids CHANNEL_IDSchannel ids you want to check the total volume of files. If not set, set to all available channels. Set by comma-separation for multiple inputs
--auto_joinif bot is not in channel automatically join when this flag is used.
download#
Download the specific channels or all channels as you want.
- usage:
slack_transfer download [-h] --data_dir DATA_DIR --downloader_token DOWNLOADER_TOKEN [--channel_names CHANNEL_NAMES]- optional arguments:
-h, --helpshow this help message and exit
--data_dir DATA_DIR, -d DATA_DIRData directory for saving download data or loading upload data. This is required.
--downloader_token DOWNLOADER_TOKEN, -td DOWNLOADER_TOKENDownload token obtained from slack (the original workspace). Starts with xoxb-
--channel_names CHANNEL_NAMESchannel names you want to check the total volume of files. If not set, set to all available channels. Set by comma-separation for multiple inputs. For example, general,random