isbnranges 0.3.0 → 2024.10

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: 7c21b32ff122bd1e46c7df587c130fe86d28a0d2da68e2c7ed6d6b045bb61c74
4
- data.tar.gz: 60d9978dd4480e5631cce9ebd600dc56d3ceae46bd316b01de77c1b73ab8b6aa
3
+ metadata.gz: ecc4a4e32bd78f38df22d94487e3b664e45a8de96d04b24303a1861ecd20ea42
4
+ data.tar.gz: 2796ef7f10dee05bb5bc4c3c9129aea383ef9d26f32b8c95f83b4fc4711b1b5c
5
5
  SHA512:
6
- metadata.gz: 51c93001c5bb43e2eadefa43d74fbb7a4c97775dd385947e0c81c6103ee1d5d2011011c9e5886314bfddec346b86ad4dfa4658358365d392fa0c3463f655bad1
7
- data.tar.gz: 37779f2c820520e7e9745e8629d879109f18a659b315c919c60057bca890d1e98db20194702b1b65a6ef63f0efbe0664c74b0b3c184bedd13d670e91e7666679
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,70 +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
- ## 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 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
-
29
- - `ISBNRanges::REGISTRATION_GROUP_AGENCY`
30
-
31
- 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
-
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"=>
42
- [["0", "5"],
43
- ["600", "649"],
44
- ["65", "65"],
45
- ["7", "7"],
46
- ["80", "94"],
47
- ["950", "989"],
48
- ["9900", "9989"],
49
- ["99900", "99999"]],
50
- "979"=>[["10", "15"], ["8", "8"]]}
51
- irb(main):003:0> ISBNRanges::REGISTRANT_RANGES["978-4"]
52
- =>
53
- [["00", "19"],
54
- ["200", "699"],
55
- ["7000", "8499"],
56
- ["85000", "89999"],
57
- ["900000", "949999"],
58
- ["9500000", "9999999"]]
59
- irb(main):004:0> ISBNRanges::REGISTRATION_GROUP_AGENCY["978-4"]
60
- => "Japan"
61
- irb(main):005:0> ISBNRanges::RANGE_DATE
62
- => #<Date: 2024-08-13 ((2460536j,0s,0n),+0s,2299161j)>
63
-
64
- ## License
65
-
66
- MIT License
67
-
68
- ## Contributing
69
-
70
- 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
- Tue, 13 Aug 2024 06:15:38 BST
1
+ Sat, 5 Oct 2024 05:57:37 BST