If you'd like to get an email when the next post is up:
Since it’s 4,000 people, we’ve always had issues with the 10,000 message limit for free Slack accounts. It’d cost about 4,000 * $15/m or $720,000/y to pay for, which I can’t afford. So we’ve just accepted it as being there. It’d be fun to read the archive sometimes though.
But then @reustle messaged me today:
So Slack actually had an export function, which free users can use too. Awesome! Slack had this for ages, I just never saw it myself.
You can access it at https://slack.com/archives and then click Export Data. It might take a while.
Slackbot will send you a message when it’s ready with a download link:
The problem is that this export is a .ZIP file full of JSON files.
Everything IS in fact in there, but it’s pretty hard to read.
Also all usernames are replaced by user ids, and there’s no user images to be found in the chat logs. They’re in a different file called users.json. All channel names are also replaced by channel ids, which can be found in channels.json.
Point is, it’s a big maze of files and data.
So I wrote a script that ties everything together and outputs nice Slack-looking HTML files of your entire JSON export. Automatically!
It makes this:
Look like this:
The script does a few things:
– Load the users file to identify user ids (and add user pics)
– Load the channels file to identify channel ids
– Compile daily logs into single channel logs (in JSON)
– Generate a layout from channel logs (in HTML)
– Generate an index.html with links to all channel logs in your Slack
Here’s how it looks when you run it:
And here’s how the output looks in a browser:
It’s up here on GitHub, the code is REALLY rough but it works pretty well: https://gist.github.com/levelsio/122907e95956602e5c09.
You’ll need to run it from your shell in the folder of your extracted (!) Slack export ZIP file. It will then make a folder called slack2html above the folder your in with all JSON and HTML files.
Hope this helps!
As mentioned, a search interface would be cool to make too, so if anyone would like to fork my Gist script and add that in the HTML, go for it!
P.S. I wrote a book on building indie startups called MAKE. And I'm on Twitter too if you'd like to follow more of my stories. I don't use email so tweet me your questions. Or you can see my list of posts. To get an alert when I write a new blog post, you can subscribe below:Follow @levelsio