From 7fef68dd0cd6b7e32cb636101b969414b1c9458a Mon Sep 17 00:00:00 2001 From: Rhea Parekh Date: Tue, 17 Apr 2018 02:42:15 +0530 Subject: [PATCH 1/2] slack importer: Add comment on size information of avatars. The size information of an avatar is not required during the import. Check function 'import_uploads_local' and 'import_uploads_s3' in 'export.py' for this. --- zerver/lib/slack_data_to_zulip_data.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zerver/lib/slack_data_to_zulip_data.py b/zerver/lib/slack_data_to_zulip_data.py index ca839b3241bee..2b0b5b8d41ebf 100755 --- a/zerver/lib/slack_data_to_zulip_data.py +++ b/zerver/lib/slack_data_to_zulip_data.py @@ -981,6 +981,10 @@ def get_avatar(avatar_upload_list: List[str]) -> int: avatar_upload_list.append([slack_avatar_url, image_path, original_image_path]) + # We don't add the size information here in avatar's records.json, as it is not + # required while importing the avatars. + # Check the function 'import_uploads_local' and 'import_uploads_s3' + # in 'export.py' for this. avatar['path'] = image_path avatar['s3_path'] = image_path From e4433822dd9765e929230f0cb77e51518e799956 Mon Sep 17 00:00:00 2001 From: Rhea Parekh Date: Tue, 17 Apr 2018 02:42:51 +0530 Subject: [PATCH 2/2] slack importer: Update docs about importing with threads. --- templates/zerver/help/import-data-from-slack.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/templates/zerver/help/import-data-from-slack.md b/templates/zerver/help/import-data-from-slack.md index d93ab4215fd99..bfd66c9ef08aa 100644 --- a/templates/zerver/help/import-data-from-slack.md +++ b/templates/zerver/help/import-data-from-slack.md @@ -47,6 +47,15 @@ cd ~/zulip ./manage.py import --import-into-nonempty converted_slack_data ``` +### Increase Performance + +Add the option `--threads` in the `convert_slack_data` management command and replace `` +by the number of threads you want to run this script on, to increase performance. +``` +./manage.py convert_slack_data slack_data.zip --token --output converted_slack_data +--threads +``` + ## Caveats - Slack doesn't export private channels or direct messages unless you pay