-
Thanks @rusq. Dumping worked very well. Do you have a recommendation for parsing the json output? I am using "jq" but it's obviously less useful than working in a UI like Slack. Thx. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hey @fitzyjoe , thanks for your donation!
it requires that sample.json is present - which is a message dump from the slack (it's also in samples directory, if you need one) |
Beta Was this translation helpful? Give feedback.
-
With #!/bin/sh
SAMPLE=../sample.json
cat "${SAMPLE}" | jq '.messages[]|.user +": "+.text' | tr -d '"' |
Beta Was this translation helpful? Give feedback.
-
Hi guys! Obviously very great work @rusq for building this utility. This was very helpful for me. I thought I ask my question here instead of starting a new thread. Let me know if I should do otherwise. I also had a question about parsing the json output and the reference to the example code helped me greatly. Is there a way of automatically downloading attached files (such as images, videos and text files) so that they also display nicely? I also wonder if there is an option, since attachments are downloaded into a folder, to have links to those files instead of to the original html link? |
Beta Was this translation helpful? Give feedback.
Hey @fitzyjoe , thanks for your donation!
jq
is a great tool, but sometimes tedious to use. I think the easiest option would be to use python, I added an example to the repository:https://github.com/rusq/slackdump/blob/master/examples/python/print_messages.py
it requires that sample.json is present - which is a message dump from the slack (it's also in samples directory, if you need one)