2021-05-28 13:51:56 -04:00
|
|
|
#!/usr/bin/env python3
|
2020-04-08 17:23:04 +02:00
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
execpath, inpath, outpath, *dict_list = sys.argv
|
|
|
|
|
|
2024-05-03 14:13:25 +02:00
|
|
|
dictionary = {}
|
2020-04-08 17:23:04 +02:00
|
|
|
while dict_list:
|
|
|
|
|
key, value, *rest = dict_list
|
2024-05-03 14:13:25 +02:00
|
|
|
dictionary[key] = value
|
2020-04-08 17:23:04 +02:00
|
|
|
dict_list = rest
|
|
|
|
|
|
|
|
|
|
infile = open(inpath, 'r')
|
|
|
|
|
outfile = open(outpath, 'w')
|
|
|
|
|
|
|
|
|
|
buf = infile.read()
|
|
|
|
|
infile.close()
|
|
|
|
|
|
2024-05-03 14:13:25 +02:00
|
|
|
for key, value in dictionary.items():
|
2020-04-08 17:23:04 +02:00
|
|
|
buf = buf.replace('@{}@'.format(key), value)
|
|
|
|
|
|
|
|
|
|
outfile.write(buf)
|
|
|
|
|
outfile.close()
|