Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Florestan Biaux
Messenger Statistics
Commits
90f4cf28
Commit
90f4cf28
authored
Jul 22, 2021
by
Adrien Simon
Browse files
Problème de personnes qui avaient quitté la conversation reglé
parent
0fdae6cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
stats.py
View file @
90f4cf28
...
...
@@ -23,7 +23,10 @@ def counttalk(data):
participants
[
participant
]
=
0
for
msg
in
messages
:
if
not
msg
[
"is_unsent"
]:
participants
[
decode
.
string_decode
(
msg
[
"sender_name"
])]
+=
1
try
:
participants
[
decode
.
string_decode
(
msg
[
"sender_name"
])]
+=
1
except
KeyError
:
participants
[
"Autres"
]
+=
1
for
nb_talk
in
participants
:
print
(
nb_talk
+
" : "
+
str
(
participants
[
nb_talk
]))
...
...
@@ -65,7 +68,10 @@ def countunset(data):
participants
[
participant
]
=
0
for
msg
in
messages
:
if
msg
[
"is_unsent"
]:
participants
[
decode
.
string_decode
(
msg
[
"sender_name"
])]
+=
1
try
:
participants
[
decode
.
string_decode
(
msg
[
"sender_name"
])]
+=
1
except
KeyError
:
participants
[
"Autres"
]
+=
1
for
nb_unsent
in
participants
:
print
(
nb_unsent
+
" : "
+
str
(
participants
[
nb_unsent
]))
...
...
users.py
View file @
90f4cf28
...
...
@@ -24,4 +24,5 @@ def userdico(data):
userdict
=
{}
for
participant
in
data
[
"participants"
]:
userdict
[
decode
.
string_decode
(
participant
[
"name"
])]
=
None
userdict
[
"Autres"
]
=
None
return
userdict
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment