branding: change app name

This commit is contained in:
ave 2019-01-25 15:48:05 +03:00
parent 0bc36a0738
commit eb1f1ff8ac
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B
4 changed files with 46 additions and 2 deletions

View file

@ -0,0 +1,27 @@
#!/bin/env python3
import sys
import time
fname = sys.argv[1]
# Read in the file
with open(fname, 'r') as file:
filedata = file.read()
timestamp = str(time.time()).split(".")[0]
name = "CutTheCord"
branch = "base"
if "customtheme" in sys.argv:
branch = "themed"
name += " Themed"
# Replace the target string
filedata = filedata.replace("CTCBRANCH", branch)\
.replace("CTCTIMESTAMP", timestamp)\
.replace("CTCNAME", name)
# Write the file out again
with open(fname.replace(".patch", "-custom.patch"), 'w') as file:
file.write(filedata)