cryptopunks-gui 0.0.6 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +115 -8
- data/VERSION +1 -1
- data/app/cryptopunks_gui.rb +97 -22
- data/bin/cryptopunks-mac-gui +8 -0
- data/bin/cryptopunks-mac-gui.rb +8 -0
- data/bin/package-mac +8 -0
- data/bin/package-mac-app +5 -0
- data/bin/package-mac-dmg +6 -0
- data/cryptopunks-gui.gemspec +11 -5
- data/icons/cryptopunks-gui.icns +0 -0
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 500d88447b105a1383d4de25cecaf39b5d805420edab28638b157a11e243422a
|
4
|
+
data.tar.gz: 4af0fa654391c4208f330d221b39d7b5b8741d42464c1a57db0d4246a04c640e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f14974ea5229ad9bafea8dbbb15f9e874ccddd4107ba600ca5731fa2eb34b4a06742a7a3d5b25fc42cc1d1d9dcde264d1f592a2cbf150d88dfaae1d22bf74e9
|
7
|
+
data.tar.gz: 8386c9af297624919012fc389925b968cb0d76c501b55407dc8be9c9c79cf6f11274b9792ffc8b965cd1ee205ef05fcb8a0a7160a9ecf0ef8a03bf13aa470fad
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.0.10
|
4
|
+
|
5
|
+
- Fix issue with cryptopunks GUI erroring when cancelling selection of a new output location (or getting blocked by OS for security reasons)
|
6
|
+
|
7
|
+
## 0.0.9
|
8
|
+
|
9
|
+
- Added Halloween special collections: Scream, Jack 'O' Lantern, Joker, and Frankenstein
|
10
|
+
|
11
|
+
## 0.0.8
|
12
|
+
|
13
|
+
- Added missing Bored Apes (vanilla) collection
|
14
|
+
- Fixed Bored Apes collection image dimensions (28x28 instead of default 24x24)
|
15
|
+
|
16
|
+
## 0.0.7
|
17
|
+
|
18
|
+
- Multiple Punk Collections (https://github.com/cryptopunksnotdead/awesome-24px)
|
19
|
+
|
3
20
|
## 0.0.6
|
4
21
|
|
5
22
|
- Provide option to change output location
|
data/README.md
CHANGED
@@ -1,20 +1,24 @@
|
|
1
|
-
# <img src="https://raw.githubusercontent.com/AndyObtiva/cryptopunks-gui/master/icons/cryptopunks-gui.png" height=85 /> CryptoPunks GUI 0.0.
|
1
|
+
# <img src="https://raw.githubusercontent.com/AndyObtiva/cryptopunks-gui/master/icons/cryptopunks-gui.png" height=85 /> CryptoPunks GUI 0.0.10
|
2
2
|
## Simplified Minting
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/cryptopunks-gui.svg)](http://badge.fury.io/rb/cryptopunks-gui)
|
4
4
|
|
5
5
|
This is a Graphical User Interface for the famous [cryptopunks Ruby gem](https://github.com/cryptopunksnotdead/cryptopunks/tree/master/cryptopunks).
|
6
6
|
|
7
|
-
It automatically downloads `punks.png` from https://github.com/larvalabs/cryptopunks
|
7
|
+
It automatically downloads image collection sprites on first use (e.g. `punks.png` from https://github.com/larvalabs/cryptopunks).
|
8
8
|
|
9
|
-
Minted cryptopunks are stored at
|
9
|
+
Minted cryptopunks are stored at `~/cryptopunks/` by default ([output location can be changed](#output-location)).
|
10
10
|
|
11
11
|
![Screenshot](/screenshots/cryptopunks-gui-screenshot.png)
|
12
12
|
|
13
|
+
[<img src="https://raw.githubusercontent.com/AndyObtiva/cryptopunks-gui/master/icons/cryptopunks-gui.png" height=40 /> Download DMG installer for Mac (Catalina x64 and older)](https://www.dropbox.com/s/gfh7e9osw30sjiq/CryptoPunks%20GUI.dmg?dl=1)
|
14
|
+
|
15
|
+
If your machine is incompatible with the downloadable DMG package, you may follow [Packaging](#packaging) instructions to produce your own machine compatible installer.
|
16
|
+
|
13
17
|
## Prerequities
|
14
18
|
|
15
19
|
- [Tcl/Tk (ActiveTcl)](https://tkdocs.com/tutorial/install.html)
|
16
20
|
- [RVM](https://rvm.io/) (unless you are on Windows)
|
17
|
-
- [Ruby 3.0.2 compiled with RVM for Tk](https://rvm.io/integration/tk#tk) (unless you are on Windows for which Tcl/Tk instructions include installation of Ruby)
|
21
|
+
- [Ruby 3.0.2 compiled with RVM for Tk](https://rvm.io/integration/tk#tk) (unless you are on Windows for which Tcl/Tk instructions include installation of Ruby [get v3.0.2])
|
18
22
|
|
19
23
|
## Setup
|
20
24
|
|
@@ -25,7 +29,7 @@ You can use CryptoPunks GUI via gem or via cloning repository.
|
|
25
29
|
Run:
|
26
30
|
|
27
31
|
```
|
28
|
-
gem install cryptopunks-gui -v0.0.
|
32
|
+
gem install cryptopunks-gui -v0.0.10
|
29
33
|
```
|
30
34
|
|
31
35
|
Afterwards, run app via:
|
@@ -69,9 +73,73 @@ ruby app/cryptopunks_gui.rb
|
|
69
73
|
|
70
74
|
## Instructions
|
71
75
|
|
72
|
-
###
|
73
|
-
|
74
|
-
Change
|
76
|
+
### Collection
|
77
|
+
|
78
|
+
Change collection to pick a different collection of images.
|
79
|
+
|
80
|
+
There are currently 38 available collections (from https://github.com/cryptopunksnotdead/awesome-24px):
|
81
|
+
- [Punks](https://raw.githubusercontent.com/larvalabs/cryptopunks/master/punks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/punks-strip.png)
|
82
|
+
- [Mohawks](https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/mohawks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/mohawks-strip.png)
|
83
|
+
- [Blondies](https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/blondies.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/blondies-strip.png)
|
84
|
+
- [Zombies](https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/zombies.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/zombies-strip.png)
|
85
|
+
- [Apes](https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/apes.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/apes-strip.png)
|
86
|
+
- [Aliens](https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/aliens.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/aliens-strip.png)
|
87
|
+
- [Golden Punks](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/goldenpunks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/goldenpunks-strip.png)
|
88
|
+
- [Halloween Punks](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/halloweenpunks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/halloweenpunks-strip.png)
|
89
|
+
- [Scream Punks](https://raw.githubusercontent.com/cryptopunksnotdead/cryptopunks/master/halloween/i/screampunks%402x.png)
|
90
|
+
- [Jack 'O' Lantern Punks](https://raw.githubusercontent.com/cryptopunksnotdead/cryptopunks/master/halloween/i/jackpunks%402x.png)
|
91
|
+
- [Joker Punks](https://raw.githubusercontent.com/cryptopunksnotdead/cryptopunks/master/halloween/i/jokerpunks%402x.png)
|
92
|
+
- [Frankenstein Punks](https://raw.githubusercontent.com/cryptopunksnotdead/cryptopunks/master/halloween/i/frankensteinpunks%402x.png)
|
93
|
+
- [Front Punks](https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/frontpunks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/frontpunks-strip.png)
|
94
|
+
- [More Punks](https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/morepunks.png') ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/morepunks-strip.png)
|
95
|
+
- [Expansion Punks](https://expansionpunks.com/provenance/expansionpunks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/expansionpunks-strip.png)
|
96
|
+
- [Avalanche Punks](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/avalanchepunks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/avalanchepunks-strip.png)
|
97
|
+
- [International Punks](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/intlpunks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/intlpunks-strip.png)
|
98
|
+
- [Ape Punks](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/apepunks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/apepunks-strip.png)
|
99
|
+
- [Alien Clan](https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/alienclan.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/alienclan-strip.png)
|
100
|
+
- [Bored Apes](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/boredapes-strip.png)
|
101
|
+
- [Bored Apes Blue](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_blue.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/boredapes_blue-strip.png)
|
102
|
+
- [Bored Apes Red](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_red.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/boredapes_red-strip.png)
|
103
|
+
- [Bored Apes Neon Glow](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_neon_glow.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/boredapes_neon_glow-strip.png)
|
104
|
+
- [Bored Apes Stars and Stripes](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_stars_and_stripes.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/boredapes_stars_and_stripes-strip.png)
|
105
|
+
- [Bored Apes Acid](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_acid.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/boredapes_acid-strip.png)
|
106
|
+
- [Cool Cats](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/coolcats-strip.png)
|
107
|
+
- [Cool Cats Mohawks](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_mohawks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/coolcats_mohawks-strip.png)
|
108
|
+
- [Cool Cats Ninjas](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_ninjas.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/coolcats_ninjas-strip.png)
|
109
|
+
- [Cool Cats TV Heads](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_tvheads.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/coolcats_tvheads-strip.png)
|
110
|
+
- [Cool Cats Pirates](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_pirates.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/coolcats_pirates-strip.png)
|
111
|
+
- [Cool Cats Unicorns](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_unicorns.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/coolcats_unicorns-strip.png)
|
112
|
+
- [Cool Cats Dragons](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_dragons.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/coolcats_dragons-strip.png)
|
113
|
+
- [Cool Cats Frogs](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_frogs.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/blob/master/i/coolcats_frogs-strip.png)
|
114
|
+
- [Pudgy Penguins](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/pudgypenguins.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/pudgypenguins-strip.png)
|
115
|
+
- [Dodge](https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/dodge.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/dodge-strip.png)
|
116
|
+
- [Rocks](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/rocks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/rocks-strip.png)
|
117
|
+
- [Punk Rocks](https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/punkrocks.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/punkrocks-strip.png)
|
118
|
+
- [Tulips](https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/tulips.png) ![image examples](https://github.com/cryptopunksnotdead/awesome-24px/raw/master/i/tulips-strip.png)
|
119
|
+
|
120
|
+
![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-zombies.png)
|
121
|
+
|
122
|
+
![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-apes.png)
|
123
|
+
|
124
|
+
![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-scream-punks.png)
|
125
|
+
|
126
|
+
![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-jack-o-lantern-punks.png)
|
127
|
+
|
128
|
+
![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-joker-punks.png)
|
129
|
+
|
130
|
+
![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-frankenstein-punks.png)
|
131
|
+
|
132
|
+
![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-alien-clan.png)
|
133
|
+
|
134
|
+
![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-bored-apes-stars-and-stripes.png)
|
135
|
+
|
136
|
+
![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-cool-cats-ninjas.png)
|
137
|
+
|
138
|
+
![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-dodge.png)
|
139
|
+
|
140
|
+
### Image Index
|
141
|
+
|
142
|
+
Change image index to pick a different image.
|
75
143
|
|
76
144
|
![Screenshot](/screenshots/cryptopunks-gui-screenshot-different-punk-index.png)
|
77
145
|
|
@@ -143,6 +211,45 @@ You may select a new output location by clicking on the `...` button.
|
|
143
211
|
|
144
212
|
![Screenshot](/screenshots/cryptopunks-gui-screenshot-output-location.png)
|
145
213
|
|
214
|
+
## Packaging
|
215
|
+
|
216
|
+
Assuming you have setup all prerequisites and cloned the project locally, you can package the project files, Ruby, gem dependencies, and ActiveTcl (Tcl/Tk) into fully self-contained native executable bundles for the Mac.
|
217
|
+
|
218
|
+
### Packaging Prerequisites
|
219
|
+
|
220
|
+
Packaging is currently supported on Mac only.
|
221
|
+
|
222
|
+
- [Platypus](https://github.com/sveinbjornt/Platypus): Install Platypus 5.3
|
223
|
+
- [Platypus Command Line Tool](https://github.com/sveinbjornt/Platypus/blob/master/Documentation/Documentation.md#show-shell-command): Run Platypus GUI -> Go to Preferences -> Install Command Line Tool.
|
224
|
+
|
225
|
+
Finally, ensure the `platypus` command is available in the terminal by simply running:
|
226
|
+
|
227
|
+
```
|
228
|
+
platypus --version
|
229
|
+
```
|
230
|
+
|
231
|
+
Output:
|
232
|
+
|
233
|
+
```
|
234
|
+
platypus version 5.3
|
235
|
+
```
|
236
|
+
|
237
|
+
### Packaging Commands
|
238
|
+
|
239
|
+
To package this app as both a Mac native executable (APP file) and a Mac native installer (DMG file), run this command (produces packages under `~/Applications`):
|
240
|
+
|
241
|
+
```
|
242
|
+
bin/package-mac
|
243
|
+
```
|
244
|
+
|
245
|
+
To package a Mac native executable only (quicker for local APP use without distribution), run:
|
246
|
+
|
247
|
+
```
|
248
|
+
bin/package-mac-app
|
249
|
+
```
|
250
|
+
|
251
|
+
![Screenshot](/screenshots/cryptopunks-gui-package-screenshot-mac-dmg.png)
|
252
|
+
|
146
253
|
## TODO
|
147
254
|
|
148
255
|
[TODO.md](TODO.md)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
data/app/cryptopunks_gui.rb
CHANGED
@@ -13,19 +13,64 @@ class CryptopunksGui
|
|
13
13
|
|
14
14
|
PALETTES = ['Standard'] + (Palette8bit.constants).map(&:name).map {|palette| palette.split('_').map(&:capitalize).join(' ')}.reject { |palette| palette.include?(' ') }.sort
|
15
15
|
STYLES = ['Normal', 'Led', 'Sketch']
|
16
|
+
COLLECTION_URL_MAP = {
|
17
|
+
'Punks' => {url: 'https://raw.githubusercontent.com/larvalabs/cryptopunks/master/punks.png', width: 24, height: 24, default_zoom: 12},
|
18
|
+
'Mohawks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/mohawks.png', width: 24, height: 24, default_zoom: 12},
|
19
|
+
'Blondies' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/blondies.png', width: 24, height: 24, default_zoom: 12},
|
20
|
+
'Zombies' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/zombies.png', width: 24, height: 24, default_zoom: 12},
|
21
|
+
'Apes' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/apes.png', width: 24, height: 24, default_zoom: 12},
|
22
|
+
'Aliens' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/aliens.png', width: 24, height: 24, default_zoom: 12},
|
23
|
+
'Golden Punks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/goldenpunks.png', width: 24, height: 24, default_zoom: 12},
|
24
|
+
'Halloween Punks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/halloweenpunks.png', width: 24, height: 24, default_zoom: 12},
|
25
|
+
'Scream Punks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/cryptopunks/master/halloween/i/screampunks%402x.png', width: 48, height: 48, default_zoom: 6},
|
26
|
+
"Jack 'O' Lantern Punks" => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/cryptopunks/master/halloween/i/jackpunks%402x.png', width: 48, height: 48, default_zoom: 6},
|
27
|
+
'Joker Punks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/cryptopunks/master/halloween/i/jokerpunks%402x.png', width: 48, height: 48, default_zoom: 6},
|
28
|
+
'Frankenstein Punks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/cryptopunks/master/halloween/i/frankensteinpunks%402x.png', width: 48, height: 48, default_zoom: 6},
|
29
|
+
'Front Punks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/frontpunks.png', width: 24, height: 24, default_zoom: 12},
|
30
|
+
'More Punks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/morepunks.png', width: 24, height: 24, default_zoom: 12},
|
31
|
+
'Expansion Punks' => {url: 'https://expansionpunks.com/provenance/expansionpunks.png', width: 24, height: 24, default_zoom: 12},
|
32
|
+
'Avalanche Punks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/avalanchepunks.png', width: 24, height: 24, default_zoom: 12},
|
33
|
+
'International Punks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/intlpunks.png', width: 24, height: 24, default_zoom: 12},
|
34
|
+
'Ape Punks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/apepunks.png', width: 24, height: 24, default_zoom: 12},
|
35
|
+
'Alien Clan' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/alienclan.png', width: 24, height: 24, default_zoom: 12},
|
36
|
+
'Bored Apes' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes.png', width: 28, height: 28, default_zoom: 10},
|
37
|
+
'Bored Apes Blue' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_blue.png', width: 28, height: 28, default_zoom: 10},
|
38
|
+
'Bored Apes Red' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_red.png', width: 28, height: 28, default_zoom: 10},
|
39
|
+
'Bored Apes Neon Glow' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_neon_glow.png', width: 28, height: 28, default_zoom: 10},
|
40
|
+
'Bored Apes Stars and Stripes' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_stars_and_stripes.png', width: 28, height: 28, default_zoom: 10},
|
41
|
+
'Bored Apes Acid' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_acid.png', width: 28, height: 28, default_zoom: 10},
|
42
|
+
'Cool Cats' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats.png', width: 24, height: 24, default_zoom: 12},
|
43
|
+
'Cool Cats Mohawks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_mohawks.png', width: 24, height: 24, default_zoom: 12},
|
44
|
+
'Cool Cats Ninjas' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_ninjas.png', width: 24, height: 24, default_zoom: 12},
|
45
|
+
'Cool Cats TV Heads' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_tvheads.png', width: 24, height: 24, default_zoom: 12},
|
46
|
+
'Cool Cats Pirates' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_pirates.png', width: 24, height: 24, default_zoom: 12},
|
47
|
+
'Cool Cats Unicorns' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_unicorns.png', width: 24, height: 24, default_zoom: 12},
|
48
|
+
'Cool Cats Dragons' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_dragons.png', width: 24, height: 24, default_zoom: 12},
|
49
|
+
'Cool Cats Frogs' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_frogs.png', width: 24, height: 24, default_zoom: 12},
|
50
|
+
'Pudgy Penguins' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/pudgypenguins.png', width: 24, height: 24, default_zoom: 12},
|
51
|
+
'Dodge' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/dodge.png', width: 24, height: 24, default_zoom: 12},
|
52
|
+
'Rocks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/rocks.png', width: 24, height: 24, default_zoom: 12},
|
53
|
+
'Punk Rocks' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/punkrocks.png', width: 24, height: 24, default_zoom: 12},
|
54
|
+
'Tulips' => {url: 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/tulips.png', width: 24, height: 24, default_zoom: 12},
|
55
|
+
}
|
16
56
|
|
17
|
-
attr_accessor :
|
57
|
+
attr_accessor :collection, :image_index, :zoom, :palette, :style, :led_spacing, :led_round_corner, :sketch_line, :flip, :mirror
|
18
58
|
|
19
59
|
def initialize
|
20
|
-
|
60
|
+
initialize_punk_directory
|
61
|
+
initialize_collection
|
21
62
|
load_config
|
22
63
|
initialize_defaults
|
23
64
|
observe_image_attribute_changes
|
24
65
|
create_gui
|
25
|
-
self.
|
66
|
+
self.image_index = 0
|
26
67
|
@root.open
|
27
68
|
end
|
28
69
|
|
70
|
+
def collection_options
|
71
|
+
COLLECTION_URL_MAP.keys
|
72
|
+
end
|
73
|
+
|
29
74
|
def palette_options
|
30
75
|
PALETTES
|
31
76
|
end
|
@@ -34,16 +79,28 @@ class CryptopunksGui
|
|
34
79
|
STYLES
|
35
80
|
end
|
36
81
|
|
37
|
-
def
|
38
|
-
@punk_directory = File.join(Dir.home, 'cryptopunks')
|
82
|
+
def initialize_punk_directory
|
83
|
+
@punk_directory = @punk_config_directory = File.join(Dir.home, 'cryptopunks')
|
39
84
|
FileUtils.mkdir_p(@punk_directory)
|
40
|
-
|
41
|
-
|
42
|
-
|
85
|
+
end
|
86
|
+
|
87
|
+
def initialize_collection
|
88
|
+
return if @collection && @collection == @last_collection
|
89
|
+
@collection ||= COLLECTION_URL_MAP.keys.first
|
90
|
+
url = COLLECTION_URL_MAP[@collection][:url]
|
91
|
+
width = COLLECTION_URL_MAP[@collection][:width]
|
92
|
+
height = COLLECTION_URL_MAP[@collection][:height]
|
93
|
+
@punk_file = File.join(@punk_config_directory, File.basename(url, '.png'))
|
94
|
+
File.write(@punk_file, Net::HTTP.get(URI(url))) unless File.exist?(@punk_file)
|
95
|
+
@images ||= {}
|
96
|
+
@images[@collection] ||= Punks::Image::Composite.read(@punk_file, width: width, height: height)
|
97
|
+
@last_collection = @collection
|
98
|
+
self.image_index = 0
|
99
|
+
@image_index_spinbox.to = @images[@collection].size - 1 if @image_index_spinbox
|
43
100
|
end
|
44
101
|
|
45
102
|
def load_config
|
46
|
-
@punk_config_file = File.join(@
|
103
|
+
@punk_config_file = File.join(@punk_config_directory, 'cryptopunks.yml')
|
47
104
|
FileUtils.touch(@punk_config_file)
|
48
105
|
@punk_config = YAML.load(File.read(@punk_config_file)) || {punk_directory: @punk_directory}
|
49
106
|
@punk_directory = @punk_config[:punk_directory]
|
@@ -54,6 +111,7 @@ class CryptopunksGui
|
|
54
111
|
end
|
55
112
|
|
56
113
|
def initialize_defaults
|
114
|
+
@collection = COLLECTION_URL_MAP.keys.first
|
57
115
|
@zoom = 12
|
58
116
|
@palette = PALETTES.first
|
59
117
|
@style = STYLES.first
|
@@ -66,7 +124,8 @@ class CryptopunksGui
|
|
66
124
|
|
67
125
|
def observe_image_attribute_changes
|
68
126
|
observer = Glimmer::DataBinding::Observer.proc { generate_image }
|
69
|
-
observer.observe(self, :
|
127
|
+
observer.observe(self, :collection)
|
128
|
+
observer.observe(self, :image_index)
|
70
129
|
observer.observe(self, :zoom)
|
71
130
|
observer.observe(self, :palette)
|
72
131
|
observer.observe(self, :style)
|
@@ -78,12 +137,16 @@ class CryptopunksGui
|
|
78
137
|
end
|
79
138
|
|
80
139
|
def generate_image
|
81
|
-
|
82
|
-
|
140
|
+
initialize_collection
|
141
|
+
return if @image_index.to_i > @images[@collection].size
|
142
|
+
image_location = File.join(@punk_directory, "#{@collection.gsub(' ', '').downcase}-#{@image_index}#{"x#{@zoom}" if @zoom.to_i > 1}#{"-#{@palette.underscore}" if @palette != PALETTES.first}#{"-#{@style.underscore}" if @style != STYLES.first}.png")
|
83
143
|
puts "Writing punk image to #{image_location}"
|
84
|
-
selected_punk = @
|
144
|
+
selected_punk = @images[@collection][@image_index.to_i]
|
85
145
|
selected_punk = selected_punk.change_palette8bit(Palette8bit.const_get(@palette.gsub(' ', '_').upcase.to_sym)) if @palette != PALETTES.first
|
86
146
|
@original_zoom = @zoom
|
147
|
+
if @previous_collection && @collection != @previous_collection && COLLECTION_URL_MAP[@collection][:width] != COLLECTION_URL_MAP[@previous_collection][:width]
|
148
|
+
@zoom = COLLECTION_URL_MAP[@collection][:default_zoom]
|
149
|
+
end
|
87
150
|
if @style != STYLES.first
|
88
151
|
style_options = {}
|
89
152
|
if @style == 'Led'
|
@@ -102,6 +165,7 @@ class CryptopunksGui
|
|
102
165
|
@image_label.image = image_location
|
103
166
|
@output_location_entry.text = image_location
|
104
167
|
@previous_style = @style
|
168
|
+
@previous_collection = @collection
|
105
169
|
notify_observers(:zoom) if @zoom != @original_zoom
|
106
170
|
end
|
107
171
|
|
@@ -112,12 +176,20 @@ class CryptopunksGui
|
|
112
176
|
|
113
177
|
frame {
|
114
178
|
label {
|
115
|
-
text '
|
179
|
+
text 'Collection:'
|
116
180
|
}
|
117
|
-
|
181
|
+
combobox {
|
182
|
+
readonly true
|
183
|
+
text <=> [self, :collection]
|
184
|
+
}
|
185
|
+
|
186
|
+
label {
|
187
|
+
text 'Image Index:'
|
188
|
+
}
|
189
|
+
@image_index_spinbox = spinbox {
|
118
190
|
from 0
|
119
|
-
to @
|
120
|
-
text <=> [self, :
|
191
|
+
to @images[@collection].size - 1
|
192
|
+
text <=> [self, :image_index]
|
121
193
|
}
|
122
194
|
|
123
195
|
label {
|
@@ -188,7 +260,7 @@ class CryptopunksGui
|
|
188
260
|
@output_location_entry = entry {
|
189
261
|
grid row: 0, column: 0
|
190
262
|
readonly true
|
191
|
-
width
|
263
|
+
width 47
|
192
264
|
}
|
193
265
|
button {
|
194
266
|
grid row: 0, column: 1
|
@@ -196,10 +268,13 @@ class CryptopunksGui
|
|
196
268
|
width 1.1
|
197
269
|
|
198
270
|
on('command') do
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
271
|
+
new_punk_directory = choose_directory(parent: @root)
|
272
|
+
unless new_punk_directory.to_s.empty?
|
273
|
+
@punk_directory = new_punk_directory
|
274
|
+
@punk_config[:punk_directory] = @punk_directory
|
275
|
+
save_config
|
276
|
+
generate_image
|
277
|
+
end
|
203
278
|
end
|
204
279
|
}
|
205
280
|
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
mkdir -p ~/Library/Frameworks
|
4
|
+
[ ! -d ~/Library/Tcl ] && cp -r Tcl ~/Library/Tcl
|
5
|
+
[ ! -d ~/Library/Frameworks/Tcl.framework ] && cp -r Tcl.framework ~/Library/Frameworks/Tcl.framework
|
6
|
+
[ ! -d ~/Library/Frameworks/Tk.framework ] && cp -r Tk.framework ~/Library/Frameworks/Tk.framework
|
7
|
+
|
8
|
+
ruby-3.0.2/bin/ruby cryptopunks-gui/bin/cryptopunks-mac-gui.rb
|
@@ -0,0 +1,8 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
Gem.paths = {
|
4
|
+
'GEM_HOME' => File.expand_path('../../ruby-3.0.2@cryptopunks-gui', __dir__),
|
5
|
+
'GEM_PATH' => Gem.paths.path + [File.expand_path('../../ruby-3.0.2@cryptopunks-gui', __dir__)],
|
6
|
+
'GEM_SPEC_CACHE' => Gem.paths.spec_cache_dir
|
7
|
+
}
|
8
|
+
require_relative '../app/cryptopunks_gui.rb'
|
data/bin/package-mac
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
source "$(dirname "$BASH_SOURCE")/package-mac-dmg"
|
4
|
+
echo "Moving .app file to ~/Applications/ to make ready for use..."
|
5
|
+
rm -rf ~/Applications/CryptoPunks\ GUI.app
|
6
|
+
mv ~/Applications/CryptoPunks\ GUI/CryptoPunks\ GUI.app ~/Applications/CryptoPunks\ GUI.app
|
7
|
+
rm -rf ~/Applications/CryptoPunks\ GUI
|
8
|
+
echo "Done packaging."
|
data/bin/package-mac-app
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
echo "Packaging .app file..."
|
4
|
+
mkdir -p ~/Applications/CryptoPunks\ GUI
|
5
|
+
platypus --quit-after-execution --interface-type "None" --name "CryptoPunks GUI" --app-icon "icons/cryptopunks-gui.icns" --author "Andy Maleh" --app-version "1.0.0" --bundle-identifier "org.andymaleh.CryptoPunksGUI" --bundled-file "$(pwd)|$(dirname $(dirname $(which ruby)))|$(dirname $(dirname $(dirname $(dirname $(gem which glimmer)))))|/Library/Frameworks/Tcl.framework|/Library/Frameworks/Tk.framework|/Library/Tcl" "bin/cryptopunks-mac-gui" --overwrite "~/Applications/CryptoPunks GUI/CryptoPunks GUI.app"
|
data/bin/package-mac-dmg
ADDED
data/cryptopunks-gui.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: cryptopunks-gui 0.0.
|
5
|
+
# stub: cryptopunks-gui 0.0.10 ruby app
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "cryptopunks-gui".freeze
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.10"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["app".freeze]
|
13
13
|
s.authors = ["Andy Maleh".freeze]
|
14
|
-
s.date = "2021-
|
14
|
+
s.date = "2021-11-02"
|
15
15
|
s.description = "CryptoPunks GUI for Simplified Minting - Built with Glimmer DSL for Tk (requires ActiveTcl to run cryptopunks-gui command)".freeze
|
16
16
|
s.email = "andy.am@gmail.com".freeze
|
17
17
|
s.executables = ["cryptopunks-gui".freeze]
|
@@ -27,7 +27,13 @@ Gem::Specification.new do |s|
|
|
27
27
|
"VERSION",
|
28
28
|
"app/cryptopunks_gui.rb",
|
29
29
|
"bin/cryptopunks-gui",
|
30
|
+
"bin/cryptopunks-mac-gui",
|
31
|
+
"bin/cryptopunks-mac-gui.rb",
|
32
|
+
"bin/package-mac",
|
33
|
+
"bin/package-mac-app",
|
34
|
+
"bin/package-mac-dmg",
|
30
35
|
"cryptopunks-gui.gemspec",
|
36
|
+
"icons/cryptopunks-gui.icns",
|
31
37
|
"icons/cryptopunks-gui.png"
|
32
38
|
]
|
33
39
|
s.homepage = "http://github.com/AndyObtiva/cryptopunks-gui".freeze
|
@@ -41,7 +47,7 @@ Gem::Specification.new do |s|
|
|
41
47
|
end
|
42
48
|
|
43
49
|
if s.respond_to? :add_runtime_dependency then
|
44
|
-
s.add_runtime_dependency(%q<glimmer-dsl-tk>.freeze, ["~> 0.0.
|
50
|
+
s.add_runtime_dependency(%q<glimmer-dsl-tk>.freeze, ["~> 0.0.33"])
|
45
51
|
s.add_runtime_dependency(%q<cryptopunks>.freeze, ["~> 2.0.1"])
|
46
52
|
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
47
53
|
s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
@@ -49,7 +55,7 @@ Gem::Specification.new do |s|
|
|
49
55
|
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
50
56
|
s.add_development_dependency(%q<rake-tui>.freeze, [">= 0"])
|
51
57
|
else
|
52
|
-
s.add_dependency(%q<glimmer-dsl-tk>.freeze, ["~> 0.0.
|
58
|
+
s.add_dependency(%q<glimmer-dsl-tk>.freeze, ["~> 0.0.33"])
|
53
59
|
s.add_dependency(%q<cryptopunks>.freeze, ["~> 2.0.1"])
|
54
60
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
55
61
|
s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cryptopunks-gui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: glimmer-dsl-tk
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.0.
|
19
|
+
version: 0.0.33
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.0.
|
26
|
+
version: 0.0.33
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cryptopunks
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,7 +125,13 @@ files:
|
|
125
125
|
- VERSION
|
126
126
|
- app/cryptopunks_gui.rb
|
127
127
|
- bin/cryptopunks-gui
|
128
|
+
- bin/cryptopunks-mac-gui
|
129
|
+
- bin/cryptopunks-mac-gui.rb
|
130
|
+
- bin/package-mac
|
131
|
+
- bin/package-mac-app
|
132
|
+
- bin/package-mac-dmg
|
128
133
|
- cryptopunks-gui.gemspec
|
134
|
+
- icons/cryptopunks-gui.icns
|
129
135
|
- icons/cryptopunks-gui.png
|
130
136
|
homepage: http://github.com/AndyObtiva/cryptopunks-gui
|
131
137
|
licenses:
|