aboutsummaryrefslogtreecommitdiff
path: root/scripts/.local/bin/personal/external/helpdesk
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/.local/bin/personal/external/helpdesk')
-rwxr-xr-xscripts/.local/bin/personal/external/helpdesk65
1 files changed, 65 insertions, 0 deletions
diff --git a/scripts/.local/bin/personal/external/helpdesk b/scripts/.local/bin/personal/external/helpdesk
new file mode 100755
index 0000000..8ab5aef
--- /dev/null
+++ b/scripts/.local/bin/personal/external/helpdesk
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+
+# Made for GNU/Linux
+# License: MIT
+
+import sys
+import signal
+import subprocess
+
+from datetime import datetime
+
+fps = 10
+res = "2880x1800"
+name = "Analysis 2 Helpdesk"
+date = datetime.today().strftime('%a_%d.%m._')
+link = "https://uni-luebeck.webex.com/meet/peter.haubold"
+file = f"{date}{name.replace(' ', '_')}.mkv"
+
+web_cmd = f"/usr/bin/brave --app='{link}'"
+rec_cmd = f"ffmpeg -y -video_size {res} -framerate {fps} -f x11grab -i :0.0 -f pulse -ac 2 -i default {file}"
+
+
+def log(str, lines=1):
+ for i in range(1, lines):
+ print("")
+ print(str)
+
+
+def end():
+ global rec, cisco
+
+ rec.send_signal(signal.SIGINT)
+ cisco.send_signal(signal.SIGTERM)
+ subprocess.call("killall CiscoCollabHost", shell=True)
+ subprocess.call("rm -rf /home/me/Downloads", shell=True)
+
+
+def handler(sig, frame):
+ log("> Interrupt signal recieved.", 2)
+ end()
+
+ sys.exit(0)
+
+
+def main():
+ global web, rec, cisco
+
+ log(f"> Joining: {name} @ {link} ...", 2)
+ log("> Session recording starting ...\n", 0)
+
+ cisco = subprocess.Popen("webex", shell=True)
+
+ web = subprocess.Popen(web_cmd, shell=True)
+ rec = subprocess.Popen(rec_cmd, shell=True)
+
+ signal.signal(signal.SIGINT, handler)
+ web.wait()
+ end()
+
+ log(f"> Finished recording session for '{file}'. Finalization may fart.", 3)
+
+
+if __name__ == "__main__":
+ main()
+