<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>trunk/as2api</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>output/html/<a href="#file1">html_framework.rb</a></tt></td><td align="right" id="added">+10</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">252 -> 253</td></tr>
<tr class="alt"><td><tt>output/xml/<a href="#file2"><span id="added">xml_formatter.rb</span></a></tt></td><td align="right" id="added">+75</td><td></td><td nowrap="nowrap" align="right">added 253</td></tr>
<tr><td><tt>ui/<a href="#file3">cli.rb</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">252 -> 253</td></tr>
<tr><td></td><td align="right" id="added">+91</td><td align="right" id="removed">-5</td><td></td></tr>
</table>
<small id="info">1 added + 2 modified, total 3 files</small><br />
<pre class="comment">
New, secret, --format-html option for producing human-readable output
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">trunk/as2api/output/html</span><br />
<div class="fileheader"><big><b>html_framework.rb</b></big> <small id="info">252 -> 253</small></div>
<pre class="diff"><small id="info">--- trunk/as2api/output/html/html_framework.rb        2005-11-07 10:15:31 UTC (rev 252)
+++ trunk/as2api/output/html/html_framework.rb        2005-11-07 11:46:03 UTC (rev 253)
@@ -3,6 +3,7 @@
</small></pre><pre class="diff" id="context">
require 'xmlwriter'
require 'xhtmlwriter'
</pre><pre class="diff" id="added">+require 'output/xml/xml_formatter'
</pre><pre class="diff" id="context">
PROJECT_PAGE = "http://www.badgers-in-foil.co.uk/projects/as2api/"
</pre><pre class="diff"><small id="info">@@ -416,10 +417,16 @@
</small></pre><pre class="diff" id="context"> end
</pre><pre class="diff" id="removed">-def create_page(output_dir, page)
</pre><pre class="diff" id="added">+def create_page(output_dir, page<span id="addedchars">, format</span>)
</pre><pre class="diff" id="context"> dir = File.join(output_dir, page.path_name)
write_file(dir, "#{page.base_name}.html") do |io|
</pre><pre class="diff" id="removed">- page.generate(XMLWriter.new(io))
</pre><pre class="diff" id="added">+ if format
+ out = XMLFormatter.new(XMLWriter.new(io))
+ out.inlines ["span", "abbr", "acronym", "cite", "code", "dfn", "em", "kbd", "q", "samp", "strong", "var", "p", "address", "h1", "h2", "h3", "h4", "h5", "h6", "a", "dt", "dd", "li", "ins", "del", "bdo", "b", "big", "i", "small", "sub", "sup", "tt", "img", "th", "td",]
+ else
+ out = XMLWriter.new(io)
+ end
+ page.generate(out)
</pre><pre class="diff" id="context"> end
end
</pre><pre class="diff"><small id="info">@@ -432,7 +439,7 @@
</small></pre><pre class="diff" id="context"> page.title_extra = conf.title
page.encoding = conf.input_encoding
conf.progress_listener.generate_page(index, page)
</pre><pre class="diff" id="removed">- create_page(conf.output_dir, page)
</pre><pre class="diff" id="added">+ create_page(conf.output_dir, page<span id="addedchars">, conf.format_html</span>)
</pre><pre class="diff" id="context"> end
end
end
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added">trunk/as2api/output/xml</span><br />
<div class="fileheader" id="added"><big><b>xml_formatter.rb</b></big> <small id="info">added at 253</small></div>
<pre class="diff"><small id="info">--- trunk/as2api/output/xml/xml_formatter.rb        2005-11-07 10:15:31 UTC (rev 252)
+++ trunk/as2api/output/xml/xml_formatter.rb        2005-11-07 11:46:03 UTC (rev 253)
@@ -0,0 +1,75 @@
</small></pre><pre class="diff" id="added">+
+require 'forwardable'
+
+class XMLFormatter
+ extend Forwardable
+
+ def initialize(xml_writer)
+ @io = xml_writer
+ @indent = " "
+ @level = 0
+ @inlines = []
+ @indenting = true
+ end
+
+ def inlines(elements)
+ @inlines = elements
+ end
+
+ def_delegators :@io, :doctype, :pcdata, :cdata, :passthrough
+
+ def element(text, attrs=nil)
+ old_indent = @indenting
+ indent do
+ @indenting = !@inlines.include?(text)
+ @io.element(text, attrs) do
+ yield
+ if @indenting
+ @io.passthrough("\n");
+ @io.passthrough(@indent * (@level-1));
+        end
+ end
+ end
+ @indenting = old_indent
+ end
+
+ def simple_element(text, body, attrs=nil)
+ indent do
+ @io.simple_element(text, body, attrs)
+ end
+ end
+
+ def empty_tag(text, attrs=nil)
+ indent do
+ @io.empty_tag(text, attrs)
+ end
+ end
+
+ def comment(text)
+ indent do
+ @io.comment(text)
+ end
+ end
+
+ def pi(text)
+ indent do
+ @io.pi(text)
+ end
+ end
+
+ private
+
+ def indent
+ if @indenting
+ @io.passthrough("\n");
+ @io.passthrough(@indent * @level);
+ @level += 1
+ yield
+ @level -= 1
+ else
+ yield
+ end
+ end
+end
+
+# vim: shiftwidth=2:softtabstop=2
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">trunk/as2api/ui</span><br />
<div class="fileheader"><big><b>cli.rb</b></big> <small id="info">252 -> 253</small></div>
<pre class="diff"><small id="info">--- trunk/as2api/ui/cli.rb        2005-11-07 10:15:31 UTC (rev 252)
+++ trunk/as2api/ui/cli.rb        2005-11-07 11:46:03 UTC (rev 253)
@@ -14,7 +14,8 @@
</small></pre><pre class="diff" id="context">                  :input_encoding,
                 :draw_diagrams,
                 :dot_exe,
</pre><pre class="diff" id="removed">-                 :sources<span id="removedchars">)</span>
</pre><pre class="diff" id="added">+                 :sources<span id="addedchars">,</span>
+                 :format_html)
</pre><pre class="diff" id="context">
SourceFile = Struct.new(:prefix, :suffix)
</pre><pre class="diff"><small id="info">@@ -95,7 +96,8 @@
</small></pre><pre class="diff" id="context"> [ "--encoding", GetoptLong::REQUIRED_ARGUMENT ],
[ "--draw-diagrams", GetoptLong::NO_ARGUMENT ],
[ "--dot-exe", GetoptLong::REQUIRED_ARGUMENT ],
</pre><pre class="diff" id="removed">- [ "--sources", GetoptLong::NO_ARGUMENT ]
</pre><pre class="diff" id="added">+ [ "--sources", GetoptLong::NO_ARGUMENT ]<span id="addedchars">,</span>
+ [ "--format-html", GetoptLong::NO_ARGUMENT ]
</pre><pre class="diff" id="context"> )
conf = Conf.new
</pre><pre class="diff"><small id="info">@@ -128,6 +130,8 @@
</small></pre><pre class="diff" id="context">          conf.dot_exe = arg
        when "--sources"
         conf.sources = true
</pre><pre class="diff" id="added">+        when "--format-html"
+         conf.format_html = true
</pre><pre class="diff" id="context"> end
end
if ARGV.empty?
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.11</small></center>
</body></html>