import sys from pathlib import Path file = Path(sys.argv[1]) file.write_text( file.read_text()\ .replace('GitHub site', """ GitHub site, Deployed with stable-diffusion-webui-docker """, 1) )