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] [--skip_bookmarks]- 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.
--channel_names CHANNEL_NAMESchannel names you want to process. If not set, set to all available channels. Set by comma-separation for multiple inputs. For example, general,random
--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.
--skip_bookmarksSkip process bookmarks.
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] [--skip_bookmarks]- 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 download. If not set, set to all available channels. Set by comma-separation for multiple inputs. For example, general,random
--skip_bookmarksSkip process bookmarks.
uploader#
Upload the specific channels or all channels as you want.
- usage:
slack_transfer upload [-h] --data_dir DATA_DIR --uploader_token UPLOADER_TOKEN [--old_channel_names OLD_CHANNEL_NAMES] [--override] [--name_mappings NAME_MAPPINGS] [--skip_bookmarks]- optional arguments:
-h, --helpshow this help message and exit
- :doce:`--data_dir DATA_DIR, -d DATA_DIR`
Data directory for saving upload data or loading upload data. This is required.
--uploader_token UPLOADER_TOKEN, -td UPLOADER_TOKENupload token obtained from slack (the original workspace). Starts with xoxb-
--old_channel_names OLD_CHANNEL_NAMESchannel names you want to upload. Name is selected among downloaded WS. If not set, set to all available channels. Set by comma-separation for multiple inputs. For example, general,random
--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.
--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.
--skip_bookmarksSkip process bookmarks.
bookmark#
Move bookmarks of the specific channels from the original WS to the destination WS.
- usage:
slack_transfer bookmark [-h] --data_dir DATA_DIR --downloader_token DOWNLOADER_TOKEN --uploader_token UPLOADER_TOKEN [--channel_names CHANNEL_NAMES] [--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-
--channel_names CHANNEL_NAMESchannel names you want to move bookmarks. If not set, set to all available channels. Set by comma-separation for multiple inputs. For example, general,random
--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.
emoji#
Download emojis specific to the workspace. Only download is available. Thus, after downloading, you have to add them to the destination WS.
- usage:
slack_transfer emoji [-h] --data_dir DATA_DIR --downloader_token DOWNLOADER_TOKEN- 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-
token_test#
Test your token by bootstrap. It means that if the token has not enough scope, it will be pointed out step by step of each tests.
- usage:
slack_transfer token_test [-h] --token TOKEN --test_channels TEST_CHANNELS [--as_downloader] [--as_uploader]- optional arguments:
-h, --helpshow this help message and exit
--token TOKENToken obtained from slack. Starts with xoxb-
--test_channels TEST_CHANNELSTest channel names. Multiple channels can be set by comma-separation like general,private
--as_downloaderfor checking as downloader
--as_uploaderfor checking as uploader