cryptopunks 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +108 -1
- data/Rakefile +1 -1
- data/config/spritesheet.csv +762 -402
- data/config/spritesheet.png +0 -0
- data/lib/cryptopunks/generator.rb +108 -22
- data/lib/cryptopunks/tool.rb +107 -1
- data/lib/cryptopunks/version.rb +2 -2
- data/lib/cryptopunks.rb +90 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d5c5095393516405521c5015bba5c08d8c664ed7069a3e2d40e18fa954a3966
|
4
|
+
data.tar.gz: 2e1f634711c262c540e069128842e547d9e43d4695d90022ed0d91f25c0f6f41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e377b5fa5e4652bdabf9ad77bf95aaea875fe84a5d778579e974573afb054157540fb40742019e20c80070ea9de163af116b605e1e8be08783d24e960562ac39
|
7
|
+
data.tar.gz: 882ef4d31762e7d14d3b8da4e3a2a41a8409d96cb2f29b89e70b77b7acf9427a0a5721b4f8eab9da9d12ae0fa1373a26ab226003d589ffe7aca3379966503989
|
data/README.md
CHANGED
@@ -31,7 +31,7 @@ SYNOPSIS
|
|
31
31
|
punk [global options] command [command options] [arguments...]
|
32
32
|
|
33
33
|
VERSION
|
34
|
-
2.
|
34
|
+
2.1.0
|
35
35
|
|
36
36
|
GLOBAL OPTIONS
|
37
37
|
-d, --dir,
|
@@ -39,6 +39,8 @@ GLOBAL OPTIONS
|
|
39
39
|
-f, --file=FILE - True Official Genuine CryptoPunks™ all-in-one
|
40
40
|
composite image (default: ./punks.png)
|
41
41
|
--offset=NUM - Start counting at offset (default: 0)
|
42
|
+
--seed=NUM - Seed for random number generation /
|
43
|
+
shuffle (default: 4142)
|
42
44
|
-z, --zoom=ZOOM - Zoom factor x2, x4, x8, etc. (default: 1)
|
43
45
|
|
44
46
|
--help - Show this message
|
@@ -55,10 +57,15 @@ COMMANDS
|
|
55
57
|
attributes by IDs - use 0 to 9999
|
56
58
|
t, tile - Get punk characters via image tiles from all-in-one punk
|
57
59
|
series composite (./punks.png) - for IDs use 0 to 9999
|
60
|
+
f, flip - Flip (vertically) all punk characters in all-in-one punk
|
61
|
+
series composite (./punks.png)
|
62
|
+
s, shuffle - Shuffle all punk characters (randomly) in all-in-one
|
63
|
+
punk series composite (./punks.png)
|
58
64
|
|
59
65
|
help - Shows a list of commands or help for one command
|
60
66
|
```
|
61
67
|
|
68
|
+
|
62
69
|
### Generate Command
|
63
70
|
|
64
71
|
_Generate punk characters from text attributes (from scratch / zero) via builtin punk spritesheet_
|
@@ -496,6 +503,106 @@ And so on.
|
|
496
503
|
|
497
504
|
|
498
505
|
|
506
|
+
### Flip Command
|
507
|
+
|
508
|
+
_Flip (vertically) all punk characters in all-in-one punk series composite (`./punks.png`)_
|
509
|
+
|
510
|
+
|
511
|
+
Let's generate an all new punk series by turning all punks
|
512
|
+
in the classic series
|
513
|
+
from right-looking to left-looking
|
514
|
+
by flipping vertically "one-by-one by hand [thanks to philip the intern]"
|
515
|
+
all punks. Phree the phunks! Let's give it a try:
|
516
|
+
|
517
|
+
```
|
518
|
+
$ punk flip
|
519
|
+
# - same as -
|
520
|
+
$ punk --file ./punks.png flip
|
521
|
+
```
|
522
|
+
|
523
|
+
printing:
|
524
|
+
|
525
|
+
```
|
526
|
+
==> reading >./punks.png<...
|
527
|
+
>ac39af4793119ee46bbff351d8cb6b5f23da60222126add4268e261199a2921b< SHA256 hash matching
|
528
|
+
✓ True Official Genuine CryptoPunks™ verified
|
529
|
+
(1/10000) philip the intern flipping punk #0...
|
530
|
+
(2/10000) philip the intern flipping punk #1...
|
531
|
+
...
|
532
|
+
==> saving phunks flipped one-by-one by hand to >./punks-flipped.png<...
|
533
|
+
```
|
534
|
+
|
535
|
+
And voila!
|
536
|
+
|
537
|
+
Yes, you can use any 24x24 composite. Use the `--file` option.
|
538
|
+
Example - let's flip the 1000 More Punks collection:
|
539
|
+
|
540
|
+
```
|
541
|
+
$ punk --file ./morepunks.png flip
|
542
|
+
```
|
543
|
+
|
544
|
+
And so on.
|
545
|
+
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
### Shuffle Command
|
550
|
+
|
551
|
+
_Shuffle all punk characters (randomly) in all-in-one punk series composite (`./punks.png`)_
|
552
|
+
|
553
|
+
Let's generate an all new punks series by randomly shuffling
|
554
|
+
"one-by-one by hand [thanks to philip the intern]".
|
555
|
+
Let's give it a try:
|
556
|
+
|
557
|
+
```
|
558
|
+
$ punk shuffle
|
559
|
+
# - same as -
|
560
|
+
$ punk --file ./punks.png --seed 4142 shuffle
|
561
|
+
```
|
562
|
+
|
563
|
+
printing:
|
564
|
+
|
565
|
+
```
|
566
|
+
==> reading >./punks.png<...
|
567
|
+
>ac39af4793119ee46bbff351d8cb6b5f23da60222126add4268e261199a2921b< SHA256 hash matching
|
568
|
+
✓ True Official Genuine CryptoPunks™ verified
|
569
|
+
using random generation number seed >4142< for shuffle
|
570
|
+
#1369 now #0
|
571
|
+
#590 now #1
|
572
|
+
#1635 now #2
|
573
|
+
#3199 now #3
|
574
|
+
...
|
575
|
+
==> saving p(h)unks shuffled one-by-one by hand to >./punks-4142.png<...
|
576
|
+
```
|
577
|
+
|
578
|
+
And voila!
|
579
|
+
|
580
|
+
Note: The shuffle command also prints out
|
581
|
+
all new index numbers for easy reference (to reuse attributes and so on):
|
582
|
+
|
583
|
+
```
|
584
|
+
All 10000 index numbers (zero-based) for reference using seed 4142:
|
585
|
+
|
586
|
+
[1369, 590, 1635, 3199, 1887, 7719, 5747, 2146, 6671, 7144,
|
587
|
+
1428, 7817, 1219, 163, 7186, 8488, 7191, 5240, 7226, 6574,
|
588
|
+
1619, 1701, 3018, 4745, 2438, 6474, 4756, 9300, 9382, 9528,
|
589
|
+
102, 1847, 2848, 8369, 7825, 842, 66, 1035, 2934, 2442,
|
590
|
+
...
|
591
|
+
8789, 7299, 4403, 5972, 338, 5635, 7566, 828, 8987, 9777]
|
592
|
+
```
|
593
|
+
|
594
|
+
|
595
|
+
|
596
|
+
Yes, you can use any 24x24 composite. Use the `--file` option.
|
597
|
+
Example - let's flip the 1000 More Punks collection:
|
598
|
+
|
599
|
+
```
|
600
|
+
$ punk --file ./morepunks.png shuffle
|
601
|
+
```
|
602
|
+
|
603
|
+
And so on.
|
604
|
+
|
605
|
+
|
499
606
|
|
500
607
|
|
501
608
|
## Usage in Your Scripts
|