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 support for exporting own messages only from timeframe #264

Open
razvanphp opened this issue Jan 11, 2024 · 8 comments
Open

Add support for exporting own messages only from timeframe #264

razvanphp opened this issue Jan 11, 2024 · 8 comments
Labels
enhancement New feature or request
Milestone

Comments

@razvanphp
Copy link

My usecase is rather interesting, but maybe also useful for other freelancers.

I want to be able to export all my messages from last month so I can calculate my hourly timesheet for invoicing.

I can easily select them in search, by choosing from:me and filter:range but pagination is awful and I can't programatically work on the dates and hours.

Thank you!
R

@razvanphp
Copy link
Author

Seems like /api/search.modules.messages endpoint has this functionality, can we use it already with arbitrary parameters/query?

Screenshot 2024-01-11 at 23 00 18

@rusq
Copy link
Owner

rusq commented Jan 11, 2024

Hey @razvanphp, thank you for the suggestion. I think once I get the v3 out, this would be a great feature to have, I'll add it in v3.1 milestone.

@rusq rusq modified the milestones: v3.1, 2.3.5 Jan 11, 2024
@rusq rusq added the enhancement New feature or request label Jan 18, 2024
@rusq
Copy link
Owner

rusq commented Apr 7, 2024

Added in v3.0.0

You can try it by checking out the v3 branch, and running

go run ./cmd/slackdump search messages "search terms supported by slack, i.e. user:@blah"

@rusq rusq modified the milestones: v3.1, v3.0.0 Apr 7, 2024
@razvanphp
Copy link
Author

Yes! it worked, thank you!

Now I have to write my own script for parsing and calculations 🙂

@razvanphp
Copy link
Author

Hey @rusq, tried again the feature and observed a small bug: the output file is not a valid json, it misses the array [] wrapper and , in between the objects. Is this expected?

Screenshot 2024-06-05 at 18 03 21

Otherwise it works great, I published my script as a gist.

slack heatmap 03 2024

@rusq
Copy link
Owner

rusq commented Jun 6, 2024

Hey @razvanphp , the output file is a valid JSONL document, where each line is a JSON object. This is done to reduce memory usage. If I was to assemble an array of million messages, that would take considerable amount of RAM, so JSONL shifts that problem to the user

@kisst
Copy link

kisst commented Jun 26, 2024

Pagination seems to be missing from this search function, I only get the first 70 matches, while there in the app the same search returns 65k messages.

@rusq
Copy link
Owner

rusq commented Jul 9, 2024

@kisst , thanks, I don't remember there was an issue last time I checked, interesting. I'll have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants