Add project

This commit is contained in:
Richard Kubíček
2025-03-18 13:00:26 +01:00
parent 77b5594a29
commit f3e394ab87
10 changed files with 333 additions and 0 deletions

24
svg-color-replacer.py Normal file
View File

@@ -0,0 +1,24 @@
import os
import glob
OLD_COLORS = ["black", "#000000"]
NEW_COLOR = "#141B5D"
FOLDER_PATH = "img"
def main():
for file_path in glob.glob(os.path.join(FOLDER_PATH, "*.svg")):
with open(file_path, "r", encoding="utf-8") as file:
content = file.read()
for old_color in OLD_COLORS:
content = content.replace(old_color, NEW_COLOR)
with open(file_path, "w", encoding="utf-8") as file:
file.write(content)
if __name__ == "__main__":
main()