openlogcleaner 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/Rakefile +56 -0
- data/VERSION +1 -0
- data/bin/openlogcleaner +51 -0
- data/lib/openlogcleaner/document.rb +16 -0
- data/lib/openlogcleaner/dokuwiki_formatter.rb +8 -0
- data/lib/openlogcleaner/emote.rb +28 -0
- data/lib/openlogcleaner/formatter.rb +13 -0
- data/lib/openlogcleaner/html_document.rb +72 -0
- data/lib/openlogcleaner/html_formatter.rb +8 -0
- data/lib/openlogcleaner/message.rb +15 -0
- data/lib/openlogcleaner/old_html_document.rb +34 -0
- data/lib/openlogcleaner/rpol_document.rb +102 -0
- data/lib/openlogcleaner/say.rb +26 -0
- data/lib/openlogcleaner/templates/dokuwiki_formatter.mustache +22 -0
- data/lib/openlogcleaner/templates/html_formatter.mustache +35 -0
- data/lib/openlogcleaner.rb +0 -0
- data/openlogcleaner.gemspec +77 -0
- data/spec/openlogcleaner_spec.rb +7 -0
- data/spec/spec_helper.rb +8 -0
- metadata +125 -0
data/.document
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Jonathan Stott
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
= openlogcleaner
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Note on Patches/Pull Requests
|
6
|
+
|
7
|
+
* Fork the project.
|
8
|
+
* Make your feature addition or bug fix.
|
9
|
+
* Add tests for it. This is important so I don't break it in a
|
10
|
+
future version unintentionally.
|
11
|
+
* Commit, do not mess with rakefile, version, or history.
|
12
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
13
|
+
* Send me a pull request. Bonus points for topic branches.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2010 Jonathan Stott. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "openlogcleaner"
|
8
|
+
gem.summary = %Q{Cleans you some open logs}
|
9
|
+
gem.description = %Q{Cleans you some open logs\n\nFor Great Justice!}
|
10
|
+
gem.email = "jonathan.stott@gmail.com"
|
11
|
+
gem.homepage = "http://github.com/namelessjon/openlogcleaner"
|
12
|
+
gem.authors = ["Jonathan Stott"]
|
13
|
+
gem.add_dependency "mustache"
|
14
|
+
gem.add_dependency "nokogiri"
|
15
|
+
gem.add_dependency "trollop"
|
16
|
+
gem.add_development_dependency "bacon", ">= 0"
|
17
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
18
|
+
end
|
19
|
+
Jeweler::GemcutterTasks.new
|
20
|
+
rescue LoadError
|
21
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
22
|
+
end
|
23
|
+
|
24
|
+
require 'rake/testtask'
|
25
|
+
Rake::TestTask.new(:spec) do |spec|
|
26
|
+
spec.libs << 'lib' << 'spec'
|
27
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
28
|
+
spec.verbose = true
|
29
|
+
end
|
30
|
+
|
31
|
+
begin
|
32
|
+
require 'rcov/rcovtask'
|
33
|
+
Rcov::RcovTask.new do |spec|
|
34
|
+
spec.libs << 'spec'
|
35
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
36
|
+
spec.verbose = true
|
37
|
+
end
|
38
|
+
rescue LoadError
|
39
|
+
task :rcov do
|
40
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
task :spec => :check_dependencies
|
45
|
+
|
46
|
+
task :default => :spec
|
47
|
+
|
48
|
+
require 'rake/rdoctask'
|
49
|
+
Rake::RDocTask.new do |rdoc|
|
50
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
51
|
+
|
52
|
+
rdoc.rdoc_dir = 'rdoc'
|
53
|
+
rdoc.title = "openlogcleaner #{version}"
|
54
|
+
rdoc.rdoc_files.include('README*')
|
55
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
56
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.22
|
data/bin/openlogcleaner
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# Jonathan D. Stott <jonathan.stott@gmail.com>
|
3
|
+
require 'trollop'
|
4
|
+
require 'openlogcleaner/html_document'
|
5
|
+
require 'openlogcleaner/old_html_document'
|
6
|
+
require 'openlogcleaner/rpol_document'
|
7
|
+
require 'openlogcleaner/html_formatter'
|
8
|
+
require 'openlogcleaner/dokuwiki_formatter'
|
9
|
+
|
10
|
+
opts = Trollop::options do
|
11
|
+
opt :title, "Log title", :type => :string
|
12
|
+
opt :input_format, "Input format", :default => 'html'
|
13
|
+
opt :format, "Output Format", :default => 'html'
|
14
|
+
opt :output, "Output File (STDOUT otherwise)", :type => :string
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
formatter = case opts[:format]
|
19
|
+
when /html/i
|
20
|
+
OpenLogCleaner::HtmlFormatter
|
21
|
+
when /doku/i
|
22
|
+
OpenLogCleaner::DokuwikiFormatter
|
23
|
+
else
|
24
|
+
warn "Unknown format '#{opts[:format]}'"
|
25
|
+
exit 1
|
26
|
+
end
|
27
|
+
|
28
|
+
parser = case opts[:input_format]
|
29
|
+
when /html/i
|
30
|
+
OpenLogCleaner::HtmlDocument
|
31
|
+
when /old/i
|
32
|
+
OpenLogCleaner::OldHtmlDocument
|
33
|
+
when /rpol/i
|
34
|
+
OpenLogCleaner::RpolDocument
|
35
|
+
else
|
36
|
+
warn "Unknown input format '#{opts[:input_format]}'"
|
37
|
+
exit 1
|
38
|
+
end
|
39
|
+
|
40
|
+
@doc = parser.new(opts[:title])
|
41
|
+
@doc.add_io(ARGF)
|
42
|
+
|
43
|
+
|
44
|
+
unless opts[:output]
|
45
|
+
begin
|
46
|
+
puts formatter.format(@doc)
|
47
|
+
rescue Errno::EPIPE
|
48
|
+
end
|
49
|
+
else
|
50
|
+
File.open(opts[:output], "w") { |f| f.puts formatter.format(@doc) }
|
51
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# Jonathan D. Stott <jonathan.stott@gmail.com>
|
3
|
+
require 'openlogcleaner/say'
|
4
|
+
require 'openlogcleaner/emote'
|
5
|
+
module OpenLogCleaner
|
6
|
+
class Document
|
7
|
+
attr_accessor :title, :messages, :files
|
8
|
+
|
9
|
+
def initialize(title=nil, count_id=true)
|
10
|
+
@title = title
|
11
|
+
@count_id = count_id
|
12
|
+
@id_counter = 0
|
13
|
+
@messages = []
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# Jonathan D. Stott <jonathan.stott@gmail.com>
|
3
|
+
require 'openlogcleaner/message'
|
4
|
+
|
5
|
+
module OpenLogCleaner
|
6
|
+
# <div class='emote'><font color='#008000'>** <span class='name'>(3) Amayria</span> <font color='#008000'>steals some.</font> **</font></div>
|
7
|
+
class Emote < Message
|
8
|
+
def css
|
9
|
+
is_ooc? ? 'ooc' : 'emote'
|
10
|
+
end
|
11
|
+
|
12
|
+
def id
|
13
|
+
count
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.from_html(msg)
|
17
|
+
nick = msg.at('span').inner_text.sub(/^\(\d+\)\s+/, '')
|
18
|
+
msg.at('span').inner_html = nick
|
19
|
+
color = msg.at('font')[:color]
|
20
|
+
text = msg.at('font font').inner_html
|
21
|
+
new(nick, text, color)
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.from_hash(msg)
|
25
|
+
new(msg[:nick], msg[:text], msg[:color])
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# Jonathan D. Stott <jonathan.stott@gmail.com>
|
3
|
+
require 'mustache'
|
4
|
+
|
5
|
+
module OpenLogCleaner
|
6
|
+
class Formatter < ::Mustache
|
7
|
+
self.template_path = File.join(File.dirname(__FILE__), 'templates')
|
8
|
+
|
9
|
+
def self.format(context)
|
10
|
+
render(template, context)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# Jonathan D. Stott <jonathan.stott@gmail.com>
|
3
|
+
require 'nokogiri'
|
4
|
+
require 'openlogcleaner/document'
|
5
|
+
|
6
|
+
module OpenLogCleaner
|
7
|
+
class HtmlDocument < Document
|
8
|
+
def add_file(file)
|
9
|
+
File.open(file) { |f| add_io(f) }
|
10
|
+
end
|
11
|
+
|
12
|
+
def add_io(io)
|
13
|
+
doc = Nokogiri.parse(io)
|
14
|
+
add_messages(doc)
|
15
|
+
end
|
16
|
+
|
17
|
+
def replace_brs(doc)
|
18
|
+
doc.css('br').each do |br|
|
19
|
+
br.name = "<br />"
|
20
|
+
end
|
21
|
+
doc
|
22
|
+
end
|
23
|
+
|
24
|
+
def add_messages(doc)
|
25
|
+
doc.css('div').each do |msg|
|
26
|
+
begin
|
27
|
+
case msg['class']
|
28
|
+
when 'post'
|
29
|
+
add_post(msg)
|
30
|
+
when 'emote'
|
31
|
+
add_emote(msg)
|
32
|
+
when 'info', 'system'
|
33
|
+
next
|
34
|
+
else
|
35
|
+
# warn about an unknown div, unless it's the container div, which is
|
36
|
+
# element conversations get wrapped in by this code.
|
37
|
+
# This allows multiple passes, should this code be updated.
|
38
|
+
raise "Unknown div class '#{msg['class']}'" unless msg['id'] == 'container'
|
39
|
+
end
|
40
|
+
rescue Exception => e
|
41
|
+
warn msg.inspect
|
42
|
+
raise e
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def add_post(msg)
|
48
|
+
return if msg.children.first.name == 'font' # deal with system messages
|
49
|
+
return if msg.at('table') # deal with welcome messages
|
50
|
+
|
51
|
+
# fix the nick
|
52
|
+
add_message(Say.from_html(msg))
|
53
|
+
end
|
54
|
+
|
55
|
+
def add_emote(msg)
|
56
|
+
add_message(Emote.from_html(msg))
|
57
|
+
end
|
58
|
+
def add_message(msg)
|
59
|
+
messages << add_count(msg)
|
60
|
+
end
|
61
|
+
|
62
|
+
def add_count(msg)
|
63
|
+
if @count_id
|
64
|
+
@id_counter = @id_counter + 1
|
65
|
+
msg.count = @id_counter
|
66
|
+
msg
|
67
|
+
else
|
68
|
+
msg
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# Jonathan D. Stott <jonathan.stott@gmail.com>
|
3
|
+
module OpenLogCleaner
|
4
|
+
Message = ::Struct.new(:nick, :content, :color, :count)
|
5
|
+
|
6
|
+
class Message
|
7
|
+
def is_ooc?
|
8
|
+
content =~ /^\(\(?[^)]+\)\)?/ or content =~ /^\[\d+d/
|
9
|
+
end
|
10
|
+
|
11
|
+
def style
|
12
|
+
"color: #{color};"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# Jonathan D. Stott <jonathan.stott@gmail.com>
|
3
|
+
require 'openlogcleaner/document'
|
4
|
+
require 'nokogiri'
|
5
|
+
|
6
|
+
module OpenLogCleaner
|
7
|
+
class OldHtmlDocument < Document
|
8
|
+
def add_io(io)
|
9
|
+
contents = Nokogiri.parse(io)
|
10
|
+
add_messages(contents)
|
11
|
+
end
|
12
|
+
|
13
|
+
def add_messages(contents)
|
14
|
+
elems = contents.at('body').elements.to_a
|
15
|
+
until elems.empty?
|
16
|
+
nick, font, br = elems.shift, elems.shift, elems.shift
|
17
|
+
|
18
|
+
# deal with system messages, I hope!
|
19
|
+
if nick.name == 'font' and font.name == 'br'
|
20
|
+
elems.unshift br
|
21
|
+
next
|
22
|
+
end
|
23
|
+
|
24
|
+
# sanity check:
|
25
|
+
raise "Oooops. #{nick.inspect} #{font.inspect} #{br.inspect}" unless (nick.name == 'b') and (font.name == 'font') and (br.nil? or br.name == 'br')
|
26
|
+
|
27
|
+
nick = nick.inner_text
|
28
|
+
color = font['color']
|
29
|
+
text = font.inner_html
|
30
|
+
messages << Say.new(nick, text, color)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# Jonathan D. Stott <jonathan.stott@gmail.com>
|
3
|
+
require 'openlogcleaner/document'
|
4
|
+
require 'nokogiri'
|
5
|
+
|
6
|
+
module OpenLogCleaner
|
7
|
+
class RpolDocument < Document
|
8
|
+
#/(?:Re:\s*)?(\w+ #1) by (.+)$/
|
9
|
+
|
10
|
+
def add_io(io)
|
11
|
+
contents = io.read.split(/={10,}/)
|
12
|
+
# remove top and tail
|
13
|
+
contents.pop
|
14
|
+
contents.shift
|
15
|
+
add_messages(contents)
|
16
|
+
end
|
17
|
+
|
18
|
+
def add_messages(contents)
|
19
|
+
contents.each do |message|
|
20
|
+
title, body = message.split(/-{10,}/, 2)
|
21
|
+
nick = extract_nick_and_set_title(title)
|
22
|
+
messages << Say.new(nick, fix_body(body))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def extract_nick_and_set_title(title)
|
27
|
+
title.gsub!('<br />','')
|
28
|
+
title.strip!
|
29
|
+
if title =~ /(?:Re:\s*)?(\w+ #1) by (.+)$/
|
30
|
+
self.title = $1
|
31
|
+
$2 # return the nick
|
32
|
+
else
|
33
|
+
raise ArgumentError, "Not a valid title string"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def fix_body(body)
|
38
|
+
# avoid unicode issues by making a normal space
|
39
|
+
body.gsub!(' ',' ')
|
40
|
+
# make lots of dashes into a hr
|
41
|
+
body.gsub!(/-{6,}/,'<hr />')
|
42
|
+
doc = Nokogiri::HTML.parse(body)
|
43
|
+
|
44
|
+
# remove edit info
|
45
|
+
doc.css('p.messsage_information').remove
|
46
|
+
|
47
|
+
# trim the first br
|
48
|
+
doc.at('body').children.at('br').remove
|
49
|
+
|
50
|
+
# fix font tags
|
51
|
+
doc.search('font').each do |font|
|
52
|
+
font.name = 'span'
|
53
|
+
end
|
54
|
+
# convert back to HTML
|
55
|
+
text = doc.at('body').children.to_xhtml
|
56
|
+
# fix trailing brs
|
57
|
+
text.gsub!(/(\s*<br \/>)+\z/m, '')
|
58
|
+
text
|
59
|
+
end
|
60
|
+
|
61
|
+
def extra_css
|
62
|
+
<<-CSS
|
63
|
+
.red {
|
64
|
+
color : #ff0000;
|
65
|
+
}
|
66
|
+
.orange {
|
67
|
+
color : #ff6600;
|
68
|
+
}
|
69
|
+
.aqua {
|
70
|
+
color : #339999;
|
71
|
+
}
|
72
|
+
.blue {
|
73
|
+
color : #0000ff;
|
74
|
+
}
|
75
|
+
.darkblue {
|
76
|
+
color : #000099;
|
77
|
+
}
|
78
|
+
.green {
|
79
|
+
color : #009900;
|
80
|
+
}
|
81
|
+
.darkgreen {
|
82
|
+
color : #006600;
|
83
|
+
}
|
84
|
+
.brown {
|
85
|
+
color : #663300;
|
86
|
+
}
|
87
|
+
.purple {
|
88
|
+
color : #990099;
|
89
|
+
}
|
90
|
+
.yellow {
|
91
|
+
color : #cc9933;
|
92
|
+
}
|
93
|
+
.pink {
|
94
|
+
color : #cc66cc;
|
95
|
+
}
|
96
|
+
.invis {
|
97
|
+
color: #000000;
|
98
|
+
}
|
99
|
+
CSS
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# Jonathan D. Stott <jonathan.stott@gmail.com>
|
3
|
+
require 'openlogcleaner/message'
|
4
|
+
|
5
|
+
module OpenLogCleaner
|
6
|
+
class Say < Message
|
7
|
+
def css
|
8
|
+
is_ooc? ? 'ooc' : 'say'
|
9
|
+
end
|
10
|
+
|
11
|
+
def style
|
12
|
+
color ? "color: #{color};" : nil
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.from_html(msg)
|
16
|
+
nick = msg.at('b').inner_text.sub(/^\(\d+\)\s+/, '')
|
17
|
+
color = msg.at('font')[:color]
|
18
|
+
text = msg.at('font').inner_html
|
19
|
+
new(nick, text, color)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.from_hash(msg)
|
23
|
+
new(msg[:nick], msg[:text], msg[:color])
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<html>
|
2
|
+
<style type='text/css'>
|
3
|
+
#container { max-width: 70em; margin: 2em; text-align: center; }
|
4
|
+
#container h2 { text-align: center; }
|
5
|
+
dt.say { font-weight: bold; }
|
6
|
+
dt.emote { font-weight: bold; font-style:italic; }
|
7
|
+
dd.emote { font-style:italic; }
|
8
|
+
.ooc { display: none; }
|
9
|
+
dt { width: 11em; float: left; text-align: right; }
|
10
|
+
dd { margin-left: 0em; padding-left: 13em; margin-bottom: 0.5em; min-height: 2em }
|
11
|
+
</style>
|
12
|
+
<div id='container'>
|
13
|
+
<dl>
|
14
|
+
{{#messages}}
|
15
|
+
<dt {{#css}}class='{{css}}'{{/css}}>{{nick}}</dt>
|
16
|
+
<dd {{#css}}class='{{css}}'{{/css}} {{#style}} style='{{style}}' {{/style}}>
|
17
|
+
{{{content}}}
|
18
|
+
</dd>
|
19
|
+
{{/messages}}
|
20
|
+
</dl>
|
21
|
+
</div>
|
22
|
+
</html>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
{{#title}}
|
5
|
+
<title>{{title}}</title>
|
6
|
+
{{/title}}
|
7
|
+
<style type='text/css'>
|
8
|
+
body { text-align: center; }
|
9
|
+
#container { max-width: 50em; margin: 4em auto; text-align: left; }
|
10
|
+
#container h2 { text-align: center; }
|
11
|
+
dt.say { font-weight: bold; }
|
12
|
+
dt.emote { font-weight: bold; font-style:italic; }
|
13
|
+
dd.emote { font-style:italic; }
|
14
|
+
.ooc { display: none; }
|
15
|
+
dt { width: 7.5em; float: left; text-align: right; }
|
16
|
+
dd { margin-left: 0em; padding-left: 8em; margin-bottom: 0.5em; min-height: 2em }
|
17
|
+
{{{extra_css}}}
|
18
|
+
</style>
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<div id='container'>
|
22
|
+
{{#title}}
|
23
|
+
<h2>{{title}}</h2>
|
24
|
+
{{/title}}
|
25
|
+
<dl>
|
26
|
+
{{#messages}}
|
27
|
+
<dt {{#css}}class='{{css}}'{{/css}}>{{nick}}</dt>
|
28
|
+
<dd {{#css}}class='{{css}}'{{/css}} {{#style}} style='{{style}}' {{/style}}>
|
29
|
+
{{{content}}}
|
30
|
+
</dd>
|
31
|
+
{{/messages}}
|
32
|
+
</dl>
|
33
|
+
</div>
|
34
|
+
</body>
|
35
|
+
</html>
|
File without changes
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{openlogcleaner}
|
8
|
+
s.version = "0.0.22"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Jonathan Stott"]
|
12
|
+
s.date = %q{2011-02-12}
|
13
|
+
s.default_executable = %q{openlogcleaner}
|
14
|
+
s.description = %q{Cleans you some open logs
|
15
|
+
|
16
|
+
For Great Justice!}
|
17
|
+
s.email = %q{jonathan.stott@gmail.com}
|
18
|
+
s.executables = ["openlogcleaner"]
|
19
|
+
s.extra_rdoc_files = [
|
20
|
+
"LICENSE",
|
21
|
+
"README.rdoc"
|
22
|
+
]
|
23
|
+
s.files = [
|
24
|
+
".document",
|
25
|
+
"LICENSE",
|
26
|
+
"README.rdoc",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"bin/openlogcleaner",
|
30
|
+
"lib/openlogcleaner.rb",
|
31
|
+
"lib/openlogcleaner/document.rb",
|
32
|
+
"lib/openlogcleaner/dokuwiki_formatter.rb",
|
33
|
+
"lib/openlogcleaner/emote.rb",
|
34
|
+
"lib/openlogcleaner/formatter.rb",
|
35
|
+
"lib/openlogcleaner/html_document.rb",
|
36
|
+
"lib/openlogcleaner/html_formatter.rb",
|
37
|
+
"lib/openlogcleaner/message.rb",
|
38
|
+
"lib/openlogcleaner/old_html_document.rb",
|
39
|
+
"lib/openlogcleaner/rpol_document.rb",
|
40
|
+
"lib/openlogcleaner/say.rb",
|
41
|
+
"lib/openlogcleaner/templates/dokuwiki_formatter.mustache",
|
42
|
+
"lib/openlogcleaner/templates/html_formatter.mustache",
|
43
|
+
"openlogcleaner.gemspec",
|
44
|
+
"spec/openlogcleaner_spec.rb",
|
45
|
+
"spec/spec_helper.rb"
|
46
|
+
]
|
47
|
+
s.homepage = %q{http://github.com/namelessjon/openlogcleaner}
|
48
|
+
s.require_paths = ["lib"]
|
49
|
+
s.rubygems_version = %q{1.5.0}
|
50
|
+
s.summary = %q{Cleans you some open logs}
|
51
|
+
s.test_files = [
|
52
|
+
"spec/openlogcleaner_spec.rb",
|
53
|
+
"spec/spec_helper.rb"
|
54
|
+
]
|
55
|
+
|
56
|
+
if s.respond_to? :specification_version then
|
57
|
+
s.specification_version = 3
|
58
|
+
|
59
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
60
|
+
s.add_runtime_dependency(%q<mustache>, [">= 0"])
|
61
|
+
s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
|
62
|
+
s.add_runtime_dependency(%q<trollop>, [">= 0"])
|
63
|
+
s.add_development_dependency(%q<bacon>, [">= 0"])
|
64
|
+
else
|
65
|
+
s.add_dependency(%q<mustache>, [">= 0"])
|
66
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
67
|
+
s.add_dependency(%q<trollop>, [">= 0"])
|
68
|
+
s.add_dependency(%q<bacon>, [">= 0"])
|
69
|
+
end
|
70
|
+
else
|
71
|
+
s.add_dependency(%q<mustache>, [">= 0"])
|
72
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
73
|
+
s.add_dependency(%q<trollop>, [">= 0"])
|
74
|
+
s.add_dependency(%q<bacon>, [">= 0"])
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: openlogcleaner
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.22
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jonathan Stott
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-02-12 00:00:00 +00:00
|
14
|
+
default_executable: openlogcleaner
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: mustache
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: "0"
|
25
|
+
type: :runtime
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: nokogiri
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: "0"
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: *id002
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: trollop
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: "0"
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id003
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: bacon
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: "0"
|
58
|
+
type: :development
|
59
|
+
version_requirements: *id004
|
60
|
+
description: |-
|
61
|
+
Cleans you some open logs
|
62
|
+
|
63
|
+
For Great Justice!
|
64
|
+
email: jonathan.stott@gmail.com
|
65
|
+
executables:
|
66
|
+
- openlogcleaner
|
67
|
+
extensions: []
|
68
|
+
|
69
|
+
extra_rdoc_files:
|
70
|
+
- LICENSE
|
71
|
+
- README.rdoc
|
72
|
+
files:
|
73
|
+
- .document
|
74
|
+
- LICENSE
|
75
|
+
- README.rdoc
|
76
|
+
- Rakefile
|
77
|
+
- VERSION
|
78
|
+
- bin/openlogcleaner
|
79
|
+
- lib/openlogcleaner.rb
|
80
|
+
- lib/openlogcleaner/document.rb
|
81
|
+
- lib/openlogcleaner/dokuwiki_formatter.rb
|
82
|
+
- lib/openlogcleaner/emote.rb
|
83
|
+
- lib/openlogcleaner/formatter.rb
|
84
|
+
- lib/openlogcleaner/html_document.rb
|
85
|
+
- lib/openlogcleaner/html_formatter.rb
|
86
|
+
- lib/openlogcleaner/message.rb
|
87
|
+
- lib/openlogcleaner/old_html_document.rb
|
88
|
+
- lib/openlogcleaner/rpol_document.rb
|
89
|
+
- lib/openlogcleaner/say.rb
|
90
|
+
- lib/openlogcleaner/templates/dokuwiki_formatter.mustache
|
91
|
+
- lib/openlogcleaner/templates/html_formatter.mustache
|
92
|
+
- openlogcleaner.gemspec
|
93
|
+
- spec/openlogcleaner_spec.rb
|
94
|
+
- spec/spec_helper.rb
|
95
|
+
has_rdoc: true
|
96
|
+
homepage: http://github.com/namelessjon/openlogcleaner
|
97
|
+
licenses: []
|
98
|
+
|
99
|
+
post_install_message:
|
100
|
+
rdoc_options: []
|
101
|
+
|
102
|
+
require_paths:
|
103
|
+
- lib
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: "0"
|
110
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
+
none: false
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: "0"
|
116
|
+
requirements: []
|
117
|
+
|
118
|
+
rubyforge_project:
|
119
|
+
rubygems_version: 1.5.0
|
120
|
+
signing_key:
|
121
|
+
specification_version: 3
|
122
|
+
summary: Cleans you some open logs
|
123
|
+
test_files:
|
124
|
+
- spec/openlogcleaner_spec.rb
|
125
|
+
- spec/spec_helper.rb
|