Skip to content

Commit

Permalink
Write JSON output correctly for different users (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardottt committed Aug 24, 2021
1 parent 17c3225 commit eca4721
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions output.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,52 +84,6 @@ def output_json(user):
This function writes in the JSON output file the results got
from the database for the specified user or for all of them
(if ALL is inputted).
user, DATE-HERE, 3,6,9
user, DATE-HERE2, 3,6,1000
user, DATE-HERE3, 3,3985,9
user, DATE-HERE4, 13,6,9
user2, DATE-HERE1, 13,6,9
user, DATE-HERE5, 13,6,90
user2, DATE-HERE2, 13,6,9
user3, DATE-HERE3, 13,6,9
"user": {
"2021-08-24": {
"tweets": 10,
"likes": 5,
"retweets":6,
},
"2021-08-25": {
"tweets": 10,
"likes": 5,
"retweets":6,
},
"2021-08-28": {
"tweets": 10,
"likes": 5,
"retweets":6,
}
},
"user2": {
"2021-08-24": {
"tweets": 10,
"likes": 5,
"retweets":6,
},
"2021-08-25": {
"tweets": 10,
"likes": 5,
"retweets":6,
},
"2021-08-28": {
"tweets": 10,
"likes": 5,
"retweets":6,
}
}
"""
conn = db.conn_db()
if user == "ALL":
Expand Down

0 comments on commit eca4721

Please sign in to comment.