Anki to generate a txt file saying wheter or not the reviews are done

(First of all: I’m a total beginner in addon development.)
I need Anki to generate a txt file saying something like “The reviews are done.” or “The reviews are not done.” so I can use this txt file with a simple Python script that blocks my internet connection to increase my productivity. Does anyone how can I achieve this? - Again, I’m talking about how to generate the file, I already know how to write the Script. Thanks in advance.

Edit 1: There is an addon called More Overvivew Stats with an IF statement checking wheter or not the deck is finished. Whoever, the script to write the txt file is not working. If anyone knows how to solve it, this is the code: test/ at main · Adriano-js/test · GitHub my script is in line 457. And yes, I have tried using the script in a separate file and it’s writing normally.