Skip to content

Instantly share code, notes, and snippets.

@AndroiableDroid
Last active July 28, 2020 19:50
Show Gist options
  • Save AndroiableDroid/9e760abb88ca3b52ecba128c1310bf1e to your computer and use it in GitHub Desktop.
Save AndroiableDroid/9e760abb88ca3b52ecba128c1310bf1e to your computer and use it in GitHub Desktop.
replace.py
import re
file = open('.circleci/config.yml', "r", encoding="utf-8")
content = file.read()
file.close()
p = re.compile(r"CHANGELOG: \"[^:\"]+\"")
new_content = p.sub('CHANGELOG: " - Bump to Version 3.0 \n - Flashlight toggled by Vol up(+) on hold \n - New Android like Power Menu (Activated via power key hold) - Fully Redesigned UI"', content)
file = open('.circleci/config.yml', "w", encoding="utf-8")
file.write(new_content)
file.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment