Commit b130a933 authored by Florestan Biaux's avatar Florestan Biaux 💬
Browse files

ajout users.py

parent 2ac61ed6
import tri
import get
import users
import json
import decode
......@@ -9,7 +10,11 @@ if __name__ == "__main__":
name = str(input("Quel est le nom de la conversation à analyser ? "))
# get json file
data = get.getfile(name) # data = json
print(json.dumps(data))
test = "Jules Fi\u00c3\u00a9vet"
print(decode.string_decode(test))
# choose action to do
choice = 0
while choice != 3:
choice = int(input("\n1 - Afficher les messages\n2 - Afficher les participants\n3- Quitter l\'application\n"))
if choice == 1:
print(data)
if choice == 2:
print(users.userlist(data))
import decode
def userlist(data):
userlist = str(data["participants"])
userlist = userlist.replace("name", "")
userlist = userlist.replace("[", "")
userlist = userlist.replace("]", "")
userlist = userlist.replace("'", '"')
userlist = userlist.replace('""', "")
userlist = userlist.replace('{:', "")
userlist = userlist.replace('}', "")
return decode.string_decode(userlist)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment