you can use the following command to run the script:
python some2txt.py --dirs src tests --extensions .cpp .h .py .lua --output result.txt
The script has 3 arguments. --dirs is used to specify the folders where the files will be located, --extensions is needed to specify the extension of the files that will be compiled into txt, --output is the name of the output file.