isbnranges 2024.9 → 2024.10
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 +555 -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: ecc4a4e32bd78f38df22d94487e3b664e45a8de96d04b24303a1861ecd20ea42
|
4
|
+
data.tar.gz: 2796ef7f10dee05bb5bc4c3c9129aea383ef9d26f32b8c95f83b4fc4711b1b5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ae0d182206e68cee5b542437d2826d4d3bb0dbe58e1dd283fc898c9d4b562e8061923a6716cb9b0a8788f82ebf83e4b52492468ae7196dbd1228a8fcaa68bb8
|
7
|
+
data.tar.gz: cca6020b8d78b5482a898bfd532a5d6a9cf4df392f018ec8a9ab428ca969f58074fe487da0fe0ec4904d731ed0be2130e1b40583ca73913cf0facfd37af168a7
|
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 October 5, 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, 5 Oct 2024 05:57:37 BST
|