CLI tool to write Pomodoro timer to a log file for OBS integration (Text GDI+)
# more pomodoro.log
[16.09.2023 21:05] start 4 pomodoro rounds (20m 5m)
...
[16.09.2023 22:31] 4/4 action relax 08:53
[16.09.2023 22:31] 4/4 -> action <- relax 08:52
[16.09.2023 22:31] 4/4 action relax 08:51
[16.09.2023 22:31] 4/4 -> action <- relax 08:50
...
The Pomodoro log file can be used with OBS Studio (Open Broadcaster Software) as a Pomodoro timer.
The timer integrated into OBS and recorded with OBS can be seen at the top of this screenshot:
The text file "pomodoro.log" is generated by using the python logging mechanism.
Attention: The log file will grow (one entry per second) while the script is running.
a) download the Python script
b) run the python script:
# python pomodoro-logger.py
the script will automatically start to write the data of the timer, row by row,
to the file "pomodoro.log" file in the same directory as the script:
c) stop python script with "<ctrl> c"
You can use this log file for OBS, as a working time log or to evaluate your "action times".
You can change the number of rounds, the "action time" (minutes) and the "rest time" (minutes) by changing the following constants in the main() part of the Python script:
pomorounds = 4 # set number of pomodoro rounds ..
pomoactiontime = 30 # set minutes to focus
pomorelaxtime = 5 # set minutes for break time
Run the script for a few seconds to generate the log file for the first time.
Launch OBS and select your scene to add the Pomodoro counter.
a) add "Text(GDI+)" to a "OBS Szene"
b) activate "Aus Datei lesen" (read from file)
c) select the "pomodoro.log" file from your Python script location
Schriftart: "Courier New Standard" (Size 70)
Aus Datei lesen (aktiv)
Antialiasing aktivieren (aktiv)
Farbe: "#ffffff"
Deckkraft "90%"
Hintergrundfarbe "#000000"
Hintergrunddeckkraft "70%"
Ausrichtung "Zentriert"
Vertikale Ausrichtung "Zentriert"
Kontur (aktiv)
Konturgröße "2"
Konturfarbe "#a5a5a5"
Konturdeckkraft "100%"
Chatlogmodus (aktiv)
Chatlogzeilenlimit "1"
Benutzerdefinierten Textbereich benutzen (aktiv)
Breite "3000"
Höhe "90"
Zeilenumbruch (DEAKTIV)