ibe2txt 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ibe2txt +24 -0
- data/{bin → lib}/ibe2txt.rb +2 -23
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eba77d54e58cfcb77aaba10cd36952d0c0a1f0054d86e616e77d188125a9b33d
|
4
|
+
data.tar.gz: a3dbc4175cd96b5da26b8579a9c38b8d72aa0219aecbdc4e2026e4ecd2628db8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e570ddeff64a636f91abf25bfc048cee518640692209cbe164550a95640301fb86285c35212764d22b79fcb6de01f6ea92cab6a4ac67a5c0c85750f40ab03c44
|
7
|
+
data.tar.gz: e55c97189a1f1091a77c0d38131f54190e4bf0a96d0d0e544310064e3fbd9f0c3f0978c2c3b98e69d0c8490d97d001e8ba5dfc1dac3f80a559aa6818edaad300
|
data/bin/ibe2txt
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'ibe2txt'
|
4
|
+
|
5
|
+
begin
|
6
|
+
if !ARGV.empty?
|
7
|
+
if File.exist?(ARGV[0])
|
8
|
+
if File.extname(ARGV[0]) == '.xml'
|
9
|
+
IBE2Txt.new(ARGV[0])
|
10
|
+
else
|
11
|
+
puts 'Not an xml file'
|
12
|
+
puts IBE2Txt::USAGE
|
13
|
+
end
|
14
|
+
else
|
15
|
+
puts 'No such file'
|
16
|
+
puts IBE2Txt::USAGE
|
17
|
+
end
|
18
|
+
else
|
19
|
+
puts IBE2Txt::USAGE
|
20
|
+
end
|
21
|
+
rescue StandardError => e
|
22
|
+
puts e
|
23
|
+
puts IBE2Txt::USAGE
|
24
|
+
end
|
data/{bin → lib}/ibe2txt.rb
RENAMED
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'base64'
|
4
4
|
require 'nokogiri'
|
5
5
|
|
6
6
|
class IBE2Txt
|
7
|
-
USAGE = 'Usage: ibe2txt
|
7
|
+
USAGE = 'Usage: ibe2txt file.xml'
|
8
8
|
|
9
9
|
private
|
10
10
|
|
@@ -34,24 +34,3 @@ class IBE2Txt
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
37
|
-
|
38
|
-
begin
|
39
|
-
if ARGV.size > 1
|
40
|
-
if File.exist?(ARGV[0])
|
41
|
-
if File.extname(ARGV[0]) == '.xml'
|
42
|
-
IBE2Txt.new(ARGV[0])
|
43
|
-
else
|
44
|
-
puts 'Not an xml file'
|
45
|
-
puts IBE2Txt::USAGE
|
46
|
-
end
|
47
|
-
else
|
48
|
-
puts 'No such file'
|
49
|
-
puts IBE2Txt::USAGE
|
50
|
-
end
|
51
|
-
else
|
52
|
-
puts IBE2Txt::USAGE
|
53
|
-
end
|
54
|
-
rescue StandardError => e
|
55
|
-
puts e
|
56
|
-
puts IBE2Txt::USAGE
|
57
|
-
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibe2txt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Ignatenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -27,11 +27,12 @@ dependencies:
|
|
27
27
|
description:
|
28
28
|
email: iignatenko@sfedu.ru
|
29
29
|
executables:
|
30
|
-
- ibe2txt
|
30
|
+
- ibe2txt
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
-
- bin/ibe2txt
|
34
|
+
- bin/ibe2txt
|
35
|
+
- lib/ibe2txt.rb
|
35
36
|
homepage: https://gist.github.com/COOLIRON2311/3d0dee2c63a4c1e8db4785888e26cf14
|
36
37
|
licenses:
|
37
38
|
- GPL-3.0
|