import sys


def replace_in_file(filename, find_what, replace_with):
    f = open(filename, 'r')
    filedata = f.read()
    f.close()

    newdata = filedata.replace(find_what, replace_with)

    f = open(filename, 'w')
    f.write(newdata)
    f.close()

dark_theme_doxyfile = "../Doxygen/dark_theme/dark_theme_doxyfile"
light_theme_doxyfile = "../Doxygen/light_theme/light_theme_doxyfile"

replace_in_file(dark_theme_doxyfile, sys.argv[1], sys.argv[2])
replace_in_file(light_theme_doxyfile, sys.argv[1], sys.argv[2])
