Files
Marble-shell-theme/scripts/utils/remove_properties.py
Vladyslav Hroshev 8cce85a437 GNOME dependable installation, structure and style improvements
Split utils in utils.py to a directory
Moved ./gnome-shell_css/ to ./gnome-shell/.css/
2024-09-30 00:14:09 +03:00

20 lines
534 B
Python

def remove_properties(file, *args):
"""
Remove properties from a file
:param file: file name
:param args: properties to remove
"""
new_content = ""
with open(file, "r") as read_file:
content = read_file.read()
for line in content.splitlines():
if not any(prop in line for prop in args):
new_content += line + "\n"
elif "}" in line:
new_content += "}\n"
with open(file, "w") as write_file:
write_file.write(new_content)