From d78926afa4cf413fde55605d19b8abea70cfdf7b Mon Sep 17 00:00:00 2001
From: Guilhem Saurel <guilhem.saurel@laas.fr>
Date: Thu, 2 May 2019 14:51:56 +0200
Subject: [PATCH] check-matrix

---
 newcomers/check_matrix.py | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100755 newcomers/check_matrix.py

diff --git a/newcomers/check_matrix.py b/newcomers/check_matrix.py
new file mode 100755
index 0000000..b75a10e
--- /dev/null
+++ b/newcomers/check_matrix.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+
+import getpass
+
+from matrix_client.client import MatrixClient
+
+from greet_newcomers import get_gepetto
+
+HOME = 'https://matrix.laas.fr'
+ROOM = '#gepetto:laas.fr'
+
+if __name__ == '__main__':
+    client = MatrixClient(HOME)
+    client.login(username=getpass.getuser(), password=getpass.getpass())
+
+    room = client.rooms[client.api.get_room_id(ROOM)]
+    members = [m.user_id.split(':')[0][1:] for m in room.get_joined_members() if m.user_id.endswith(':laas.fr')]
+
+    for member in get_gepetto():
+        print('v' if member in members else 'x', member)
-- 
GitLab