pkm_level2_converter 0.1.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +56 -10
- data/.rspec +3 -3
- data/.rspec_status +5 -5
- data/.rubocop.yml +6 -0
- data/.ruby-version +1 -0
- data/Gemfile +15 -9
- data/Gemfile.lock +76 -38
- data/LICENSE.txt +21 -21
- data/README.md +27 -27
- data/Rakefile +8 -8
- data/bin/console +15 -15
- data/bin/setup +8 -8
- data/exe/pkmlevel2 +21 -22
- data/lib/pkm_level2_converter/ka/pkm/1/XML-Schema_PKM.xsd +2847 -2847
- data/lib/pkm_level2_converter/ka/pkm/1/XML-Schema_PKM_TX.xsd +221 -221
- data/lib/pkm_level2_converter/ka/pkm/2/XML-Schema_PKM.xsd +4082 -4082
- data/lib/pkm_level2_converter/ka/pkm/2/XML-Schema_PKM.xsd.MD5 +1 -1
- data/lib/pkm_level2_converter/ka/pkm/2/XML-Schema_PKM_TX.xsd +178 -178
- data/lib/pkm_level2_converter/ka/pkm/2/XML-Schema_PKM_TX.xsd.MD5 +1 -1
- data/lib/pkm_level2_converter/pkm.rb +58 -0
- data/lib/pkm_level2_converter/pkm_xml.rb +202 -0
- data/lib/pkm_level2_converter/pools.rb +97 -0
- data/lib/pkm_level2_converter/types.rb +114 -0
- data/lib/pkm_level2_converter/version.rb +5 -5
- data/lib/pkm_level2_converter.rb +11 -107
- data/pkm_level2_converter.gemspec +38 -39
- metadata +16 -39
- data/lib/conv_PV_KM.rb +0 -75
- data/lib/conv_RN_TM.rb +0 -73
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0e7cdd1a8e931f81609cb5a491c2965dc7f41f832d8deeef05a9e376a51823e
|
4
|
+
data.tar.gz: 14bb0a173065b8ec5ad70d31fa08cd51277ec43a1db4aa55a668f8f56ea81918
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a7aee378ff844b47471c3bed0a3be3540cd18e67bdf3c9834ad35c086f97ece16465fcd5a12ded5dbed7f516af2048ad8e50f70f0f48fcde949944667eaf7f1
|
7
|
+
data.tar.gz: 8702a37edb2b599454c29af373cae770e6ffbccce6c8f998c0b20c352841f29623486332709593c276ff16eec614c77aa6e38413aa76520b288f557dcb8e1d9f
|
data/.gitignore
CHANGED
@@ -1,10 +1,56 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
/.
|
4
|
-
|
5
|
-
/
|
6
|
-
/
|
7
|
-
/
|
8
|
-
/
|
9
|
-
/
|
10
|
-
/
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
# Ignore Byebug command history file.
|
17
|
+
.byebug_history
|
18
|
+
|
19
|
+
## Specific to RubyMotion:
|
20
|
+
.dat*
|
21
|
+
.repl_history
|
22
|
+
build/
|
23
|
+
*.bridgesupport
|
24
|
+
build-iPhoneOS/
|
25
|
+
build-iPhoneSimulator/
|
26
|
+
|
27
|
+
## Specific to RubyMotion (use of CocoaPods):
|
28
|
+
#
|
29
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
30
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
31
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
32
|
+
#
|
33
|
+
# vendor/Pods/
|
34
|
+
|
35
|
+
## Documentation cache and generated files:
|
36
|
+
/.yardoc/
|
37
|
+
/_yardoc/
|
38
|
+
/doc/
|
39
|
+
/rdoc/
|
40
|
+
|
41
|
+
## Environment normalization:
|
42
|
+
/.bundle/
|
43
|
+
/vendor/bundle
|
44
|
+
/lib/bundler/man/
|
45
|
+
|
46
|
+
# for a library or gem, you might want to ignore these files since the code is
|
47
|
+
# intended to run in multiple environments; otherwise, check them in:
|
48
|
+
# Gemfile.lock
|
49
|
+
# .ruby-version
|
50
|
+
# .ruby-gemset
|
51
|
+
|
52
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
53
|
+
.rvmrc
|
54
|
+
|
55
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
56
|
+
# .rubocop-https?--*
|
data/.rspec
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
--format documentation
|
2
|
-
--color
|
3
|
-
--require spec_helper
|
1
|
+
--format documentation
|
2
|
+
--color
|
3
|
+
--require spec_helper
|
data/.rspec_status
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
example_id | status | run_time |
|
2
|
-
------------------------------------------ | ------ | --------------- |
|
3
|
-
./spec/pkm_level2_converter_spec.rb[1:1] | passed | 0.00408 seconds |
|
4
|
-
./spec/pkm_level2_converter_spec.rb[1:2:1] | passed | 0.00323 seconds |
|
5
|
-
./spec/pkm_level2_converter_spec.rb[1:3:1] | passed | 0.0001 seconds |
|
1
|
+
example_id | status | run_time |
|
2
|
+
------------------------------------------ | ------ | --------------- |
|
3
|
+
./spec/pkm_level2_converter_spec.rb[1:1] | passed | 0.00408 seconds |
|
4
|
+
./spec/pkm_level2_converter_spec.rb[1:2:1] | passed | 0.00323 seconds |
|
5
|
+
./spec/pkm_level2_converter_spec.rb[1:3:1] | passed | 0.0001 seconds |
|
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.2
|
data/Gemfile
CHANGED
@@ -1,9 +1,15 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in pkm_level2_converter.gemspec
|
6
|
-
gemspec
|
7
|
-
|
8
|
-
gem
|
9
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in pkm_level2_converter.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem 'nokogiri'
|
9
|
+
|
10
|
+
group :development do
|
11
|
+
gem 'pry'
|
12
|
+
gem 'rake', '~> 13.0'
|
13
|
+
gem 'rspec'
|
14
|
+
gem 'rubocop', require: false
|
15
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,38 +1,76 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
pkm_level2_converter (0.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
pkm_level2_converter (0.3.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.2)
|
10
|
+
coderay (1.1.3)
|
11
|
+
diff-lcs (1.5.0)
|
12
|
+
json (2.6.3)
|
13
|
+
language_server-protocol (3.17.0.3)
|
14
|
+
method_source (1.0.0)
|
15
|
+
mini_portile2 (2.8.2)
|
16
|
+
nokogiri (1.15.3)
|
17
|
+
mini_portile2 (~> 2.8.2)
|
18
|
+
racc (~> 1.4)
|
19
|
+
parallel (1.23.0)
|
20
|
+
parser (3.2.2.3)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
racc
|
23
|
+
pry (0.14.2)
|
24
|
+
coderay (~> 1.1)
|
25
|
+
method_source (~> 1.0)
|
26
|
+
racc (1.7.1)
|
27
|
+
rainbow (3.1.1)
|
28
|
+
rake (13.0.6)
|
29
|
+
regexp_parser (2.8.1)
|
30
|
+
rexml (3.2.5)
|
31
|
+
rspec (3.12.0)
|
32
|
+
rspec-core (~> 3.12.0)
|
33
|
+
rspec-expectations (~> 3.12.0)
|
34
|
+
rspec-mocks (~> 3.12.0)
|
35
|
+
rspec-core (3.12.2)
|
36
|
+
rspec-support (~> 3.12.0)
|
37
|
+
rspec-expectations (3.12.3)
|
38
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
39
|
+
rspec-support (~> 3.12.0)
|
40
|
+
rspec-mocks (3.12.5)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.12.0)
|
43
|
+
rspec-support (3.12.1)
|
44
|
+
rubocop (1.54.1)
|
45
|
+
json (~> 2.3)
|
46
|
+
language_server-protocol (>= 3.17.0)
|
47
|
+
parallel (~> 1.10)
|
48
|
+
parser (>= 3.2.2.3)
|
49
|
+
rainbow (>= 2.2.2, < 4.0)
|
50
|
+
regexp_parser (>= 1.8, < 3.0)
|
51
|
+
rexml (>= 3.2.5, < 4.0)
|
52
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
53
|
+
ruby-progressbar (~> 1.7)
|
54
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
55
|
+
rubocop-ast (1.29.0)
|
56
|
+
parser (>= 3.2.1.0)
|
57
|
+
ruby-progressbar (1.13.0)
|
58
|
+
unicode-display_width (2.4.2)
|
59
|
+
|
60
|
+
PLATFORMS
|
61
|
+
x64-mingw32
|
62
|
+
x64-unknown
|
63
|
+
x86_64-darwin
|
64
|
+
x86_64-darwin-21
|
65
|
+
x86_64-linux
|
66
|
+
|
67
|
+
DEPENDENCIES
|
68
|
+
nokogiri
|
69
|
+
pkm_level2_converter!
|
70
|
+
pry
|
71
|
+
rake (~> 13.0)
|
72
|
+
rspec
|
73
|
+
rubocop
|
74
|
+
|
75
|
+
BUNDLED WITH
|
76
|
+
2.4.16
|
data/LICENSE.txt
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2021 Francis Doege
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 Francis Doege
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
# PkmLevel2Converter
|
2
|
-
|
3
|
-
## Installation
|
4
|
-
|
5
|
-
Install it yourself as:
|
6
|
-
```bash
|
7
|
-
$ gem install pkm_level2_converter
|
8
|
-
```
|
9
|
-
|
10
|
-
## Usage
|
11
|
-
```bash
|
12
|
-
$ pkmlevel2 DLKM_1234_G210801_0000_E1_1_1.3_SuperVU.xml
|
13
|
-
```
|
14
|
-
|
15
|
-
## Development
|
16
|
-
|
17
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
18
|
-
|
19
|
-
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).
|
20
|
-
|
21
|
-
## Contributing
|
22
|
-
|
23
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/justusjonas74/pkm_level2_converter.
|
24
|
-
|
25
|
-
## License
|
26
|
-
|
27
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
1
|
+
# PkmLevel2Converter
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Install it yourself as:
|
6
|
+
```bash
|
7
|
+
$ gem install pkm_level2_converter
|
8
|
+
```
|
9
|
+
|
10
|
+
## Usage
|
11
|
+
```bash
|
12
|
+
$ pkmlevel2 DLKM_1234_G210801_0000_E1_1_1.3_SuperVU.xml
|
13
|
+
```
|
14
|
+
|
15
|
+
## Development
|
16
|
+
|
17
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
18
|
+
|
19
|
+
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).
|
20
|
+
|
21
|
+
## Contributing
|
22
|
+
|
23
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/justusjonas74/pkm_level2_converter.
|
24
|
+
|
25
|
+
## License
|
26
|
+
|
27
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require
|
4
|
-
require
|
5
|
-
|
6
|
-
RSpec::Core::RakeTask.new(:spec)
|
7
|
-
|
8
|
-
task default: :spec
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
7
|
+
|
8
|
+
task default: :spec
|
data/bin/console
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require
|
5
|
-
require
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require
|
15
|
-
IRB.start(__FILE__)
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'pkm_level2_converter'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
set -euo pipefail
|
3
|
-
IFS=$'\n\t'
|
4
|
-
set -vx
|
5
|
-
|
6
|
-
bundle install
|
7
|
-
|
8
|
-
# Do any other automated setup that you need to do here
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
set -euo pipefail
|
3
|
+
IFS=$'\n\t'
|
4
|
+
set -vx
|
5
|
+
|
6
|
+
bundle install
|
7
|
+
|
8
|
+
# Do any other automated setup that you need to do here
|
data/exe/pkmlevel2
CHANGED
@@ -1,22 +1,21 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
else
|
10
|
-
arr_of_local_xml = Dir[
|
11
|
-
if arr_of_local_xml.empty?
|
12
|
-
puts
|
13
|
-
puts
|
14
|
-
else
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'pkm_level2_converter'
|
5
|
+
|
6
|
+
if ARGV.first
|
7
|
+
PkmLevel2Converter::PKMXml.new(ARGV.first).save_as_level2
|
8
|
+
|
9
|
+
else
|
10
|
+
arr_of_local_xml = Dir['*.xml']
|
11
|
+
if arr_of_local_xml.empty?
|
12
|
+
puts 'Error: No .xml file found.'
|
13
|
+
puts 'Usage "pkmlevel2 filename.xml"'
|
14
|
+
else
|
15
|
+
arr_of_local_xml.each do |xml_file|
|
16
|
+
PkmLevel2Converter::PKMXml.new(xml_file).save_as_level2
|
17
|
+
end
|
18
|
+
end
|
19
|
+
puts 'Press ENTER to close.'
|
20
|
+
gets
|
21
|
+
end
|