diff options
author | emkael <emkael@tlen.pl> | 2017-01-14 18:08:19 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-01-14 18:08:19 +0100 |
commit | 86334464fdc3eafd97e0550e324e4054879c0ada (patch) | |
tree | 7c1db0fcb958db6a7241234a25ccf68ec5ed4f68 | |
parent | 8002645f30a1191c7220e79d51fa58d3c3edbbf9 (diff) |
Script to generate resource data
-rw-r--r-- | generate_resources.py | 13 | ||||
-rw-r--r-- | res/edit.gif | bin | 0 -> 119 bytes | |||
-rw-r--r-- | res/minus.gif | bin | 0 -> 112 bytes | |||
-rw-r--r-- | res/next.gif | bin | 0 -> 74 bytes | |||
-rw-r--r-- | res/plus.gif | bin | 0 -> 111 bytes | |||
-rw-r--r-- | res/refresh.gif | bin | 0 -> 104 bytes | |||
-rw-r--r-- | res/restart.gif | bin | 0 -> 149 bytes | |||
-rw-r--r-- | res/sync.gif | bin | 0 -> 106 bytes |
8 files changed, 13 insertions, 0 deletions
diff --git a/generate_resources.py b/generate_resources.py new file mode 100644 index 0000000..4895f86 --- /dev/null +++ b/generate_resources.py @@ -0,0 +1,13 @@ +import base64, glob + +print 'import Tix as tk' +print + +for image in glob.glob('res/*.gif'): + print image.upper().replace('.', '_').replace('RES\\', '').replace('_GIF', '_ICON'), '= tk.PhotoImage(data=\'\'\'' + content = base64.b64encode(file(image, 'rb').read()) + while len(content) > 0: + chunk = content[0:80] + content = content[80:] + print chunk + print '\'\'\')' diff --git a/res/edit.gif b/res/edit.gif Binary files differnew file mode 100644 index 0000000..9dab19e --- /dev/null +++ b/res/edit.gif diff --git a/res/minus.gif b/res/minus.gif Binary files differnew file mode 100644 index 0000000..48760d1 --- /dev/null +++ b/res/minus.gif diff --git a/res/next.gif b/res/next.gif Binary files differnew file mode 100644 index 0000000..3cc8e8b --- /dev/null +++ b/res/next.gif diff --git a/res/plus.gif b/res/plus.gif Binary files differnew file mode 100644 index 0000000..d187118 --- /dev/null +++ b/res/plus.gif diff --git a/res/refresh.gif b/res/refresh.gif Binary files differnew file mode 100644 index 0000000..a5211df --- /dev/null +++ b/res/refresh.gif diff --git a/res/restart.gif b/res/restart.gif Binary files differnew file mode 100644 index 0000000..584e687 --- /dev/null +++ b/res/restart.gif diff --git a/res/sync.gif b/res/sync.gif Binary files differnew file mode 100644 index 0000000..ceace6f --- /dev/null +++ b/res/sync.gif |