isbnranges 2024.9 → 2024.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +22 -22
- data/README.md +72 -72
- data/data/range_date.txt +1 -1
- data/data/registrant_ranges.txt +557 -553
- data/data/registration_group_ranges.txt +9 -9
- data/lib/isbnranges/version.rb +1 -1
- data/lib/isbnranges.rb +34 -34
- data/scripts/generate_range_files.rb +83 -83
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cf71ca011034cf946ca8d4b40bca39422fd2b25efe97f2c36482c918e9183ee
|
4
|
+
data.tar.gz: 287ff2fc4f21b55f1cddf0c0bf0577df9237d170b1870c33c6ac20bfc298ec5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9409267768774f708731e6c607aae1996c7ea1b672f24b9bb22084933bbb701d2cd4cf450527076c39f937ad713927ceffbd478836b63fb6af04352ad2ade7c4
|
7
|
+
data.tar.gz: 909db7a467a0b48b30c62292ce793203e50775230057289bb85788feb575c6e731afa70f9287a94e4eb001a3d44cc914ddccaceb636caaf239cabb0cbe5dc56d
|
data/LICENSE.txt
CHANGED
@@ -1,22 +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.
|
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,72 +1,72 @@
|
|
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 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
|
11
|
-
|
12
|
-
## Installation
|
13
|
-
|
14
|
-
Install the gem and add to the application's Gemfile by executing:
|
15
|
-
|
16
|
-
$ bundle add isbnranges
|
17
|
-
|
18
|
-
If bundler is not being used to manage dependencies, install the gem by executing:
|
19
|
-
|
20
|
-
$ gem install isbnranges
|
21
|
-
|
22
|
-
## Usage
|
23
|
-
|
24
|
-
After `require "isbnranges"`, you can refer to the following constants.
|
25
|
-
|
26
|
-
- `ISBNRanges::REGISTRATION_GROUP_RANGES`
|
27
|
-
- `ISBNRanges::REGISTRANT_RANGES`
|
28
|
-
|
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.
|
30
|
-
|
31
|
-
- `ISBNRanges::REGISTRATION_GROUP_AGENCY`
|
32
|
-
|
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.
|
34
|
-
|
35
|
-
- `ISBNRanges::RANGE_DATE`
|
36
|
-
|
37
|
-
This constant holds the defined date of the information contained in the range files.
|
38
|
-
|
39
|
-
irb(main):001:0> require "isbnranges"
|
40
|
-
=> true
|
41
|
-
irb(main):002:0> ISBNRanges::REGISTRATION_GROUP_RANGES
|
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"]]}
|
53
|
-
irb(main):003:0> ISBNRanges::REGISTRANT_RANGES["978-4"]
|
54
|
-
=>
|
55
|
-
[["00", "19"],
|
56
|
-
["200", "699"],
|
57
|
-
["7000", "8499"],
|
58
|
-
["85000", "89999"],
|
59
|
-
["900000", "949999"],
|
60
|
-
["9500000", "9999999"]]
|
61
|
-
irb(main):004:0> ISBNRanges::REGISTRATION_GROUP_AGENCY["978-4"]
|
62
|
-
=> "Japan"
|
63
|
-
irb(main):005:0> ISBNRanges::RANGE_DATE
|
64
|
-
=> #<Date: 2024-08-13 ((2460536j,0s,0n),+0s,2299161j)>
|
65
|
-
|
66
|
-
## License
|
67
|
-
|
68
|
-
MIT License
|
69
|
-
|
70
|
-
## Contributing
|
71
|
-
|
72
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/takatoh/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 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 November 2, 2024.
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
|
14
|
+
Install the gem and add to the application's Gemfile by executing:
|
15
|
+
|
16
|
+
$ bundle add isbnranges
|
17
|
+
|
18
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
19
|
+
|
20
|
+
$ gem install isbnranges
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
After `require "isbnranges"`, you can refer to the following constants.
|
25
|
+
|
26
|
+
- `ISBNRanges::REGISTRATION_GROUP_RANGES`
|
27
|
+
- `ISBNRanges::REGISTRANT_RANGES`
|
28
|
+
|
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.
|
30
|
+
|
31
|
+
- `ISBNRanges::REGISTRATION_GROUP_AGENCY`
|
32
|
+
|
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.
|
34
|
+
|
35
|
+
- `ISBNRanges::RANGE_DATE`
|
36
|
+
|
37
|
+
This constant holds the defined date of the information contained in the range files.
|
38
|
+
|
39
|
+
irb(main):001:0> require "isbnranges"
|
40
|
+
=> true
|
41
|
+
irb(main):002:0> ISBNRanges::REGISTRATION_GROUP_RANGES
|
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"]]}
|
53
|
+
irb(main):003:0> ISBNRanges::REGISTRANT_RANGES["978-4"]
|
54
|
+
=>
|
55
|
+
[["00", "19"],
|
56
|
+
["200", "699"],
|
57
|
+
["7000", "8499"],
|
58
|
+
["85000", "89999"],
|
59
|
+
["900000", "949999"],
|
60
|
+
["9500000", "9999999"]]
|
61
|
+
irb(main):004:0> ISBNRanges::REGISTRATION_GROUP_AGENCY["978-4"]
|
62
|
+
=> "Japan"
|
63
|
+
irb(main):005:0> ISBNRanges::RANGE_DATE
|
64
|
+
=> #<Date: 2024-08-13 ((2460536j,0s,0n),+0s,2299161j)>
|
65
|
+
|
66
|
+
## License
|
67
|
+
|
68
|
+
MIT License
|
69
|
+
|
70
|
+
## Contributing
|
71
|
+
|
72
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/takatoh/ISBNRanges.
|
data/data/range_date.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Sat, 2 Nov 2024 08:50:29 GMT
|