ordbase 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9aa59214e1eae4cc33a86e39eb53920745c0fe2c973a19f97f2a42505fbabba
4
- data.tar.gz: 90483e74a37badf79a05be39d83faa41071d1cf646e1c7636c6d7c0bb687f69f
3
+ metadata.gz: c077f7686037700e803825097d687b8e901799a0b21183fef5de52e7463bf562
4
+ data.tar.gz: 2b34b42eb49c8ee03c05ed51478801ff4fbae94113ca4cace4960d95c088c800
5
5
  SHA512:
6
- metadata.gz: 8599fdbb119735c1c40ad6007301b95cf3ae9d6c47f6759a1fddb06689894ed543847e6da9c96c9d3526427b1ae72d0e301ecd978ab086252458f5ef30e0c8c8
7
- data.tar.gz: 9c0883baff5e546b298964a427d873f28df8ded7c956be9ba7a89735a2b944cf456ab88cb6990b0100098da44b3fff4e99ac061cb809910bafaba6aa519772ee
6
+ metadata.gz: 192125084bc7221e142e9260d79c190a0a3581c03a21f41b20d1feb49c44381d3a4d1c4a654d6dacdde6d5638e68f9372daf9cf8e4cc71c53fb8fe44163ca8b9
7
+ data.tar.gz: dc79eb6a52a82fe67628ad4649ec7171159d8de209d072c492c259ae6aa7d79805ae9474e55ade4c1f901032e6103677373c7ad3465c873e5a074b760d06b048
data/Manifest.txt CHANGED
@@ -5,5 +5,4 @@ Rakefile
5
5
  bin/ordbase
6
6
  lib/ordbase.rb
7
7
  lib/ordbase/collection.rb
8
- lib/ordbase/stats.rb
9
8
  lib/ordbase/tool.rb
data/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  ordbase gem - "right-clicker" (off-chain) ordinals (pixel art) command-line tool, machinery & helpers for Bitcoin, Litcoin, Dogecoin & co.
4
4
 
5
5
 
