Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to skip messages when a user joins/leaves a channel #212

Merged
merged 3 commits into from
Jan 19, 2025

Conversation

volker-fr
Copy link
Contributor

@volker-fr volker-fr commented Jan 16, 2025

Add feature flag to hide messages when a user joins/leaves a channel.

This PR also changes how config options handed over by click. Instead of having to add each new arg in a list, it automatically hands them over in an config dict. As result the way how these configs are set had to be changes where they are used.

This PR also moves the zip file extraction to the Reader class. The reason is that cli.py and main.py had separate extract options. At the same time, cli.py used the unzip function to generate the slack name, which also needs to be computed in the Reader class itself.

PR resolves also #191

@click.option("--template", default=None, type=click.File('r'), help="Custom single file export template")
@click.argument('archive_dir')
@click.argument('archive')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this rename is to have the same config['archive'] name as main.py. This way the same config variable can be used in the Reader class.

@volker-fr volker-fr marked this pull request as draft January 16, 2025 02:18
@@ -112,27 +114,3 @@ def create_archive_info(filepath, extracted_path, archive_sha=None):
s = json.dumps(archive_info, ensure_ascii=False)
s = to_unicode(s)
f.write(s)


def get_export_info(archive_name):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was only used by cli.py. At the same time the workspace name is also computed in Reader()

@volker-fr volker-fr marked this pull request as ready for review January 18, 2025 18:37
@volker-fr volker-fr changed the title Add option to skip messages when a user joined a channel Add option to skip messages when a user joins/leaves a channel Jan 18, 2025
@volker-fr
Copy link
Contributor Author

@hfaran merge conflict got fixed.

slackviewer/main.py Show resolved Hide resolved
@hfaran hfaran merged commit 3ea3e98 into hfaran:master Jan 19, 2025
2 checks passed
@volker-fr volker-fr deleted the skip-join branch January 19, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants