You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import os
import fileinput
textToSearch="template"
textToReplace="my-product"
'''Fix the features'''
for root, dirs, files in os.walk("features"):
for file in files:
if file.endswith(".xml"):
print(os.path.join(root, file))
with fileinput.FileInput(fileToSearch, inplace=True) as file:
for line in file:
print(line.replace(textToSearch, textToReplace))
'''Fix the features'''
for root, dirs, files in os.walk("repository"):
for file in files:
if file.endswith(".xml") and "target" not in root:
print(os.path.join(root, file))
with fileinput.FileInput(fileToSearch, inplace=True) as file:
for line in file:
print(line.replace(textToSearch, textToReplace))
This script does not handle renaming the necessary files
it might be nice to have a simple script that quickly replaces all template references with the name of the product
The text was updated successfully, but these errors were encountered: