the100rabh / slack-export-json-to-csv Goto Github PK
View Code? Open in Web Editor NEWConvert Slack messages exported in their complicated JSON format to simple CSV format
License: The Unlicense
Convert Slack messages exported in their complicated JSON format to simple CSV format
License: The Unlicense
Hey, I wanted to have all the threaded messages be clearly pointing towards the message the person is replying to. Any advice on how to do that by maybe modifying your code ?
I am trying to convert JSON data into a CSV in Python3, but it no longer works with this script, giving me different errors. Anyone know how to fix for Python 3? Thanks.
Below is my JSON data:
{
"fruit": [
{
"name": "Apple",
"binomial name": "Malus domestica",
"major_producers": [
"China",
"United States",
"Turkey"
],
"nutrition": {
"carbohydrates": "13.81g",
"fat": "0.17g",
"protein": "0.26g"
}
},
{
"name": "Orange",
"binomial name": "Citrus x sinensis",
"major_producers": [
"Brazil",
"United States",
"India"
],
"nutrition": {
"carbohydrates": "11.75g",
"fat": "0.12g",
"protein": "0.94g"
}
},
{
"name": "Mango",
"binomial name": "Mangifera indica",
"major_producers": [
"India",
"China",
"Thailand"
],
"nutrition": {
"carbohydrates": "15g",
"fat": "0.38g",
"protein": "0.82g"
}
}
]
}
This script seems to rely on the users.json file but the extract of a channel that my admin provided does not include the users file. Is there a workaround if I don't care about the user data? Thanks!
Traceback (most recent call last):
File "slack_json_to_csv.py", line 34, in
with open(userjson) as user_data:
IOError: [Errno 2] No such file or directory: '/Users/asilcox/Downloads/se-hotline/users.json'
The script fails because we have a Slackbot auto reply in our channels:
Error:
Traceback (most recent call last):
File "slack_json_to_csv.py", line 54, in <module>
user_cur = user[item["user"]]
KeyError: 'USLACKBOT'
Example message in json
{
"text": "That's just, like, your opinion, man.",
"type": "message",
"subtype": "slackbot_response",
"user": "USLACKBOT",
"ts": "1510321670.000102"
},
hi, when i try running the script i get the following error after the script reads the users file:
Traceback (most recent call last):
File "slack_json_to_csv.py", line 54, in
user_cur = user[item["user"]]
KeyError: 'user'
Hi,
Do you know how to get the show which messages are replies to which message. Like link them or print those messages after the main thread
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.