6
- * home :: [github.com/pixelartexchange/artbase](https://github.com/pixelartexchange/artbase)
7
- * bugs :: [github.com/pixelartexchange/artbase/issues](https://github.com/pixelartexchange/artbase/issues)
6
+ * home :: [github.com/ordbase/ordbase](https://github.com/ordbase/ordbase)
7
+ * bugs :: [github.com/ordbase/ordbase/issues](https://github.com/ordbase/ordbase/issues)
8
8
  * gem :: [rubygems.org/gems/ordbase](https://rubygems.org/gems/ordbase)
9
9
  * rdoc :: [rubydoc.info/gems/ordbase](http://rubydoc.info/gems/ordbase)
10
10
 
@@ -15,13 +15,14 @@ ordbase gem - "right-clicker" (off-chain) ordinals (pixel art) command-line tool
15
15
  Let's use the 100 Ordinal Punks collection to try out the
16
16
  `ordbase` command-line tool shipping with the ordbase package.
17
17
 
18
- Tip: New to Ordinal Punks? For some background see [**Awesome 100 Ordinal Punks (Anno 2023) Notes - 24×24 Pixel Art on the (Bitcoin) Blockchain »**](https://github.com/cryptopunksnotdead/cryptopunks/tree/master/awesome-ordinalpunks)
18
+ Tip: New to Ordinal Punks? For some background see [**Awesome 100 Ordinal Punks (Anno 2023) Notes - 24×24 Pixel Art on the (Bitcoin) Blockchain »**](https://github.com/ordinalpunks/awesome-ordinalpunks)
19
+
19
20
 
20
21
 
21
22
  ### Step 0: Prepare A Tabular Dataset (List) Of All Ordinals w/ ID
22
23
 
23
24
  For now a manual step - prepare a list of all ordinals with id in the comma-separated values (.csv) tabular dataset format.
24
- Example - [ordinalpunks/ordinals.csv](https://github.com/pixelartexchange/ordinals.sandbox/blob/master/ordinalpunks/ordinals.csv):
25
+ Example - [ordinalpunks/ordinals.csv](https://github.com/ordbase/ordinals.sandbox/blob/master/ordinalpunks/ordinals.csv):
25
26
 
26
27
  ``` csv
27
28
  num, id
@@ -61,12 +62,12 @@ Resulting in:
61
62
  ...
62
63
  ```
63
64
 
64
- ![](https://github.com/pixelartexchange/artbase/raw/master/ordbase/i/1.png)
65
- ![](https://github.com/pixelartexchange/artbase/raw/master/ordbase/i/2.png)
66
- ![](https://github.com/pixelartexchange/artbase/raw/master/ordbase/i/3.png)
67
- ![](https://github.com/pixelartexchange/artbase/raw/master/ordbase/i/4.png)
68
- ![](https://github.com/pixelartexchange/artbase/raw/master/ordbase/i/5.png)
69
- ![](https://github.com/pixelartexchange/artbase/raw/master/ordbase/i/6.png)
65
+ ![](https://github.com/ordbase/ordbase/raw/master/ordbase/i/1.png)
66
+ ![](https://github.com/ordbase/ordbase/raw/master/ordbase/i/2.png)
67
+ ![](https://github.com/ordbase/ordbase/raw/master/ordbase/i/3.png)
68
+ ![](https://github.com/ordbase/ordbase/raw/master/ordbase/i/4.png)
69
+ ![](https://github.com/ordbase/ordbase/raw/master/ordbase/i/5.png)
70
+ ![](https://github.com/ordbase/ordbase/raw/master/ordbase/i/6.png)
70
71
  ...
71
72
 
72
73
 
@@ -81,7 +82,7 @@ resulting in 192×192px.
81
82
 
82
83
  Add a ["artbase-compatible"](https://github.com/pixelartexchange/artbase) collection configuration file to lists the source format(s)
83
84
  and the minimal true pixel format.
84
- Example - [ordinalpunks/collection.yml](https://github.com/pixelartexchange/ordinals.sandbox/blob/master/ordinalpunks/collection.yml):
85
+ Example - [ordinalpunks/collection.yml](https://github.com/ordbase/ordinals.sandbox/blob/master/ordinalpunks/collection.yml):
85
86
 
86
87
  ``` yaml
87
88
  slug: ordinalpunks
@@ -114,12 +115,12 @@ in the "minimal" `24x24` format:
114
115
  ...
115
116
  ```
116
117
 
117
- ![](https://github.com/pixelartexchange/ordinals.sandbox/raw/master/ordinalpunks/24x24/1.png)
118
- ![](https://github.com/pixelartexchange/ordinals.sandbox/raw/master/ordinalpunks/24x24/2.png)
119
- ![](https://github.com/pixelartexchange/ordinals.sandbox/raw/master/ordinalpunks/24x24/3.png)
120
- ![](https://github.com/pixelartexchange/ordinals.sandbox/raw/master/ordinalpunks/24x24/4.png)
121
- ![](https://github.com/pixelartexchange/ordinals.sandbox/raw/master/ordinalpunks/24x24/5.png)
122
- ![](https://github.com/pixelartexchange/ordinals.sandbox/raw/master/ordinalpunks/24x24/6.png)
118
+ ![](https://github.com/ordbase/ordinals.sandbox/raw/master/ordinalpunks/24x24/1.png)
119
+ ![](https://github.com/ordbase/ordinals.sandbox/raw/master/ordinalpunks/24x24/2.png)
120
+ ![](https://github.com/ordbase/ordinals.sandbox/raw/master/ordinalpunks/24x24/3.png)
121
+ ![](https://github.com/ordbase/ordinals.sandbox/raw/master/ordinalpunks/24x24/4.png)
122
+ ![](https://github.com/ordbase/ordinals.sandbox/raw/master/ordinalpunks/24x24/5.png)
123
+ ![](https://github.com/ordbase/ordinals.sandbox/raw/master/ordinalpunks/24x24/6.png)
123
124
  ...
124
125
 
125
126
 
@@ -138,7 +139,7 @@ to make an all-in-one image composite for the complete collection.
138
139
  Resulting in `/tmp/ordinalpunks.png` (~11kb).
139
140
 
140
141
 
141
- ![](https://github.com/pixelartexchange/ordinals.sandbox/raw/master/i/ordinalpunks.png)
142
+ ![](https://github.com/ordbase/ordinals.sandbox/raw/master/i/ordinalpunks.png)
142
143
 
143
144
 
144
145
  That's it for now.
@@ -149,7 +150,7 @@ That's it for now.
149
150
  ## Bonus: More Ordinal Pixel Art Collections
150
151
 
151
152
 
152
- See the [**Ordinals (Pixel Art) Sandbox (& Cache)**](https://github.com/pixelartexchange/ordinals.sandbox)
153
+ See the [**Ordinals (Pixel Art) Sandbox (& Cache)**](https://github.com/ordbase/ordinals.sandbox)
153
154
  for more collections incl. Bitcoin Punks (24×24), Ordinal Mini Doges (24×24),
154
155
  Extra Ordinal Women (32×32), Ordinal Penguins (35×35),
155
156
  Ordinal Birds (42×42), Bitcoin Bears (48×48) and much more.
data/Rakefile CHANGED
@@ -10,15 +10,15 @@ end
10
10
 
11
11
  Hoe.spec 'ordbase' do
12
12
 
13
- self.version = '1.0.1'
13
+ self.version = '1.0.2'
14
14
 
15
15
  self.summary = 'ordbase gem - "right-clicker" (off-chain) ordinals (pixel art) command-line tool, machinery & helpers for Bitcoin, Litecoin, Dogecoin & co.'
16
16
  self.description = summary
17
17
 
18
- self.urls = { home: 'https://github.com/pixelartexchange/artbase' }
18
+ self.urls = { home: 'https://github.com/ordbase/ordbase' }
19
19
 
20
20
  self.author = 'Gerald Bauer'
21
- self.email = 'wwwmake@googlegroups.com'
21
+ self.email = 'gerald.bauer@gmail.com'
22
22
 
23
23
  # switch extension to .markdown for gihub formatting
24
24
  self.readme_file = 'README.md'
@@ -124,6 +124,7 @@ def make_composite( limit: nil )
124
124
  when 12 then [4, 3]
125
125
  when 15 then [5, 3]
126
126
  when 20 then [5, 4]
127
+ when 40 then [10, 4]
127
128
  when 50 then [10, 5]
128
129
  when 69 then [10, 7]
129
130
  when 80 then [10, 8]
data/lib/ordbase.rb CHANGED
@@ -8,8 +8,6 @@ require 'optparse'
8
8
 
9
9
  ## our own code
10
10
  require_relative 'ordbase/collection'
11
- require_relative 'ordbase/stats'
12
-
13
11
  require_relative 'ordbase/tool'
14
12
 
15
13
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ordbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-23 00:00:00.000000000 Z
11
+ date: 2023-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ordinals
@@ -74,7 +74,7 @@ dependencies:
74
74
  version: '3.23'
75
75
  description: ordbase gem - "right-clicker" (off-chain) ordinals (pixel art) command-line
76
76
  tool, machinery & helpers for Bitcoin, Litecoin, Dogecoin & co.
77
- email: wwwmake@googlegroups.com
77
+ email: gerald.bauer@gmail.com
78
78
  executables:
79
79
  - ordbase
80
80
  extensions: []
@@ -90,9 +90,8 @@ files:
90
90
  - bin/ordbase
91
91
  - lib/ordbase.rb
92
92
  - lib/ordbase/collection.rb
93
- - lib/ordbase/stats.rb
94
93
  - lib/ordbase/tool.rb
95
- homepage: https://github.com/pixelartexchange/artbase
94
+ homepage: https://github.com/ordbase/ordbase
96
95
  licenses:
97
96
  - Public Domain
98
97
  metadata: {}
data/lib/ordbase/stats.rb DELETED
@@ -1,142 +0,0 @@
1
-
2
-
3
- class InscriptionStats
4
-
5
- TITLE_RX = /^Inscription[ ]+(?<ord>[0-9]+)$/
6
- BYTES_RX = /^(?<bytes>[0-9]+)[ ]+bytes$/
7
-
8
- def initialize
9
- @stats = {
10
- count: 0,
11
- ord: { '<1000' => 0,
12
- '<10000' => 0,
13
- '<100000' => 0,
14
- '<1000000' => 0,
15
- 'min' => nil,
16
- 'max' => nil, },
17
- type: Hash.new(0),
18
- bytes: { '<100' => 0,
19
- '<1000' => 0,
20
- '<10000' => 0,
21
- '<100000' => 0,
22
- '<1000000' => 0,
23
- 'min' => nil,
24
- 'max' => nil, },
25
- }
26
-
27
- @days = Hash.new(0)
28
- end
29
-
30
- def size() @stats[:count]; end
31
-
32
-
33
-
34
- def update( data )
35
- data = JSON.parse( data) if data.is_a?( String )
36
-
37
- @stats[ :count ] += 1
38
-
39
-
40
- ord = nil
41
- if m=TITLE_RX.match( data['title'] )
42
- ord = m[:ord].to_i(10)
43
- else
44
- puts "!! ERROR - cannot find ord in inscription title; sorry"
45
- pp data
46
- exit 1
47
- end
48
-
49
- if ord < 1000 then @stats[:ord]['<1000'] += 1
50
- elsif ord < 10000 then @stats[:ord]['<10000'] += 1
51
- elsif ord < 100000 then @stats[:ord]['<100000'] += 1
52
- elsif ord < 1000000 then @stats[:ord]['<1000000'] += 1
53
- else
54
- puts "!! ERROR ord out-of-bounds"
55
- exit 1
56
- end
57
-
58
- ## update min/max
59
- @stats[:ord]['min'] = ord if ord < (@stats[:ord]['min'] || 9999999)
60
- @stats[:ord]['max'] = ord if ord > (@stats[:ord]['max'] || -1)
61
-
62
-
63
- bytes = nil
64
- if m=BYTES_RX.match( data['content length'] )
65
- bytes = m[:bytes].to_i(10)
66
- else
67
- puts "!! ERROR - cannot find bytes in inscription content length; sorry"
68
- pp data
69
- exit 1
70
- end
71
-
72
- if bytes < 100 then @stats[:bytes]['<100'] += 1
73
- elsif bytes < 1000 then @stats[:bytes]['<1000'] += 1
74
- elsif bytes < 10000 then @stats[:bytes]['<10000'] += 1
75
- elsif bytes < 100000 then @stats[:bytes]['<100000'] += 1
76
- elsif bytes < 1000000 then @stats[:bytes]['<1000000'] += 1
77
- else
78
- puts "!! ERROR bytes (content-length) out-of-bounds"
79
- exit 1
80
- end
81
-
82
- ## update min/max
83
- @stats[:bytes]['min'] = bytes if bytes < (@stats[:bytes]['min'] || 9999999)
84
- @stats[:bytes]['max'] = bytes if bytes > (@stats[:bytes]['max'] || -1)
85
-
86
-
87
- type = data['content type']
88
-
89
- @stats[:type][ type ] += 1
90
-
91
- ## "timestamp"=>"2023-02-05 01:45:22 UTC",
92
- ts = Time.strptime( data['timestamp'], '%Y-%m-%d %H:%M:%S' )
93
-
94
- @days[ ts.strftime('%Y-%m-%d') ] +=1
95
- end # method update
96
-
97
-
98
- def data ## rename to model or such - why? why not?
99
- ## sort days
100
- days = @days.sort {|l,r| l[0] <=> r[0] }
101
- ## add to stats
102
- @stats[:days] = {}
103
- days.each {|k,v| @stats[:days][k] = v }
104
- @stats
105
- end
106
-
107
- =begin
108
- {:count=>101,
109
- :ord=>{"<1000"=>0, "<10000"=>0, "<100000"=>101, "<1000000"=>0, "min"=>14343, "max"=>42901},
110
- :type=>{"image/png"=>101},
111
- :bytes=>{"<100"=>0, "<1000"=>101, "<10000"=>0, "<100000"=>0, "<1000000"=>0, "min"=>274, "max"=>512},
112
- :days=>{"2023-02-22"=>10, "2023-02-25"=>17, "2023-02-26"=>74}}
113
- =end
114
-
115
- def format ## rename to pretty_print or such - why? why not?
116
- stat = data
117
-
118
- buf = String.new('')
119
- buf << "#{stat[:count]} inscription(s)\n"
120
-
121
- buf << "- from ##{stat[:ord]['min']} to ##{stat[:ord]['max']} (min. to max.)\n"
122
- buf << " - <1000 => #{stat[:ord]['<1000']}\n" if stat[:ord]["<1000"] > 0
123
- buf << " - <10000 => #{stat[:ord]['<10000']}\n" if stat[:ord]["<10000"] > 0
124
- buf << " - <100000 => #{stat[:ord]['<100000']}\n" if stat[:ord]["<100000"] > 0
125
- buf << " - <1000000 => #{stat[:ord]['<1000000']}\n" if stat[:ord]["<1000000"] > 0
126
-
127
- buf << "- format(s)\n"
128
- stat[:type].each do |k,v|
129
- buf << " - #{k} => #{v}\n"
130
- end
131
-
132
- buf << "- day(s)\n"
133
- stat[:days].each do |k,v|
134
- buf << " - #{k} => #{v}\n"
135
- end
136
-
137
- buf
138
- end
139
-
140
- end ## class InscriptionStats
141
-
142
-