-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelogoer.py
46 lines (37 loc) · 1.15 KB
/
relogoer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python3.9
"""
Copyright (c) 2021 JMcB
Not for use with any cryptocurrency or blockchain that is any of the following:
legitimate, commercial, high proof-of-work
"""
import os
import shutil
from pathlib import Path
import renamer
COLOUR_REPLACES = {
# Wbubbler light blue
'#F9AA4B': '#8ECEEA',
# Wbubbler dark blue
'#F7931A': '#69BDDE',
}
COLOUR_REPLACES_TESTNET = {
# Wbubbler medium red
'#F9AA4B': '#AB3342',
# Wbubbler dark red
'#F7931A': '#802A3A',
}
SVG_PATH = Path('src/qt/res/src/bubcoin.svg')
SVG_PATH_TESTNET = SVG_PATH.with_name('bubcoin_testnet.svg')
def main():
print('Copying svg for testnet icon.')
shutil.copy(SVG_PATH, SVG_PATH_TESTNET)
print("Replacing colours in svg's.")
renamer.filereplace(SVG_PATH, ignore_content={}, mapping=COLOUR_REPLACES)
renamer.filereplace(SVG_PATH_TESTNET, ignore_content={}, mapping=COLOUR_REPLACES_TESTNET)
print('Requires: inkscape, ImageMagick (convert).')
print('icns sucks, do it yourself.')
command = './relogoer.sh'
print(command)
os.system(command)
if __name__ == '__main__':
main()