colloquy_log_to_text 1.2 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/colloquy_log_to_text +18 -2
- data/lib/colloquy_log_to_text.rb +1 -1
- data/lib/colloquy_log_to_text/version.rb +1 -1
- metadata +15 -16
- data/lib/colloquy_log_to_text/parse_args.rb +0 -25
data/bin/colloquy_log_to_text
CHANGED
@@ -1,11 +1,27 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'trollop'
|
4
|
+
|
3
5
|
$:.push File.expand_path("../lib/", __FILE__)
|
4
6
|
|
5
7
|
require 'colloquy_log_to_text'
|
6
8
|
|
7
|
-
|
9
|
+
opts = Trollop::options do
|
10
|
+
version "colloquy_log_to_text #{ColloquyLogToText.version} (c) 2011 Mark Szymanski"
|
11
|
+
banner <<-EOS
|
12
|
+
colloquy_log_to_text is a simple program to convert Colloquy's awful XML logs into plain text.
|
13
|
+
|
14
|
+
Usage:
|
15
|
+
colloquy_log_to_text [options] <filenames>+
|
16
|
+
|
17
|
+
Note that each file given must be a .colloquyTranscript file.
|
18
|
+
|
19
|
+
Where [options] are:
|
20
|
+
EOS
|
21
|
+
end
|
8
22
|
|
9
|
-
|
23
|
+
ARGV.each do |file|
|
24
|
+
ColloquyLogToText.convert(file)
|
25
|
+
end
|
10
26
|
|
11
27
|
exit 0
|
data/lib/colloquy_log_to_text.rb
CHANGED
metadata
CHANGED
@@ -1,11 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: colloquy_log_to_text
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 2
|
8
|
-
version: "1.2"
|
4
|
+
prerelease:
|
5
|
+
version: 1.2.1
|
9
6
|
platform: ruby
|
10
7
|
authors:
|
11
8
|
- Mark Szymanski
|
@@ -13,8 +10,7 @@ autorequire:
|
|
13
10
|
bindir: bin
|
14
11
|
cert_chain: []
|
15
12
|
|
16
|
-
date: 2011-
|
17
|
-
default_executable:
|
13
|
+
date: 2011-04-08 00:00:00 Z
|
18
14
|
dependencies:
|
19
15
|
- !ruby/object:Gem::Dependency
|
20
16
|
name: nokogiri
|
@@ -24,11 +20,20 @@ dependencies:
|
|
24
20
|
requirements:
|
25
21
|
- - ">="
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 0
|
29
23
|
version: "0"
|
30
24
|
type: :runtime
|
31
25
|
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: trollop
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "0"
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id002
|
32
37
|
description: A simple gem to convert Colloquy's awful XML logs into plain text.
|
33
38
|
email: mrman208@me.com
|
34
39
|
executables:
|
@@ -41,10 +46,8 @@ files:
|
|
41
46
|
- README.md
|
42
47
|
- lib/colloquy_log_to_text/colloquy_log_to_text.rb
|
43
48
|
- lib/colloquy_log_to_text/version.rb
|
44
|
-
- lib/colloquy_log_to_text/parse_args.rb
|
45
49
|
- lib/colloquy_log_to_text.rb
|
46
50
|
- bin/colloquy_log_to_text
|
47
|
-
has_rdoc: true
|
48
51
|
homepage: http://github.com/mrman208/colloquy_log_to_text
|
49
52
|
licenses: []
|
50
53
|
|
@@ -58,21 +61,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
58
61
|
requirements:
|
59
62
|
- - ">="
|
60
63
|
- !ruby/object:Gem::Version
|
61
|
-
segments:
|
62
|
-
- 0
|
63
64
|
version: "0"
|
64
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
66
|
none: false
|
66
67
|
requirements:
|
67
68
|
- - ">="
|
68
69
|
- !ruby/object:Gem::Version
|
69
|
-
segments:
|
70
|
-
- 0
|
71
70
|
version: "0"
|
72
71
|
requirements: []
|
73
72
|
|
74
73
|
rubyforge_project:
|
75
|
-
rubygems_version: 1.
|
74
|
+
rubygems_version: 1.7.1
|
76
75
|
signing_key:
|
77
76
|
specification_version: 3
|
78
77
|
summary: A simple gem to convert Colloquy's awful XML logs into plain text.
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'colloquy_log_to_text/version'
|
2
|
-
|
3
|
-
class ColloquyLogToText
|
4
|
-
def self.parse_args(args)
|
5
|
-
argc = args.count
|
6
|
-
if argc < 1
|
7
|
-
puts "Error: No Colloquy log files specified."
|
8
|
-
exit 1
|
9
|
-
end
|
10
|
-
|
11
|
-
for arg in args
|
12
|
-
case arg
|
13
|
-
when "-h"
|
14
|
-
puts "Usage: colloquy_log_to_text [-h] <LOGFILE> [[LOGFILE2]...]"
|
15
|
-
puts "The log file specified (.colloquyTranscript) will then be converted into plain text."
|
16
|
-
puts "The -h option is used to display this help message."
|
17
|
-
exit 0
|
18
|
-
when "-v"
|
19
|
-
puts ColloquyLogToText.version
|
20
|
-
else
|
21
|
-
ColloquyLogToText.convert(arg)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|