Add support for exporting own messages only from timeframe
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
Seems like /api/search.modules.messages endpoint has this functionality, can we use it already with arbitrary parameters/query?
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.
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"
Yes! it worked, thank you!
Now I have to write my own script for parsing and calculations 🙂
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?
Otherwise it works great, I published my script as a gist.
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
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.
@kisst , thanks, I don't remember there was an issue last time I checked, interesting. I'll have a look.