isbnranges 0.2.0 → 2024.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -6
- data/data/range_date.txt +1 -1
- data/data/registrant_ranges.txt +5 -5
- data/data/registration_group_ranges.txt +1 -1
- data/lib/isbnranges/version.rb +1 -1
- data/lib/isbnranges.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 396fa84e7df47504857de05e5402c28db6721344c9fe86a681005548e98d3dff
|
4
|
+
data.tar.gz: 3cc96ed24f06f780cb472696e219e301aed6fc8f0edffffdee84b71647b48c46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38edc6763df68bb74d17843f4b3fc0529f853bef3ce86645215d5c06f80f40e345dffb12b0a76e3676085abb25355be4ebb00024899ab6e06ec220ecd73e03c3
|
7
|
+
data.tar.gz: 55852876aa937f6f60fe81ab537cd2ecd00e7f9417b6c76b90c910f8cabc4b9c01d74e7a5d3c722a342d80eadc6f553db6cff44d4a8d582f6ba0a60f4c55a83e
|
data/README.md
CHANGED
@@ -5,7 +5,9 @@ The range definitions of ISBN registration groups and registrants.
|
|
5
5
|
This library provides programmer-friendly versions of data published by International ISBN Agency. It does NOT provide any manipulation of the data.
|
6
6
|
|
7
7
|
All ranges of registration groups and registrants are supported.
|
8
|
-
Those
|
8
|
+
Those depend on 'RangeMessage.xml' file, downloaded from [International ISBN Agency](https://www.isbn-international.org/range_file_generation).
|
9
|
+
|
10
|
+
NOTE: Updated range files to latest version on September 2, 2024.
|
9
11
|
|
10
12
|
## Installation
|
11
13
|
|
@@ -24,11 +26,11 @@ After `require "isbnranges"`, you can refer to the following constants.
|
|
24
26
|
- `ISBNRanges::REGISTRATION_GROUP_RANGES`
|
25
27
|
- `ISBNRanges::REGISTRANT_RANGES`
|
26
28
|
|
27
|
-
Both constants are
|
29
|
+
Both constants are Hash objects with the prefix as the key. The value corresponding to the key is an Array object of ranges defined under the prefix. Each range is an Array object whose beginning and end are included, so it can be easily modified into a form that is convenient for you.
|
28
30
|
|
29
31
|
- `ISBNRanges::REGISTRATION_GROUP_AGENCY`
|
30
32
|
|
31
|
-
This constant is also a
|
33
|
+
This constant is also a Hash object with the prefix as the key, and the corresponding value is the national agency name to which the prefix is assigned.
|
32
34
|
|
33
35
|
- `ISBNRanges::RANGE_DATE`
|
34
36
|
|
@@ -38,10 +40,24 @@ This constant holds the defined date of the information contained in the range f
|
|
38
40
|
=> true
|
39
41
|
irb(main):002:0> ISBNRanges::REGISTRATION_GROUP_RANGES
|
40
42
|
=>
|
41
|
-
{"978"=>
|
42
|
-
|
43
|
+
{"978"=>
|
44
|
+
[["0", "5"],
|
45
|
+
["600", "649"],
|
46
|
+
["65", "65"],
|
47
|
+
["7", "7"],
|
48
|
+
["80", "94"],
|
49
|
+
["950", "989"],
|
50
|
+
["9900", "9989"],
|
51
|
+
["99900", "99999"]],
|
52
|
+
"979"=>[["10", "15"], ["8", "8"]]}
|
43
53
|
irb(main):003:0> ISBNRanges::REGISTRANT_RANGES["978-4"]
|
44
|
-
=>
|
54
|
+
=>
|
55
|
+
[["00", "19"],
|
56
|
+
["200", "699"],
|
57
|
+
["7000", "8499"],
|
58
|
+
["85000", "89999"],
|
59
|
+
["900000", "949999"],
|
60
|
+
["9500000", "9999999"]]
|
45
61
|
irb(main):004:0> ISBNRanges::REGISTRATION_GROUP_AGENCY["978-4"]
|
46
62
|
=> "Japan"
|
47
63
|
irb(main):005:0> ISBNRanges::RANGE_DATE
|
data/data/range_date.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Mon, 2 Sep 2024 13:56:40 BST
|
data/data/registrant_ranges.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated from RangeMessage.xml file, downloaded from https://www.isbn-international.org/range_file_generation.
|
2
2
|
#
|
3
3
|
# International ISBN Agency
|
4
|
-
#
|
4
|
+
# Mon, 2 Sep 2024 13:56:40 BST
|
5
5
|
#
|
6
6
|
# English language
|
7
7
|
978-0:00-19,200-227,2280-2289,229-368,3690-3699,370-638,6390-6397,6398000-6399999,640-644,6450000-6459999,646-647,6480000-6489999,649-654,6550-6559,656-699,7000-8499,85000-89999,900000-900370,9003710-9003719,900372-949999,9500000-9999999:English language
|
@@ -30,7 +30,7 @@
|
|
30
30
|
# Romania
|
31
31
|
978-606:000-099,10-49,500-799,8000-9099,910-919,92000-95999,9600-9749,975-999:Romania
|
32
32
|
# Mexico
|
33
|
-
978-607:00-39,400-588,5890-5929,59300-59999,600-694,69500-69999,700-749,7500-9499,95000-99999:Mexico
|
33
|
+
978-607:00-25,2600-2649,26500-26999,27-39,400-588,5890-5929,59300-59999,600-694,69500-69999,700-749,7500-9499,95000-99999:Mexico
|
34
34
|
# North Macedonia
|
35
35
|
978-608:0-0,10-19,200-449,4500-6499,65000-69999,7-9:North Macedonia
|
36
36
|
# Lithuania
|
@@ -60,7 +60,7 @@
|
|
60
60
|
# Iran
|
61
61
|
978-622:00-10,200-459,4800-8499,90000-99999:Iran
|
62
62
|
# Indonesia
|
63
|
-
978-623:00-10,110-
|
63
|
+
978-623:00-10,110-524,5250-8799,88000-99999:Indonesia
|
64
64
|
# Sri Lanka
|
65
65
|
978-624:00-04,200-249,5000-6699,93000-99999:Sri Lanka
|
66
66
|
# Türkiye
|
@@ -208,7 +208,7 @@
|
|
208
208
|
# Uruguay
|
209
209
|
978-9915:40-59,650-799,9300-9999:Uruguay
|
210
210
|
# Estonia
|
211
|
-
978-9916:0-0,10-39,4-5,600-
|
211
|
+
978-9916:0-0,10-39,4-5,600-789,79-91,9200-9399,94-94,9500-9999:Estonia
|
212
212
|
# Bolivia
|
213
213
|
978-9917:0-0,30-34,600-699,9700-9999:Bolivia
|
214
214
|
# Malta
|
@@ -532,7 +532,7 @@
|
|
532
532
|
# Paraguay
|
533
533
|
978-99989:0-1,50-79,900-999:Paraguay
|
534
534
|
# Ethiopia
|
535
|
-
978-99990:0-0,50-
|
535
|
+
978-99990:0-0,50-57,960-999:Ethiopia
|
536
536
|
# Oman
|
537
537
|
978-99992:0-1,50-64,950-999:Oman
|
538
538
|
# Mauritius
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated from RangeMessage.xml file, downloaded from https://www.isbn-international.org/range_file_generation.
|
2
2
|
#
|
3
3
|
# International ISBN Agency
|
4
|
-
#
|
4
|
+
# Mon, 2 Sep 2024 13:56:40 BST
|
5
5
|
#
|
6
6
|
# International ISBN Agency
|
7
7
|
978:0-5,600-649,65-65,7-7,80-94,950-989,9900-9989,99900-99999:International ISBN Agency
|
data/lib/isbnranges/version.rb
CHANGED
data/lib/isbnranges.rb
CHANGED
@@ -17,7 +17,7 @@ module ISBNRanges
|
|
17
17
|
f.each_line do |line|
|
18
18
|
next if line.start_with?("#")
|
19
19
|
g, r, a = line.chomp.split(":")
|
20
|
-
ranges[g] = r.split(",") unless r.nil?
|
20
|
+
ranges[g] = r.split(",").map{|r| r.split("-")} unless r.nil?
|
21
21
|
agencies[g] = a unless r.nil?
|
22
22
|
end
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isbnranges
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '2024.9'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- takatoh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|