isbnranges 0.1.0 → 0.2.0

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: a76034ca4aae26d14b546e558e165f8b048566a78ffc109b44459e5fbe401495
4
- data.tar.gz: e6a18b2721d8ced186eb7736cbb9193fa43889d77a25809abaa9c76ba204011f
3
+ metadata.gz: '0088879a30d7ca24baa9aeebee30204fc49531ae0dda60fed3a798f10edd9626'
4
+ data.tar.gz: 37c9e8e915bc912ca093dbd7e96678a0e1da7a74ac2c07e702d2f844eb631ad1
5
5
  SHA512:
6
- metadata.gz: 247da0eaa3f61ff0f13415cd41639e8d0eb0c348b4d342e9d22f41fdc403cf9f6fcc9d9595ddd68fa50aedf7f12aece6bd5dae600330237fba6edee9df3d378d
7
- data.tar.gz: ea798bde2b5e4ce3d52369cb9d6dd9486e18f6dff1aeb49667ae88726ac2b6cedb7775da10e2e17f4e26c71a587cfc3503b0bca85c360f57ccba7fdf5344ddf5
6
+ metadata.gz: '097c8801591ddd1efc0af7f908ae3f787c2360fe9024568a56c5068a22d1d09516dcc5fe78231483cee78a39ad183fcc1e6d5ddd594219765962618f69855eae'
7
+ data.tar.gz: '0940cadfc81880a4073ffe4723ed9b9cc82b54b030d56419183314225d9986542d29d3ae524d552afc221e35d816aa904001601ed688dbbb3716c08b2149671f'
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2024 takatoh
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,31 +1,56 @@
1
- # ISBNRanges
2
-
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/isbnranges`. To experiment with that code, run `bin/console` for an interactive prompt.
6
-
7
- ## Installation
8
-
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
- Install the gem and add to the application's Gemfile by executing:
12
-
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
14
-
15
- If bundler is not being used to manage dependencies, install the gem by executing:
16
-
17
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
18
-
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
- ## Development
24
-
25
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
-
27
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
-
29
- ## Contributing
30
-
31
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/isbnranges.
1
+ # ISBNRanges
2
+
3
+ The range definitions of ISBN registration groups and registrants.
4
+
5
+ This library provides programmer-friendly versions of data published by International ISBN Agency. It does NOT provide any manipulation of the data.
6
+
7
+ All ranges of registration groups and registrants are supported.
8
+ Those depends on 'RangeMessage.xml' file, downloaded from [International ISBN Agency](https://www.isbn-international.org/range_file_generation).
9
+
10
+ ## Installation
11
+
12
+ Install the gem and add to the application's Gemfile by executing:
13
+
14
+ $ bundle add isbnranges
15
+
16
+ If bundler is not being used to manage dependencies, install the gem by executing:
17
+
18
+ $ gem install isbnranges
19
+
20
+ ## Usage
21
+
22
+ After `require "isbnranges"`, you can refer to the following constants.
23
+
24
+ - `ISBNRanges::REGISTRATION_GROUP_RANGES`
25
+ - `ISBNRanges::REGISTRANT_RANGES`
26
+
27
+ Both constants are HASHs with the prefix as the key. The value corresponding to the key is an Array of ranges defined under the prefix. Each range is a String whose beginning and end are joined by `-`, so it can be easily modified into a form that is convenient for you.
28
+
29
+ - `ISBNRanges::REGISTRATION_GROUP_AGENCY`
30
+
31
+ This constant is also a HASH with the prefix as the key, and the corresponding value is the national agency name to which the prefix is assigned.
32
+
33
+ - `ISBNRanges::RANGE_DATE`
34
+
35
+ This constant holds the defined date of the information contained in the range files.
36
+
37
+ irb(main):001:0> require "isbnranges"
38
+ => true
39
+ irb(main):002:0> ISBNRanges::REGISTRATION_GROUP_RANGES
40
+ =>
41
+ {"978"=>["0-5", "600-649", "65-65", "7-7", "80-94", "950-989", "9900-9989", "99900-99999"],
42
+ "979"=>["10-15", "8-8"]}
43
+ irb(main):003:0> ISBNRanges::REGISTRANT_RANGES["978-4"]
44
+ => ["00-19", "200-699", "7000-8499", "85000-89999", "900000-949999", "9500000-9999999"]
45
+ irb(main):004:0> ISBNRanges::REGISTRATION_GROUP_AGENCY["978-4"]
46
+ => "Japan"
47
+ irb(main):005:0> ISBNRanges::RANGE_DATE
48
+ => #<Date: 2024-08-13 ((2460536j,0s,0n),+0s,2299161j)>
49
+
50
+ ## License
51
+
52
+ MIT License
53
+
54
+ ## Contributing
55
+
56
+ Bug reports and pull requests are welcome on GitHub at https://github.com/takatoh/ISBNRanges.
@@ -0,0 +1 @@
1
+ Tue, 13 Aug 2024 06:15:38 BST
@@ -4,550 +4,550 @@
4
4
  # Tue, 13 Aug 2024 06:15:38 BST
5
5
  #
6
6
  # English language
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
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
8
8
  # English language
9
- 978-1:000-009,01-02,030-034,0350-0399,040-049,05-05,0670000-0699999,0700-0999,100-397,3980-5499,55000-64999,6500-6799,68000-68599,6860-7139,714-716,7170-7319,7320000-7399999,74000-76199,7620-7634,7635000-7649999,76500-77499,7750000-7753999,77540-77639,7764000-7764999,77650-77699,7770000-7782999,77830-78999,7900-7999,80000-80049,80050-80499,80500-83799,8380000-8384999,83850-86719,8672-8675,86760-86979,869800-915999,9160000-9165059,916506-916869,9168700-9169079,916908-919599,9196000-9196549,919655-972999,9730-9877,987800-991149,9911500-9911999,991200-998989,9989900-9999999
9
+ 978-1:000-009,01-02,030-034,0350-0399,040-049,05-05,0670000-0699999,0700-0999,100-397,3980-5499,55000-64999,6500-6799,68000-68599,6860-7139,714-716,7170-7319,7320000-7399999,74000-76199,7620-7634,7635000-7649999,76500-77499,7750000-7753999,77540-77639,7764000-7764999,77650-77699,7770000-7782999,77830-78999,7900-7999,80000-80049,80050-80499,80500-83799,8380000-8384999,83850-86719,8672-8675,86760-86979,869800-915999,9160000-9165059,916506-916869,9168700-9169079,916908-919599,9196000-9196549,919655-972999,9730-9877,987800-991149,9911500-9911999,991200-998989,9989900-9999999:English language
10
10
  # French language
11
- 978-2:00-19,200-349,35000-39999,400-486,487000-494999,495-495,4960-4966,49670-49699,497-527,5280-5299,530-699,7000-8399,84000-89999,900000-919799,91980-91980,919810-919942,9199430-9199689,919969-949999,9500000-9999999
11
+ 978-2:00-19,200-349,35000-39999,400-486,487000-494999,495-495,4960-4966,49670-49699,497-527,5280-5299,530-699,7000-8399,84000-89999,900000-919799,91980-91980,919810-919942,9199430-9199689,919969-949999,9500000-9999999:French language
12
12
  # German language
13
- 978-3:00-02,030-033,0340-0369,03700-03999,04-19,200-389,39-39,400-688,68900-69499,6950-8499,85000-89999,900000-949999,9500000-9539999,95400-96999,9700000-9849999,98500-99959,9996-9999
13
+ 978-3:00-02,030-033,0340-0369,03700-03999,04-19,200-389,39-39,400-688,68900-69499,6950-8499,85000-89999,900000-949999,9500000-9539999,95400-96999,9700000-9849999,98500-99959,9996-9999:German language
14
14
  # Japan
15
- 978-4:00-19,200-699,7000-8499,85000-89999,900000-949999,9500000-9999999
15
+ 978-4:00-19,200-699,7000-8499,85000-89999,900000-949999,9500000-9999999:Japan
16
16
  # former U.S.S.R
17
- 978-5:00000-00499,0050-0099,01-19,200-361,3620-3623,36240-36299,363-420,4210-4299,430-430,4310-4399,440-440,4410-4499,450-603,6040000-6049999,605-699,7000-8499,85000-89999,900000-909999,91000-91999,9200-9299,93000-94999,9500000-9500999,9501-9799,98000-98999,9900000-9909999,9910-9999
17
+ 978-5:00000-00499,0050-0099,01-19,200-361,3620-3623,36240-36299,363-420,4210-4299,430-430,4310-4399,440-440,4410-4499,450-603,6040000-6049999,605-699,7000-8499,85000-89999,900000-909999,91000-91999,9200-9299,93000-94999,9500000-9500999,9501-9799,98000-98999,9900000-9909999,9910-9999:former U.S.S.R
18
18
  # Iran
19
- 978-600:00-09,100-499,5000-8999,90000-98679,9868-9929,993-995,99600-99999
19
+ 978-600:00-09,100-499,5000-8999,90000-98679,9868-9929,993-995,99600-99999:Iran
20
20
  # Kazakhstan
21
- 978-601:00-19,200-699,7000-7999,80000-84999,85-99
21
+ 978-601:00-19,200-699,7000-7999,80000-84999,85-99:Kazakhstan
22
22
  # Indonesia
23
- 978-602:00-06,0700-1399,14000-14999,1500-1699,17000-19999,200-499,50000-53999,5400-5999,60000-61999,6200-6999,70000-74999,7500-9499,95000-99999
23
+ 978-602:00-06,0700-1399,14000-14999,1500-1699,17000-19999,200-499,50000-53999,5400-5999,60000-61999,6200-6999,70000-74999,7500-9499,95000-99999:Indonesia
24
24
  # Saudi Arabia
25
- 978-603:00-04,05-49,500-799,8000-8999,90000-99999
25
+ 978-603:00-04,05-49,500-799,8000-8999,90000-99999:Saudi Arabia
26
26
  # Vietnam
27
- 978-604:0-2,300-399,40-46,470-497,4980-4999,50-89,900-979,9800-9999
27
+ 978-604:0-2,300-399,40-46,470-497,4980-4999,50-89,900-979,9800-9999:Vietnam
28
28
  # Türkiye
29
- 978-605:00-02,030-039,04-05,06000-06999,07-09,100-199,2000-2399,240-399,4000-5999,60000-74999,7500-7999,80000-89999,9000-9999
29
+ 978-605:00-02,030-039,04-05,06000-06999,07-09,100-199,2000-2399,240-399,4000-5999,60000-74999,7500-7999,80000-89999,9000-9999:Türkiye
30
30
  # Romania
31
- 978-606:000-099,10-49,500-799,8000-9099,910-919,92000-95999,9600-9749,975-999
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
33
+ 978-607:00-39,400-588,5890-5929,59300-59999,600-694,69500-69999,700-749,7500-9499,95000-99999:Mexico
34
34
  # North Macedonia
35
- 978-608:0-0,10-19,200-449,4500-6499,65000-69999,7-9
35
+ 978-608:0-0,10-19,200-449,4500-6499,65000-69999,7-9:North Macedonia
36
36
  # Lithuania
37
- 978-609:00-39,400-799,8000-9499,95000-99999
37
+ 978-609:00-39,400-799,8000-9499,95000-99999:Lithuania
38
38
  # Thailand
39
- 978-611:
39
+ 978-611::Thailand
40
40
  # Peru
41
- 978-612:00-29,300-399,4000-4499,45000-49999,5000-5224
41
+ 978-612:00-29,300-399,4000-4499,45000-49999,5000-5224:Peru
42
42
  # Mauritius
43
- 978-613:0-9
43
+ 978-613:0-9:Mauritius
44
44
  # Lebanon
45
- 978-614:00-39,400-799,8000-9499,95000-99999
45
+ 978-614:00-39,400-799,8000-9499,95000-99999:Lebanon
46
46
  # Hungary
47
- 978-615:00-09,100-499,5000-7999,80000-89999
47
+ 978-615:00-09,100-499,5000-7999,80000-89999:Hungary
48
48
  # Thailand
49
- 978-616:00-19,200-699,7000-8999,90000-99999
49
+ 978-616:00-19,200-699,7000-8999,90000-99999:Thailand
50
50
  # Ukraine
51
- 978-617:00-49,500-699,7000-8999,90000-99999
51
+ 978-617:00-49,500-699,7000-8999,90000-99999:Ukraine
52
52
  # Greece
53
- 978-618:00-19,200-499,5000-7999,80000-99999
53
+ 978-618:00-19,200-499,5000-7999,80000-99999:Greece
54
54
  # Bulgaria
55
- 978-619:00-14,150-699,7000-8999,90000-99999
55
+ 978-619:00-14,150-699,7000-8999,90000-99999:Bulgaria
56
56
  # Mauritius
57
- 978-620:0-9
57
+ 978-620:0-9:Mauritius
58
58
  # Philippines
59
- 978-621:00-29,400-599,8000-8999,95000-99999
59
+ 978-621:00-29,400-599,8000-8999,95000-99999:Philippines
60
60
  # Iran
61
- 978-622:00-10,200-459,4800-8499,90000-99999
61
+ 978-622:00-10,200-459,4800-8499,90000-99999:Iran
62
62
  # Indonesia
63
- 978-623:00-10,110-519,5250-8799,88000-99999
63
+ 978-623:00-10,110-519,5250-8799,88000-99999:Indonesia
64
64
  # Sri Lanka
65
- 978-624:00-04,200-249,5000-6699,93000-99999
65
+ 978-624:00-04,200-249,5000-6699,93000-99999:Sri Lanka
66
66
  # Türkiye
67
- 978-625:00-01,365-442,44300-44499,445-449,6000-7793,77940-77949,7795-8499,94000-99999
67
+ 978-625:00-01,365-442,44300-44499,445-449,6000-7793,77940-77949,7795-8499,94000-99999:Türkiye
68
68
  # Taiwan
69
- 978-626:00-04,300-499,7000-7999,95000-99999
69
+ 978-626:00-04,300-499,7000-7999,95000-99999:Taiwan
70
70
  # Pakistan
71
- 978-627:30-31,500-524,7500-7999,94500-94649
71
+ 978-627:30-31,500-524,7500-7999,94500-94649:Pakistan
72
72
  # Colombia
73
- 978-628:00-09,500-549,7500-8499,95000-99999
73
+ 978-628:00-09,500-549,7500-8499,95000-99999:Colombia
74
74
  # Malaysia
75
- 978-629:00-02,470-499,7500-7999,96500-99999
75
+ 978-629:00-02,470-499,7500-7999,96500-99999:Malaysia
76
76
  # Romania
77
- 978-630:300-399,6500-6849,95000-99999
77
+ 978-630:300-399,6500-6849,95000-99999:Romania
78
78
  # Argentina
79
- 978-631:00-09,300-399,6500-7499,90000-99999
79
+ 978-631:00-09,300-399,6500-7499,90000-99999:Argentina
80
80
  # Vietnam
81
- 978-632:00-11,600-679
81
+ 978-632:00-11,600-679:Vietnam
82
82
  # Brazil
83
- 978-65:00-01,250-299,300-302,5000-5129,5200-6149,80000-81824,83000-89999,900000-902449,980000-999999
83
+ 978-65:00-01,250-299,300-302,5000-5129,5200-6149,80000-81824,83000-89999,900000-902449,980000-999999:Brazil
84
84
  # China, People's Republic
85
- 978-7:00-09,100-499,5000-7999,80000-89999,900000-999999
85
+ 978-7:00-09,100-499,5000-7999,80000-89999,900000-999999:China, People's Republic
86
86
  # former Czechoslovakia
87
- 978-80:00-19,200-529,53000-54999,550-689,69000-69999,7000-8499,85000-89999,900000-998999,99900-99999
87
+ 978-80:00-19,200-529,53000-54999,550-689,69000-69999,7000-8499,85000-89999,900000-998999,99900-99999:former Czechoslovakia
88
88
  # India
89
- 978-81:00-18,19000-19999,200-699,7000-8499,85000-89999,900000-999999
89
+ 978-81:00-18,19000-19999,200-699,7000-8499,85000-89999,900000-999999:India
90
90
  # Norway
91
- 978-82:00-19,200-689,690000-699999,7000-8999,90000-98999,990000-999999
91
+ 978-82:00-19,200-689,690000-699999,7000-8999,90000-98999,990000-999999:Norway
92
92
  # Poland
93
- 978-83:00-19,200-599,60000-69999,7000-8499,85000-89999,900000-999999
93
+ 978-83:00-19,200-599,60000-69999,7000-8499,85000-89999,900000-999999:Poland
94
94
  # Spain
95
- 978-84:00-09,10000-10499,1050-1199,120000-129999,1300-1399,140-149,15000-19999,200-699,7000-8499,85000-89999,9000-9199,920000-923999,92400-92999,930000-949999,95000-96999,9700-9999
95
+ 978-84:00-09,10000-10499,1050-1199,120000-129999,1300-1399,140-149,15000-19999,200-699,7000-8499,85000-89999,9000-9199,920000-923999,92400-92999,930000-949999,95000-96999,9700-9999:Spain
96
96
  # Brazil
97
- 978-85:00-19,200-454,455000-455299,45530-45599,456-528,52900-53199,5320-5339,534-539,54000-54029,54030-54039,540400-540499,54050-54089,540900-540999,54100-54399,5440-5479,54800-54999,5500-5999,60000-69999,7000-8499,85000-89999,900000-924999,92500-94499,9450-9599,96-97,98000-99999
97
+ 978-85:00-19,200-454,455000-455299,45530-45599,456-528,52900-53199,5320-5339,534-539,54000-54029,54030-54039,540400-540499,54050-54089,540900-540999,54100-54399,5440-5479,54800-54999,5500-5999,60000-69999,7000-8499,85000-89999,900000-924999,92500-94499,9450-9599,96-97,98000-99999:Brazil
98
98
  # former Yugoslavia
99
- 978-86:00-29,300-599,6000-7999,80000-89999,900000-999999
99
+ 978-86:00-29,300-599,6000-7999,80000-89999,900000-999999:former Yugoslavia
100
100
  # Denmark
101
- 978-87:00-29,400-649,7000-7999,85000-94999,970000-999999
101
+ 978-87:00-29,400-649,7000-7999,85000-94999,970000-999999:Denmark
102
102
  # Italy
103
- 978-88:00-19,200-311,31200-31499,315-318,31900-32299,323-326,3270-3389,339-360,3610-3629,363-548,5490-5549,555-599,6000-8499,85000-89999,900000-909999,910-926,9270-9399,940000-947999,94800-99999
103
+ 978-88:00-19,200-311,31200-31499,315-318,31900-32299,323-326,3270-3389,339-360,3610-3629,363-548,5490-5549,555-599,6000-8499,85000-89999,900000-909999,910-926,9270-9399,940000-947999,94800-99999:Italy
104
104
  # Korea, Republic
105
- 978-89:00-24,250-549,5500-8499,85000-94999,950000-969999,97000-98999,990-999
105
+ 978-89:00-24,250-549,5500-8499,85000-94999,950000-969999,97000-98999,990-999:Korea, Republic
106
106
  # Netherlands
107
- 978-90:00-19,200-499,5000-6999,70000-79999,800000-849999,8500-8999,90-90,94-94
107
+ 978-90:00-19,200-499,5000-6999,70000-79999,800000-849999,8500-8999,90-90,94-94:Netherlands
108
108
  # Sweden
109
- 978-91:0-1,20-49,500-649,7000-8199,85000-94999,970000-999999
109
+ 978-91:0-1,20-49,500-649,7000-8199,85000-94999,970000-999999:Sweden
110
110
  # International NGO Publishers and EU Organizations
111
- 978-92:0-5,60-79,800-899,9000-9499,95000-98999,990000-999999
111
+ 978-92:0-5,60-79,800-899,9000-9499,95000-98999,990000-999999:International NGO Publishers and EU Organizations
112
112
  # India
113
- 978-93:00-09,100-479,48000-49999,5000-7999,80000-95999,960000-999999
113
+ 978-93:00-09,100-479,48000-49999,5000-7999,80000-95999,960000-999999:India
114
114
  # Netherlands
115
- 978-94:000-599,6000-6387,638800-638809,63881-63881,638820-638839,63884-63885,638860-638869,63887-63889,6389-6395,639600-639609,63961-63962,639630-639639,63964-63964,639650-639659,63966-63969,6397-6399,640000-640009,64001-64004,640050-640059,64006-64006,640070-640089,64009-64009,6401-6406,640700-640739,64074-64074,640750-640759,64076-64077,640780-640799,6408-6419,64200-64201,642020-642029,64203-64203,642040-642049,64205-64206,642070-642079,64208-64208,642090-642099,6421-6432,64330-64331,643320-643329,64333-64333,643340-643359,64336-64336,643370-643379,64338-64339,6434-6435,643600-643609,64361-64363,643640-643659,64366-64366,643670-643679,64368-64369,6437-6443,644400-644409,64441-64441,644420-644429,64443-64443,644440-644449,64445-64446,644470-644489,64449-64449,6445-6450,64510-64512,645130-645139,64514-64515,645160-645199,6452-6458,645900-645909,64591-64592,645930-645949,64595-64596,645970-645989,64599-64599,6460-6465,646600-646609,64661-64662,646630-646659,64666-64666,646670-646689,64669-64669,6467-6474,64750-64751,647520-647539,64754-64754,647550-647559,64756-64757,647580-647589,64759-64759,6476-6476,647700-647708,64771-64771,647723-647729,64773-64773,647740-647769,64777-64779,647800-647809,64781-64781,647820-647829,64783-64786,647870-647879,64788-64789,6479-6493,649400-649409,64941-64942,649430-649449,64945-64946,649470-649479,64948-64948,649490-649499,6495-6497,64980-64980,649810-649829,64983-64984,649850-649869,64987-64987,649880-649883,6499-8999,90000-99999
115
+ 978-94:000-599,6000-6387,638800-638809,63881-63881,638820-638839,63884-63885,638860-638869,63887-63889,6389-6395,639600-639609,63961-63962,639630-639639,63964-63964,639650-639659,63966-63969,6397-6399,640000-640009,64001-64004,640050-640059,64006-64006,640070-640089,64009-64009,6401-6406,640700-640739,64074-64074,640750-640759,64076-64077,640780-640799,6408-6419,64200-64201,642020-642029,64203-64203,642040-642049,64205-64206,642070-642079,64208-64208,642090-642099,6421-6432,64330-64331,643320-643329,64333-64333,643340-643359,64336-64336,643370-643379,64338-64339,6434-6435,643600-643609,64361-64363,643640-643659,64366-64366,643670-643679,64368-64369,6437-6443,644400-644409,64441-64441,644420-644429,64443-64443,644440-644449,64445-64446,644470-644489,64449-64449,6445-6450,64510-64512,645130-645139,64514-64515,645160-645199,6452-6458,645900-645909,64591-64592,645930-645949,64595-64596,645970-645989,64599-64599,6460-6465,646600-646609,64661-64662,646630-646659,64666-64666,646670-646689,64669-64669,6467-6474,64750-64751,647520-647539,64754-64754,647550-647559,64756-64757,647580-647589,64759-64759,6476-6476,647700-647708,64771-64771,647723-647729,64773-64773,647740-647769,64777-64779,647800-647809,64781-64781,647820-647829,64783-64786,647870-647879,64788-64789,6479-6493,649400-649409,64941-64942,649430-649449,64945-64946,649470-649479,64948-64948,649490-649499,6495-6497,64980-64980,649810-649829,64983-64984,649850-649869,64987-64987,649880-649883,6499-8999,90000-99999:Netherlands
116
116
  # Argentina
117
- 978-950:00-49,500-899,9000-9899,99000-99999
117
+ 978-950:00-49,500-899,9000-9899,99000-99999:Argentina
118
118
  # Finland
119
- 978-951:0-1,20-54,550-889,8900-9499,95000-99999
119
+ 978-951:0-1,20-54,550-889,8900-9499,95000-99999:Finland
120
120
  # Finland
121
- 978-952:00-19,200-499,5000-5999,60-64,65000-65999,6600-6699,67000-69999,7000-7999,80-94,9500-9899,99000-99999
121
+ 978-952:00-19,200-499,5000-5999,60-64,65000-65999,6600-6699,67000-69999,7000-7999,80-94,9500-9899,99000-99999:Finland
122
122
  # Croatia
123
- 978-953:0-0,10-14,150-459,46000-49999,500-500,50100-50999,51-54,55000-59999,6000-9499,95000-99999
123
+ 978-953:0-0,10-14,150-459,46000-49999,500-500,50100-50999,51-54,55000-59999,6000-9499,95000-99999:Croatia
124
124
  # Bulgaria
125
- 978-954:00-28,2900-2999,300-799,8000-8999,90000-92999,9300-9999
125
+ 978-954:00-28,2900-2999,300-799,8000-8999,90000-92999,9300-9999:Bulgaria
126
126
  # Sri Lanka
127
- 978-955:0000-1999,20-33,3400-3549,35500-35999,3600-3799,38000-38999,3900-4099,41000-44999,4500-4999,50000-54999,550-710,71100-71499,7150-9499,95000-99999
127
+ 978-955:0000-1999,20-33,3400-3549,35500-35999,3600-3799,38000-38999,3900-4099,41000-44999,4500-4999,50000-54999,550-710,71100-71499,7150-9499,95000-99999:Sri Lanka
128
128
  # Chile
129
- 978-956:00-07,08000-08499,09000-09999,10-19,200-599,6000-6999,7000-9999
129
+ 978-956:00-07,08000-08499,09000-09999,10-19,200-599,6000-6999,7000-9999:Chile
130
130
  # Taiwan
131
- 978-957:00-02,0300-0499,05-19,2000-2099,21-27,28000-30999,31-43,440-819,8200-9699,97000-99999
131
+ 978-957:00-02,0300-0499,05-19,2000-2099,21-27,28000-30999,31-43,440-819,8200-9699,97000-99999:Taiwan
132
132
  # Colombia
133
- 978-958:00-49,500-509,5100-5199,52000-53999,5400-5599,56000-59999,600-799,8000-9499,95000-99999
133
+ 978-958:00-49,500-509,5100-5199,52000-53999,5400-5599,56000-59999,600-799,8000-9499,95000-99999:Colombia
134
134
  # Cuba
135
- 978-959:00-19,200-699,7000-8499,85000-99999
135
+ 978-959:00-19,200-699,7000-8499,85000-99999:Cuba
136
136
  # Greece
137
- 978-960:00-19,200-659,6600-6899,690-699,7000-8499,85000-92999,93-93,9400-9799,98000-99999
137
+ 978-960:00-19,200-659,6600-6899,690-699,7000-8499,85000-92999,93-93,9400-9799,98000-99999:Greece
138
138
  # Slovenia
139
- 978-961:00-19,200-599,6000-8999,90000-97999
139
+ 978-961:00-19,200-599,6000-8999,90000-97999:Slovenia
140
140
  # Hong Kong, China
141
- 978-962:00-19,200-699,7000-8499,85000-86999,8700-8999,900-999
141
+ 978-962:00-19,200-699,7000-8499,85000-86999,8700-8999,900-999:Hong Kong, China
142
142
  # Hungary
143
- 978-963:00-19,200-699,7000-8499,85000-89999,9000-9999
143
+ 978-963:00-19,200-699,7000-8499,85000-89999,9000-9999:Hungary
144
144
  # Iran
145
- 978-964:00-14,150-249,2500-2999,300-549,5500-8999,90000-96999,970-989,9900-9999
145
+ 978-964:00-14,150-249,2500-2999,300-549,5500-8999,90000-96999,970-989,9900-9999:Iran
146
146
  # Israel
147
- 978-965:00-19,200-599,7000-7999,90000-99999
147
+ 978-965:00-19,200-599,7000-7999,90000-99999:Israel
148
148
  # Ukraine
149
- 978-966:00-12,130-139,14-14,1500-1699,170-199,2000-2789,279-289,2900-2999,300-699,7000-8999,90000-90999,910-949,95000-97999,980-999
149
+ 978-966:00-12,130-139,14-14,1500-1699,170-199,2000-2789,279-289,2900-2999,300-699,7000-8999,90000-90999,910-949,95000-97999,980-999:Ukraine
150
150
  # Malaysia
151
- 978-967:0000-0999,10000-19999,2000-2499,250-254,25500-26999,2700-2799,2800-2999,300-499,5000-5999,60-89,900-989,9900-9989,99900-99999
151
+ 978-967:0000-0999,10000-19999,2000-2499,250-254,25500-26999,2700-2799,2800-2999,300-499,5000-5999,60-89,900-989,9900-9989,99900-99999:Malaysia
152
152
  # Mexico
153
- 978-968:01-39,400-499,5000-7999,800-899,9000-9999
153
+ 978-968:01-39,400-499,5000-7999,800-899,9000-9999:Mexico
154
154
  # Pakistan
155
- 978-969:0-1,20-20,210-219,2200-2299,23000-23999,24-39,400-749,7500-9999
155
+ 978-969:0-1,20-20,210-219,2200-2299,23000-23999,24-39,400-749,7500-9999:Pakistan
156
156
  # Mexico
157
- 978-970:01-59,600-899,9000-9099,91000-96999,9700-9999
157
+ 978-970:01-59,600-899,9000-9099,91000-96999,9700-9999:Mexico
158
158
  # Philippines
159
- 978-971:000-015,0160-0199,02-02,0300-0599,06-49,500-849,8500-9099,91000-95999,9600-9699,97-98,9900-9999
159
+ 978-971:000-015,0160-0199,02-02,0300-0599,06-49,500-849,8500-9099,91000-95999,9600-9699,97-98,9900-9999:Philippines
160
160
  # Portugal
161
- 978-972:0-1,20-54,550-799,8000-9499,95000-99999
161
+ 978-972:0-1,20-54,550-799,8000-9499,95000-99999:Portugal
162
162
  # Romania
163
- 978-973:0-0,100-169,1700-1999,20-54,550-759,7600-8499,85000-88999,8900-9499,95000-99999
163
+ 978-973:0-0,100-169,1700-1999,20-54,550-759,7600-8499,85000-88999,8900-9499,95000-99999:Romania
164
164
  # Thailand
165
- 978-974:00-19,200-699,7000-8499,85000-89999,90000-94999,9500-9999
165
+ 978-974:00-19,200-699,7000-8499,85000-89999,90000-94999,9500-9999:Thailand
166
166
  # Türkiye
167
- 978-975:00000-01999,02-23,2400-2499,250-599,6000-9199,92000-98999,990-999
167
+ 978-975:00000-01999,02-23,2400-2499,250-599,6000-9199,92000-98999,990-999:Türkiye
168
168
  # Caribbean Community
169
- 978-976:0-3,40-59,600-799,8000-9499,95000-99999
169
+ 978-976:0-3,40-59,600-799,8000-9499,95000-99999:Caribbean Community
170
170
  # Egypt
171
- 978-977:00-19,200-499,5000-6999,700-849,85000-87399,8740-8899,890-894,8950-8999,90-95,9600-9699,970-999
171
+ 978-977:00-19,200-499,5000-6999,700-849,85000-87399,8740-8899,890-894,8950-8999,90-95,9600-9699,970-999:Egypt
172
172
  # Nigeria
173
- 978-978:000-199,2000-2999,30000-69999,765-799,8000-8999,900-999
173
+ 978-978:000-199,2000-2999,30000-69999,765-799,8000-8999,900-999:Nigeria
174
174
  # Indonesia
175
- 978-979:000-099,1000-1499,15000-19999,20-29,3000-3999,400-799,8000-9499,95000-99999
175
+ 978-979:000-099,1000-1499,15000-19999,20-29,3000-3999,400-799,8000-9499,95000-99999:Indonesia
176
176
  # Venezuela
177
- 978-980:00-19,200-599,6000-9999
177
+ 978-980:00-19,200-599,6000-9999:Venezuela
178
178
  # Singapore
179
- 978-981:00-16,17000-17999,18-19,200-299,3000-3099,310-399,4000-5999,94-94,96-99
179
+ 978-981:00-16,17000-17999,18-19,200-299,3000-3099,310-399,4000-5999,94-94,96-99:Singapore
180
180
  # South Pacific
181
- 978-982:00-09,100-699,70-89,9000-9799,98000-99999
181
+ 978-982:00-09,100-699,70-89,9000-9799,98000-99999:South Pacific
182
182
  # Malaysia
183
- 978-983:00-01,020-199,2000-3999,40000-44999,45-49,50-79,800-899,9000-9899,99000-99999
183
+ 978-983:00-01,020-199,2000-3999,40000-44999,45-49,50-79,800-899,9000-9899,99000-99999:Malaysia
184
184
  # Bangladesh
185
- 978-984:00-39,400-799,8000-8999,90000-99999
185
+ 978-984:00-39,400-799,8000-8999,90000-99999:Bangladesh
186
186
  # Belarus
187
- 978-985:00-39,400-599,6000-8799,880-899,90000-99999
187
+ 978-985:00-39,400-599,6000-8799,880-899,90000-99999:Belarus
188
188
  # Taiwan
189
- 978-986:00-05,06000-06999,0700-0799,08-11,120-539,5400-7999,80000-99999
189
+ 978-986:00-05,06000-06999,0700-0799,08-11,120-539,5400-7999,80000-99999:Taiwan
190
190
  # Argentina
191
- 978-987:00-09,1000-1999,20000-29999,30-35,3600-4199,42-43,4400-4499,45000-48999,4900-4999,500-824,8250-8279,82800-82999,8300-8499,85-88,8900-9499,95000-99999
191
+ 978-987:00-09,1000-1999,20000-29999,30-35,3600-4199,42-43,4400-4499,45000-48999,4900-4999,500-824,8250-8279,82800-82999,8300-8499,85-88,8900-9499,95000-99999:Argentina
192
192
  # Hong Kong, China
193
- 978-988:00-11,12000-19999,200-699,70000-79999,8000-9699,97000-99999
193
+ 978-988:00-11,12000-19999,200-699,70000-79999,8000-9699,97000-99999:Hong Kong, China
194
194
  # Portugal
195
- 978-989:0-1,20-34,35000-36999,37-52,53000-54999,550-799,8000-9499,95000-99999
195
+ 978-989:0-1,20-34,35000-36999,37-52,53000-54999,550-799,8000-9499,95000-99999:Portugal
196
196
  # Tunisia
197
- 978-9909:00-19,750-849,9800-9999
197
+ 978-9909:00-19,750-849,9800-9999:Tunisia
198
198
  # Uzbekistan
199
- 978-9910:01-09,650-799,8800-9999
199
+ 978-9910:01-09,650-799,8800-9999:Uzbekistan
200
200
  # Montenegro
201
- 978-9911:20-24,550-749,9500-9999
201
+ 978-9911:20-24,550-749,9500-9999:Montenegro
202
202
  # Tanzania
203
- 978-9912:40-44,750-799,9800-9999
203
+ 978-9912:40-44,750-799,9800-9999:Tanzania
204
204
  # Uganda
205
- 978-9913:00-07,600-699,9550-9999
205
+ 978-9913:00-07,600-699,9550-9999:Uganda
206
206
  # Kenya
207
- 978-9914:40-55,700-774,9600-9999
207
+ 978-9914:40-55,700-774,9600-9999:Kenya
208
208
  # Uruguay
209
- 978-9915:40-59,650-799,9300-9999
209
+ 978-9915:40-59,650-799,9300-9999:Uruguay
210
210
  # Estonia
211
- 978-9916:0-0,10-39,4-5,600-799,80-91,9250-9999
211
+ 978-9916:0-0,10-39,4-5,600-799,80-91,9250-9999:Estonia
212
212
  # Bolivia
213
- 978-9917:0-0,30-34,600-699,9700-9999
213
+ 978-9917:0-0,30-34,600-699,9700-9999:Bolivia
214
214
  # Malta
215
- 978-9918:0-0,20-29,600-799,9500-9999
215
+ 978-9918:0-0,20-29,600-799,9500-9999:Malta
216
216
  # Mongolia
217
- 978-9919:0-0,20-29,500-599,9000-9999
217
+ 978-9919:0-0,20-29,500-599,9000-9999:Mongolia
218
218
  # Morocco
219
- 978-9920:28-42,480-799,8750-9999
219
+ 978-9920:28-42,480-799,8750-9999:Morocco
220
220
  # Kuwait
221
- 978-9921:0-0,30-39,700-899,9700-9999
221
+ 978-9921:0-0,30-39,700-899,9700-9999:Kuwait
222
222
  # Iraq
223
- 978-9922:20-29,600-799,8500-9999
223
+ 978-9922:20-29,600-799,8500-9999:Iraq
224
224
  # Jordan
225
- 978-9923:0-0,10-69,700-899,9400-9999
225
+ 978-9923:0-0,10-69,700-899,9400-9999:Jordan
226
226
  # Cambodia
227
- 978-9924:30-39,500-649,9000-9999
227
+ 978-9924:30-39,500-649,9000-9999:Cambodia
228
228
  # Cyprus
229
- 978-9925:0-2,30-54,550-734,7350-9999
229
+ 978-9925:0-2,30-54,550-734,7350-9999:Cyprus
230
230
  # Bosnia and Herzegovina
231
- 978-9926:0-1,20-39,400-799,8000-9999
231
+ 978-9926:0-1,20-39,400-799,8000-9999:Bosnia and Herzegovina
232
232
  # Qatar
233
- 978-9927:00-09,100-399,4000-4999
233
+ 978-9927:00-09,100-399,4000-4999:Qatar
234
234
  # Albania
235
- 978-9928:00-09,100-399,4000-4999,800-899,90-99
235
+ 978-9928:00-09,100-399,4000-4999,800-899,90-99:Albania
236
236
  # Guatemala
237
- 978-9929:0-3,40-54,550-799,8000-9999
237
+ 978-9929:0-3,40-54,550-799,8000-9999:Guatemala
238
238
  # Costa Rica
239
- 978-9930:00-49,500-939,9400-9999
239
+ 978-9930:00-49,500-939,9400-9999:Costa Rica
240
240
  # Algeria
241
- 978-9931:00-23,240-899,9000-9999
241
+ 978-9931:00-23,240-899,9000-9999:Algeria
242
242
  # Lao People's Democratic Republic
243
- 978-9932:00-39,400-849,8500-9999
243
+ 978-9932:00-39,400-849,8500-9999:Lao People's Democratic Republic
244
244
  # Syria
245
- 978-9933:0-0,10-39,400-869,87-89,9000-9999
245
+ 978-9933:0-0,10-39,400-869,87-89,9000-9999:Syria
246
246
  # Latvia
247
- 978-9934:0-0,10-49,500-799,8000-9999
247
+ 978-9934:0-0,10-49,500-799,8000-9999:Latvia
248
248
  # Iceland
249
- 978-9935:0-0,10-39,400-899,9000-9999
249
+ 978-9935:0-0,10-39,400-899,9000-9999:Iceland
250
250
  # Afghanistan
251
- 978-9936:0-1,20-39,400-799,8000-9999
251
+ 978-9936:0-1,20-39,400-799,8000-9999:Afghanistan
252
252
  # Nepal
253
- 978-9937:0-2,30-49,500-799,8000-9999
253
+ 978-9937:0-2,30-49,500-799,8000-9999:Nepal
254
254
  # Tunisia
255
- 978-9938:00-79,800-949,9500-9749,975-990,9910-9999
255
+ 978-9938:00-79,800-949,9500-9749,975-990,9910-9999:Tunisia
256
256
  # Armenia
257
- 978-9939:0-3,40-79,800-899,9000-9599,960-979,98-99
257
+ 978-9939:0-3,40-79,800-899,9000-9599,960-979,98-99:Armenia
258
258
  # Montenegro
259
- 978-9940:0-1,20-49,500-839,84-86,8700-9999
259
+ 978-9940:0-1,20-49,500-839,84-86,8700-9999:Montenegro
260
260
  # Georgia
261
- 978-9941:0-0,10-39,400-799,8-8,9000-9999
261
+ 978-9941:0-0,10-39,400-799,8-8,9000-9999:Georgia
262
262
  # Ecuador
263
- 978-9942:00-59,600-699,7000-7499,750-849,8500-8999,900-984,9850-9999
263
+ 978-9942:00-59,600-699,7000-7499,750-849,8500-8999,900-984,9850-9999:Ecuador
264
264
  # Uzbekistan
265
- 978-9943:00-29,300-399,4000-9749,975-999
265
+ 978-9943:00-29,300-399,4000-9749,975-999:Uzbekistan
266
266
  # Türkiye
267
- 978-9944:0000-0999,100-499,5000-5999,60-69,700-799,80-89,900-999
267
+ 978-9944:0000-0999,100-499,5000-5999,60-69,700-799,80-89,900-999:Türkiye
268
268
  # Dominican Republic
269
- 978-9945:00-00,010-079,08-39,400-569,57-57,580-799,80-80,810-849,8500-9999
269
+ 978-9945:00-00,010-079,08-39,400-569,57-57,580-799,80-80,810-849,8500-9999:Dominican Republic
270
270
  # Korea, P.D.R.
271
- 978-9946:0-1,20-39,400-899,9000-9999
271
+ 978-9946:0-1,20-39,400-899,9000-9999:Korea, P.D.R.
272
272
  # Algeria
273
- 978-9947:0-1,20-79,800-999
273
+ 978-9947:0-1,20-79,800-999:Algeria
274
274
  # United Arab Emirates
275
- 978-9948:00-39,400-849,8500-9999
275
+ 978-9948:00-39,400-849,8500-9999:United Arab Emirates
276
276
  # Estonia
277
- 978-9949:00-08,090-099,10-39,400-699,70-71,7200-7499,75-89,9000-9999
277
+ 978-9949:00-08,090-099,10-39,400-699,70-71,7200-7499,75-89,9000-9999:Estonia
278
278
  # Palestine
279
- 978-9950:00-29,300-849,8500-9999
279
+ 978-9950:00-29,300-849,8500-9999:Palestine
280
280
  # Kosova
281
- 978-9951:00-38,390-849,8500-9799,980-999
281
+ 978-9951:00-38,390-849,8500-9799,980-999:Kosova
282
282
  # Azerbaijan
283
- 978-9952:0-1,20-39,400-799,8000-9999
283
+ 978-9952:0-1,20-39,400-799,8000-9999:Azerbaijan
284
284
  # Lebanon
285
- 978-9953:0-0,10-39,400-599,60-89,9000-9299,93-96,970-999
285
+ 978-9953:0-0,10-39,400-599,60-89,9000-9299,93-96,970-999:Lebanon
286
286
  # Morocco
287
- 978-9954:0-1,20-39,400-799,8000-9899,99-99
287
+ 978-9954:0-1,20-39,400-799,8000-9899,99-99:Morocco
288
288
  # Lithuania
289
- 978-9955:00-39,400-929,9300-9999
289
+ 978-9955:00-39,400-929,9300-9999:Lithuania
290
290
  # Cameroon
291
- 978-9956:0-0,10-39,400-899,9000-9999
291
+ 978-9956:0-0,10-39,400-899,9000-9999:Cameroon
292
292
  # Jordan
293
- 978-9957:00-39,400-649,65-67,680-699,70-84,8500-8799,88-99
293
+ 978-9957:00-39,400-649,65-67,680-699,70-84,8500-8799,88-99:Jordan
294
294
  # Bosnia and Herzegovina
295
- 978-9958:00-01,020-029,0300-0399,040-089,0900-0999,10-18,1900-1999,20-49,500-899,9000-9999
295
+ 978-9958:00-01,020-029,0300-0399,040-089,0900-0999,10-18,1900-1999,20-49,500-899,9000-9999:Bosnia and Herzegovina
296
296
  # Libya
297
- 978-9959:0-1,20-79,800-949,9500-9699,970-979,98-99
297
+ 978-9959:0-1,20-79,800-949,9500-9699,970-979,98-99:Libya
298
298
  # Saudi Arabia
299
- 978-9960:00-59,600-899,9000-9999
299
+ 978-9960:00-59,600-899,9000-9999:Saudi Arabia
300
300
  # Algeria
301
- 978-9961:0-2,30-69,700-949,9500-9999
301
+ 978-9961:0-2,30-69,700-949,9500-9999:Algeria
302
302
  # Panama
303
- 978-9962:00-54,5500-5599,56-59,600-849,8500-9999
303
+ 978-9962:00-54,5500-5599,56-59,600-849,8500-9999:Panama
304
304
  # Cyprus
305
- 978-9963:0-1,2000-2499,250-279,2800-2999,30-54,550-734,7350-7499,7500-9999
305
+ 978-9963:0-1,2000-2499,250-279,2800-2999,30-54,550-734,7350-7499,7500-9999:Cyprus
306
306
  # Ghana
307
- 978-9964:0-6,70-94,950-999
307
+ 978-9964:0-6,70-94,950-999:Ghana
308
308
  # Kazakhstan
309
- 978-9965:00-39,400-899,9000-9999
309
+ 978-9965:00-39,400-899,9000-9999:Kazakhstan
310
310
  # Kenya
311
- 978-9966:000-139,14-14,1500-1999,20-69,7000-7499,750-820,8210-8249,825-825,8260-8289,829-959,9600-9999
311
+ 978-9966:000-139,14-14,1500-1999,20-69,7000-7499,750-820,8210-8249,825-825,8260-8289,829-959,9600-9999:Kenya
312
312
  # Kyrgyz Republic
313
- 978-9967:00-39,400-899,9000-9999
313
+ 978-9967:00-39,400-899,9000-9999:Kyrgyz Republic
314
314
  # Costa Rica
315
- 978-9968:00-49,500-939,9400-9999
315
+ 978-9968:00-49,500-939,9400-9999:Costa Rica
316
316
  # Algeria
317
- 978-9969:00-06,500-649,9700-9999
317
+ 978-9969:00-06,500-649,9700-9999:Algeria
318
318
  # Uganda
319
- 978-9970:00-39,400-899,9000-9999
319
+ 978-9970:00-39,400-899,9000-9999:Uganda
320
320
  # Singapore
321
- 978-9971:0-5,60-89,900-989,9900-9999
321
+ 978-9971:0-5,60-89,900-989,9900-9999:Singapore
322
322
  # Peru
323
- 978-9972:00-09,1-1,200-249,2500-2999,30-59,600-899,9000-9999
323
+ 978-9972:00-09,1-1,200-249,2500-2999,30-59,600-899,9000-9999:Peru
324
324
  # Tunisia
325
- 978-9973:00-05,060-089,0900-0999,10-69,700-969,9700-9999
325
+ 978-9973:00-05,060-089,0900-0999,10-69,700-969,9700-9999:Tunisia
326
326
  # Uruguay
327
- 978-9974:0-2,30-54,550-749,7500-8799,880-909,91-94,95-99
327
+ 978-9974:0-2,30-54,550-749,7500-8799,880-909,91-94,95-99:Uruguay
328
328
  # Moldova
329
- 978-9975:0-0,100-299,3000-3999,4000-4499,45-89,900-949,9500-9999
329
+ 978-9975:0-0,100-299,3000-3999,4000-4499,45-89,900-949,9500-9999:Moldova
330
330
  # Tanzania
331
- 978-9976:0-4,5000-5799,580-589,59-89,900-989,9900-9999
331
+ 978-9976:0-4,5000-5799,580-589,59-89,900-989,9900-9999:Tanzania
332
332
  # Costa Rica
333
- 978-9977:00-89,900-989,9900-9999
333
+ 978-9977:00-89,900-989,9900-9999:Costa Rica
334
334
  # Ecuador
335
- 978-9978:00-29,300-399,40-94,950-989,9900-9999
335
+ 978-9978:00-29,300-399,40-94,950-989,9900-9999:Ecuador
336
336
  # Iceland
337
- 978-9979:0-4,50-64,650-659,66-75,760-899,9000-9999
337
+ 978-9979:0-4,50-64,650-659,66-75,760-899,9000-9999:Iceland
338
338
  # Papua New Guinea
339
- 978-9980:0-3,40-89,900-989,9900-9999
339
+ 978-9980:0-3,40-89,900-989,9900-9999:Papua New Guinea
340
340
  # Morocco
341
- 978-9981:00-09,100-159,1600-1999,20-79,800-949,9500-9999
341
+ 978-9981:00-09,100-159,1600-1999,20-79,800-949,9500-9999:Morocco
342
342
  # Zambia
343
- 978-9982:00-79,800-989,9900-9999
343
+ 978-9982:00-79,800-989,9900-9999:Zambia
344
344
  # Gambia
345
- 978-9983:80-94,950-989,9900-9999
345
+ 978-9983:80-94,950-989,9900-9999:Gambia
346
346
  # Latvia
347
- 978-9984:00-49,500-899,9000-9999
347
+ 978-9984:00-49,500-899,9000-9999:Latvia
348
348
  # Estonia
349
- 978-9985:0-4,50-79,800-899,9000-9999
349
+ 978-9985:0-4,50-79,800-899,9000-9999:Estonia
350
350
  # Lithuania
351
- 978-9986:00-39,400-899,9000-9399,940-969,97-99
351
+ 978-9986:00-39,400-899,9000-9399,940-969,97-99:Lithuania
352
352
  # Tanzania
353
- 978-9987:00-39,400-879,8800-9999
353
+ 978-9987:00-39,400-879,8800-9999:Tanzania
354
354
  # Ghana
355
- 978-9988:0-3,40-54,550-749,7500-9999
355
+ 978-9988:0-3,40-54,550-749,7500-9999:Ghana
356
356
  # North Macedonia
357
- 978-9989:0-0,100-199,2000-2999,30-59,600-949,9500-9999
357
+ 978-9989:0-0,100-199,2000-2999,30-59,600-949,9500-9999:North Macedonia
358
358
  # Bahrain
359
- 978-99901:00-49,500-799,80-99
359
+ 978-99901:00-49,500-799,80-99:Bahrain
360
360
  # Reserved Agency
361
- 978-99902:
361
+ 978-99902::Reserved Agency
362
362
  # Mauritius
363
- 978-99903:0-1,20-89,900-999
363
+ 978-99903:0-1,20-89,900-999:Mauritius
364
364
  # Curaçao
365
- 978-99904:0-5,60-89,900-999
365
+ 978-99904:0-5,60-89,900-999:Curaçao
366
366
  # Bolivia
367
- 978-99905:0-3,40-79,800-999
367
+ 978-99905:0-3,40-79,800-999:Bolivia
368
368
  # Kuwait
369
- 978-99906:0-2,30-59,600-699,70-89,90-94,950-999
369
+ 978-99906:0-2,30-59,600-699,70-89,90-94,950-999:Kuwait
370
370
  # Malawi
371
- 978-99908:0-0,10-89,900-999
371
+ 978-99908:0-0,10-89,900-999:Malawi
372
372
  # Malta
373
- 978-99909:0-3,40-94,950-999
373
+ 978-99909:0-3,40-94,950-999:Malta
374
374
  # Sierra Leone
375
- 978-99910:0-2,30-89,900-999
375
+ 978-99910:0-2,30-89,900-999:Sierra Leone
376
376
  # Lesotho
377
- 978-99911:00-59,600-999
377
+ 978-99911:00-59,600-999:Lesotho
378
378
  # Botswana
379
- 978-99912:0-3,400-599,60-89,900-999
379
+ 978-99912:0-3,400-599,60-89,900-999:Botswana
380
380
  # Andorra
381
- 978-99913:0-2,30-35,600-604
381
+ 978-99913:0-2,30-35,600-604:Andorra
382
382
  # International NGO Publishers
383
- 978-99914:0-4,50-69,7-7,80-86,870-879,88-89,900-999
383
+ 978-99914:0-4,50-69,7-7,80-86,870-879,88-89,900-999:International NGO Publishers
384
384
  # Maldives
385
- 978-99915:0-4,50-79,800-999
385
+ 978-99915:0-4,50-79,800-999:Maldives
386
386
  # Namibia
387
- 978-99916:0-2,30-69,700-999
387
+ 978-99916:0-2,30-69,700-999:Namibia
388
388
  # Brunei Darussalam
389
- 978-99917:0-2,30-88,890-999
389
+ 978-99917:0-2,30-88,890-999:Brunei Darussalam
390
390
  # Faroe Islands
391
- 978-99918:0-3,40-79,800-999
391
+ 978-99918:0-3,40-79,800-999:Faroe Islands
392
392
  # Benin
393
- 978-99919:0-2,300-399,40-79,800-999
393
+ 978-99919:0-2,300-399,40-79,800-999:Benin
394
394
  # Andorra
395
- 978-99920:0-4,50-89,900-999
395
+ 978-99920:0-4,50-89,900-999:Andorra
396
396
  # Qatar
397
- 978-99921:0-1,20-69,700-799,8-8,90-99
397
+ 978-99921:0-1,20-69,700-799,8-8,90-99:Qatar
398
398
  # Guatemala
399
- 978-99922:0-3,40-69,700-999
399
+ 978-99922:0-3,40-69,700-999:Guatemala
400
400
  # El Salvador
401
- 978-99923:0-1,20-79,800-999
401
+ 978-99923:0-1,20-79,800-999:El Salvador
402
402
  # Nicaragua
403
- 978-99924:0-1,20-79,800-999
403
+ 978-99924:0-1,20-79,800-999:Nicaragua
404
404
  # Paraguay
405
- 978-99925:0-0,10-19,200-299,3-3,40-79,800-999
405
+ 978-99925:0-0,10-19,200-299,3-3,40-79,800-999:Paraguay
406
406
  # Honduras
407
- 978-99926:0-0,10-59,600-869,87-89,90-99
407
+ 978-99926:0-0,10-59,600-869,87-89,90-99:Honduras
408
408
  # Albania
409
- 978-99927:0-2,30-59,600-999
409
+ 978-99927:0-2,30-59,600-999:Albania
410
410
  # Georgia
411
- 978-99928:0-0,10-79,800-999
411
+ 978-99928:0-0,10-79,800-999:Georgia
412
412
  # Mongolia
413
- 978-99929:0-4,50-79,800-999
413
+ 978-99929:0-4,50-79,800-999:Mongolia
414
414
  # Armenia
415
- 978-99930:0-4,50-79,800-999
415
+ 978-99930:0-4,50-79,800-999:Armenia
416
416
  # Seychelles
417
- 978-99931:0-4,50-79,800-999
417
+ 978-99931:0-4,50-79,800-999:Seychelles
418
418
  # Malta
419
- 978-99932:0-0,10-59,600-699,7-7,80-99
419
+ 978-99932:0-0,10-59,600-699,7-7,80-99:Malta
420
420
  # Nepal
421
- 978-99933:0-2,30-59,600-999
421
+ 978-99933:0-2,30-59,600-999:Nepal
422
422
  # Dominican Republic
423
- 978-99934:0-1,20-79,800-999
423
+ 978-99934:0-1,20-79,800-999:Dominican Republic
424
424
  # Haiti
425
- 978-99935:0-2,30-59,600-699,7-8,90-99
425
+ 978-99935:0-2,30-59,600-699,7-8,90-99:Haiti
426
426
  # Bhutan
427
- 978-99936:0-0,10-59,600-999
427
+ 978-99936:0-0,10-59,600-999:Bhutan
428
428
  # Macau
429
- 978-99937:0-1,20-59,600-999
429
+ 978-99937:0-1,20-59,600-999:Macau
430
430
  # Srpska, Republic of
431
- 978-99938:0-1,20-59,600-899,90-99
431
+ 978-99938:0-1,20-59,600-899,90-99:Srpska, Republic of
432
432
  # Guatemala
433
- 978-99939:0-2,30-59,60-89,900-999
433
+ 978-99939:0-2,30-59,60-89,900-999:Guatemala
434
434
  # Georgia
435
- 978-99940:0-0,10-69,700-999
435
+ 978-99940:0-0,10-69,700-999:Georgia
436
436
  # Armenia
437
- 978-99941:0-2,30-79,800-999
437
+ 978-99941:0-2,30-79,800-999:Armenia
438
438
  # Sudan
439
- 978-99942:0-4,50-79,800-999
439
+ 978-99942:0-4,50-79,800-999:Sudan
440
440
  # Albania
441
- 978-99943:0-2,30-59,600-999
441
+ 978-99943:0-2,30-59,600-999:Albania
442
442
  # Ethiopia
443
- 978-99944:0-4,50-79,800-999
443
+ 978-99944:0-4,50-79,800-999:Ethiopia
444
444
  # Namibia
445
- 978-99945:0-4,50-89,900-979,98-99
445
+ 978-99945:0-4,50-89,900-979,98-99:Namibia
446
446
  # Nepal
447
- 978-99946:0-2,30-59,600-999
447
+ 978-99946:0-2,30-59,600-999:Nepal
448
448
  # Tajikistan
449
- 978-99947:0-2,30-69,700-999
449
+ 978-99947:0-2,30-69,700-999:Tajikistan
450
450
  # Eritrea
451
- 978-99948:0-4,50-79,800-999
451
+ 978-99948:0-4,50-79,800-999:Eritrea
452
452
  # Mauritius
453
- 978-99949:0-1,20-79,8-8,900-989,99-99
453
+ 978-99949:0-1,20-79,8-8,900-989,99-99:Mauritius
454
454
  # Cambodia
455
- 978-99950:0-4,50-79,800-999
455
+ 978-99950:0-4,50-79,800-999:Cambodia
456
456
  # Reserved Agency
457
- 978-99951:
457
+ 978-99951::Reserved Agency
458
458
  # Mali
459
- 978-99952:0-4,50-79,800-999
459
+ 978-99952:0-4,50-79,800-999:Mali
460
460
  # Paraguay
461
- 978-99953:0-2,30-79,800-939,94-99
461
+ 978-99953:0-2,30-79,800-939,94-99:Paraguay
462
462
  # Bolivia
463
- 978-99954:0-2,30-69,700-879,88-99
463
+ 978-99954:0-2,30-69,700-879,88-99:Bolivia
464
464
  # Srpska, Republic of
465
- 978-99955:0-1,20-59,600-799,80-99
465
+ 978-99955:0-1,20-59,600-799,80-99:Srpska, Republic of
466
466
  # Albania
467
- 978-99956:00-59,600-859,86-99
467
+ 978-99956:00-59,600-859,86-99:Albania
468
468
  # Malta
469
- 978-99957:0-1,20-79,800-949,95-99
469
+ 978-99957:0-1,20-79,800-949,95-99:Malta
470
470
  # Bahrain
471
- 978-99958:0-4,50-93,940-949,950-999
471
+ 978-99958:0-4,50-93,940-949,950-999:Bahrain
472
472
  # Luxembourg
473
- 978-99959:0-2,30-59,600-999
473
+ 978-99959:0-2,30-59,600-999:Luxembourg
474
474
  # Malawi
475
- 978-99960:070-099,10-94,950-999
475
+ 978-99960:070-099,10-94,950-999:Malawi
476
476
  # El Salvador
477
- 978-99961:0-2,300-369,37-89,900-999
477
+ 978-99961:0-2,300-369,37-89,900-999:El Salvador
478
478
  # Mongolia
479
- 978-99962:0-4,50-79,800-999
479
+ 978-99962:0-4,50-79,800-999:Mongolia
480
480
  # Cambodia
481
- 978-99963:00-49,500-919,92-99
481
+ 978-99963:00-49,500-919,92-99:Cambodia
482
482
  # Nicaragua
483
- 978-99964:0-1,20-79,800-999
483
+ 978-99964:0-1,20-79,800-999:Nicaragua
484
484
  # Macau
485
- 978-99965:0-2,300-359,36-62,630-999
485
+ 978-99965:0-2,300-359,36-62,630-999:Macau
486
486
  # Kuwait
487
- 978-99966:0-2,30-69,700-799,80-96,970-999
487
+ 978-99966:0-2,30-69,700-799,80-96,970-999:Kuwait
488
488
  # Paraguay
489
- 978-99967:0-0,10-59,600-999
489
+ 978-99967:0-0,10-59,600-999:Paraguay
490
490
  # Botswana
491
- 978-99968:0-3,400-599,60-89,900-999
491
+ 978-99968:0-3,400-599,60-89,900-999:Botswana
492
492
  # Oman
493
- 978-99969:0-4,50-79,800-949,95-99
493
+ 978-99969:0-4,50-79,800-949,95-99:Oman
494
494
  # Haiti
495
- 978-99970:0-4,50-89,900-999
495
+ 978-99970:0-4,50-89,900-999:Haiti
496
496
  # Myanmar
497
- 978-99971:0-3,40-84,850-999
497
+ 978-99971:0-3,40-84,850-999:Myanmar
498
498
  # Faroe Islands
499
- 978-99972:0-4,50-89,900-999
499
+ 978-99972:0-4,50-89,900-999:Faroe Islands
500
500
  # Mongolia
501
- 978-99973:0-3,40-79,800-999
501
+ 978-99973:0-3,40-79,800-999:Mongolia
502
502
  # Bolivia
503
- 978-99974:0-0,10-25,260-399,40-63,640-649,65-79,800-999
503
+ 978-99974:0-0,10-25,260-399,40-63,640-649,65-79,800-999:Bolivia
504
504
  # Tajikistan
505
- 978-99975:0-2,300-399,40-79,800-999
505
+ 978-99975:0-2,300-399,40-79,800-999:Tajikistan
506
506
  # Srpska, Republic of
507
- 978-99976:00-03,050-099,10-15,160-199,20-59,600-819,82-89,900-999
507
+ 978-99976:00-03,050-099,10-15,160-199,20-59,600-819,82-89,900-999:Srpska, Republic of
508
508
  # Rwanda
509
- 978-99977:0-1,40-69,700-799,975-999
509
+ 978-99977:0-1,40-69,700-799,975-999:Rwanda
510
510
  # Mongolia
511
- 978-99978:0-4,50-69,700-999
511
+ 978-99978:0-4,50-69,700-999:Mongolia
512
512
  # Honduras
513
- 978-99979:0-3,40-79,800-999
513
+ 978-99979:0-3,40-79,800-999:Honduras
514
514
  # Bhutan
515
- 978-99980:0-0,30-64,700-999
515
+ 978-99980:0-0,30-64,700-999:Bhutan
516
516
  # Macau
517
- 978-99981:0-0,120-149,15-19,200-219,22-74,750-999
517
+ 978-99981:0-0,120-149,15-19,200-219,22-74,750-999:Macau
518
518
  # Benin
519
- 978-99982:0-1,50-71,885-999
519
+ 978-99982:0-1,50-71,885-999:Benin
520
520
  # El Salvador
521
- 978-99983:0-0,35-69,900-999
521
+ 978-99983:0-0,35-69,900-999:El Salvador
522
522
  # Brunei Darussalam
523
- 978-99984:0-0,50-69,950-999
523
+ 978-99984:0-0,50-69,950-999:Brunei Darussalam
524
524
  # Tajikistan
525
- 978-99985:0-1,25-79,800-999
525
+ 978-99985:0-1,25-79,800-999:Tajikistan
526
526
  # Myanmar
527
- 978-99986:0-0,50-69,950-999
527
+ 978-99986:0-0,50-69,950-999:Myanmar
528
528
  # Luxembourg
529
- 978-99987:700-999
529
+ 978-99987:700-999:Luxembourg
530
530
  # Sudan
531
- 978-99988:0-0,50-54,800-824
531
+ 978-99988:0-0,50-54,800-824:Sudan
532
532
  # Paraguay
533
- 978-99989:0-1,50-79,900-999
533
+ 978-99989:0-1,50-79,900-999:Paraguay
534
534
  # Ethiopia
535
- 978-99990:0-0,50-54,975-999
535
+ 978-99990:0-0,50-54,975-999:Ethiopia
536
536
  # Oman
537
- 978-99992:0-1,50-64,950-999
537
+ 978-99992:0-1,50-64,950-999:Oman
538
538
  # Mauritius
539
- 978-99993:0-2,50-54,980-999
539
+ 978-99993:0-2,50-54,980-999:Mauritius
540
540
  # Haiti
541
- 978-99994:0-0,50-52,985-999
541
+ 978-99994:0-0,50-52,985-999:Haiti
542
542
  # Seychelles
543
- 978-99995:50-52,975-999
543
+ 978-99995:50-52,975-999:Seychelles
544
544
  # France
545
- 979-10:00-19,200-699,7000-8999,90000-97599,976000-999999
545
+ 979-10:00-19,200-699,7000-8999,90000-97599,976000-999999:France
546
546
  # Korea, Republic
547
- 979-11:00-24,250-549,5500-8499,85000-94999,950000-999999
547
+ 979-11:00-24,250-549,5500-8499,85000-94999,950000-999999:Korea, Republic
548
548
  # Italy
549
- 979-12:200-299,5450-5999,80000-84999,985000-999999
549
+ 979-12:200-299,5450-5999,80000-84999,985000-999999:Italy
550
550
  # Spain
551
- 979-13:00-00,600-604,7000-7349,87500-89999,990000-999999
551
+ 979-13:00-00,600-604,7000-7349,87500-89999,990000-999999:Spain
552
552
  # United States
553
- 979-8:200-229,230-239,3000-3199,3200-3499,3500-8849,88500-89999,90000-90999,9850000-9899999,9900000-9929999,9985000-9999999
553
+ 979-8:200-229,230-239,3000-3199,3200-3499,3500-8849,88500-89999,90000-90999,9850000-9899999,9900000-9929999,9985000-9999999:United States
@@ -4,6 +4,6 @@
4
4
  # Tue, 13 Aug 2024 06:15:38 BST
5
5
  #
6
6
  # International ISBN Agency
7
- 978:0-5,600-649,65-65,7-7,80-94,950-989,9900-9989,99900-99999
7
+ 978:0-5,600-649,65-65,7-7,80-94,950-989,9900-9989,99900-99999:International ISBN Agency
8
8
  # International ISBN Agency
9
- 979:10-15,8-8
9
+ 979:10-15,8-8:International ISBN Agency
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ISBNRanges
4
+ RANGE_MESSAGE_FILE = "RangeMessage.xml"
5
+ REGISTRATION_GROUP_RANGES_FILE = "registration_group_ranges.txt"
6
+ REGISTRANT_RANGES_FILE = "registrant_ranges.txt"
7
+ RANGE_DATE_FILE = "range_date.txt"
8
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ISBNRanges
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/isbnranges.rb CHANGED
@@ -1,27 +1,34 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "isbnranges/version"
4
-
5
- module ISBNRanges
6
- # class Error < StandardError; end
7
- # Your code goes here...
8
-
9
- extend self
10
-
11
- def load_ranges(range_file)
12
- ranges = {}
13
- File.open(range_file, "r") do |f|
14
- f.each_line do |line|
15
- next if line.start_with?("#")
16
- g, r = line.chomp.split(":")
17
- ranges[g] = r.split(",") unless r.nil?
18
- end
19
- end
20
- ranges
21
- end
22
-
23
- data_dir = __dir__ + "/../data"
24
- REGISTRATION_GROUP_RANGES = load_ranges("#{data_dir}/registration_group_ranges.txt")
25
- REGISTRANT_RANGES = load_ranges("#{data_dir}/registrant_ranges.txt")
26
-
27
- end
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "isbnranges/version"
4
+ require_relative "isbnranges/datafiles"
5
+ require "date"
6
+
7
+ module ISBNRanges
8
+ # class Error < StandardError; end
9
+ # Your code goes here...
10
+
11
+ extend self
12
+
13
+ def load_ranges(range_file)
14
+ ranges = {}
15
+ agencies = {}
16
+ File.open(range_file, "r") do |f|
17
+ f.each_line do |line|
18
+ next if line.start_with?("#")
19
+ g, r, a = line.chomp.split(":")
20
+ ranges[g] = r.split(",") unless r.nil?
21
+ agencies[g] = a unless r.nil?
22
+ end
23
+ end
24
+ [ranges, agencies]
25
+ end
26
+
27
+ data_dir = __dir__ + "/../data"
28
+ registration_group_ranges_file = File.join(data_dir, ISBNRanges::REGISTRATION_GROUP_RANGES_FILE)
29
+ registrant_ranges_file = File.join(data_dir, ISBNRanges::REGISTRANT_RANGES_FILE)
30
+ range_date_file = File.join(data_dir, ISBNRanges::RANGE_DATE_FILE)
31
+ REGISTRATION_GROUP_RANGES, _ = load_ranges(registration_group_ranges_file)
32
+ REGISTRANT_RANGES, REGISTRATION_GROUP_AGENCY = load_ranges(registrant_ranges_file)
33
+ RANGE_DATE = Date.parse(File.read(range_date_file))
34
+ end
@@ -1,14 +1,10 @@
1
1
  # encoding: utf-8
2
2
 
3
+ require_relative "../lib/isbnranges/datafiles"
3
4
  require "nokogiri"
4
5
  require "optparse"
5
6
 
6
7
 
7
- RANGE_MESSAGE_FILE = "RangeMessage.xml"
8
- REGISTRATION_GROUP_RANGES_FILE = "registration_group_ranges.txt"
9
- REGISTRANT_RANGES_FILE = "registrant_ranges.txt"
10
-
11
-
12
8
  def main
13
9
  options = {
14
10
  dir: "."
@@ -19,7 +15,7 @@ def main
19
15
  }
20
16
  opts.parse!
21
17
 
22
- doc = File.open(RANGE_MESSAGE_FILE, "r"){|f| Nokogiri::XML(f) }
18
+ doc = File.open(ISBNRanges::RANGE_MESSAGE_FILE, "r"){|f| Nokogiri::XML(f) }
23
19
 
24
20
  metadata = {
25
21
  source: doc.xpath("//MessageSource").text,
@@ -31,14 +27,19 @@ def main
31
27
 
32
28
  output_range_file(
33
29
  registration_groups,
34
- File.join(options[:dir], REGISTRATION_GROUP_RANGES_FILE),
30
+ File.join(options[:dir], ISBNRanges::REGISTRATION_GROUP_RANGES_FILE),
35
31
  metadata
36
32
  )
37
33
  output_range_file(
38
34
  registrants,
39
- File.join(options[:dir], REGISTRANT_RANGES_FILE),
35
+ File.join(options[:dir], ISBNRanges::REGISTRANT_RANGES_FILE),
40
36
  metadata
41
37
  )
38
+ range_date_file = File.join(options[:dir], ISBNRanges::RANGE_DATE_FILE)
39
+ File.open(range_date_file, "w") do |f|
40
+ f.puts metadata[:date]
41
+ end
42
+ $stderr.puts "Generated: #{range_date_file}"
42
43
  end
43
44
 
44
45
  def extract_ranges(nodes)
@@ -71,7 +72,7 @@ def output_range_file(ranges, range_file, metadata)
71
72
  f.puts "#"
72
73
  ranges.each do |range|
73
74
  f.puts "# " + range["agency"]
74
- f.puts range["prefix"] + ":" + range["ranges"].join(",")
75
+ f.puts [range["prefix"], range["ranges"].join(","), range["agency"]].join(":")
75
76
  end
76
77
  end
77
78
  $stderr.puts "Generated: #{range_file}"
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: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - takatoh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-13 00:00:00.000000000 Z
11
+ date: 2024-08-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -18,16 +18,20 @@ extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
20
  - ".rspec"
21
+ - LICENSE.txt
21
22
  - README.md
22
23
  - Rakefile
24
+ - data/range_date.txt
23
25
  - data/registrant_ranges.txt
24
26
  - data/registration_group_ranges.txt
25
27
  - lib/isbnranges.rb
28
+ - lib/isbnranges/datafiles.rb
26
29
  - lib/isbnranges/version.rb
27
30
  - scripts/generate_range_files.rb
28
31
  - sig/isbnranges.rbs
29
- homepage: https://github.com/takatoh/isbnranges
30
- licenses: []
32
+ homepage: https://github.com/takatoh/ISBNRanges
33
+ licenses:
34
+ - MIT
31
35
  metadata: {}
32
36
  post_install_message:
33
37
  rdoc_options: []