Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
152 lines (93 sloc) 5.99 KB
<p><a name="top" /></p>
<h1>simple-doc: use dox to create a simple readme.md</h1>
<h2>test/function-proto.js</h2>
<ul>
<li><a href="#test/function-proto.js/Parser">Parser</a> - A class for parsing sococo log files and emitting structured data
<ul><li><a href="#test/function-proto.js/Parser/readFile">readFile(file)</a> - Helper method for reading a file into the log parser directly. </li>
<li><a href="#test/function-proto.js/Parser/write">write(line)</a> - Write log file lines to be parsed</li>
<li><a href="#test/function-proto.js/Parser/parseTransportData">parseTransportData(line)</a> - Parse sococo transport data out of a log line</li></ul></li>
<li><a href="#ATestFunction2">ATestFunction2</a></li>
</ul>
<h2>test/functions.js</h2>
<ul>
<li><a href="#functions.js">functions.js</a></li>
<li><a href="#ATestFunction2">ATestFunction2</a></li>
</ul>
<h2>test/proto.js</h2>
<ul>
<li><a href="#test/proto.js/Parser">Parser</a> - A class for parsing sococo log files and emitting structured data
<ul><li><a href="#test/proto.js/Parser/readFile">readFile(file)</a> - Helper method for reading a file into the log parser directly. </li>
<li><a href="#test/proto.js/Parser/write">write(line)</a> - Write log file lines to be parsed</li>
<li><a href="#test/proto.js/Parser/parseTransportData">parseTransportData(line)</a> - Parse sococo transport data out of a log line</li></ul></li>
</ul>
<p><a name="test/function-proto.js/Parser" /></p>
<h2>Parser &bull; <a href="#top">top</a></h2>
<p>Location: test/function-proto.js</p>
<p>A class for parsing sococo log files and emitting structured data</p>
<p>This conforms to the node Stream base class, and can be chained together with other stream filters<br />using the <code>.pipe()</code> method. This class expects data to be in line format rather than chunks of<br />data coming directly from the file. You can use readFile to pass in a file directly, and it will<br />convert into buffered lines for you.</p>
<pre><code>var p = new Parser();
p.on('data', function(data){
console.log(data);
});
p.on('end', function(){
console.log('parsing complete');
});
p.readFile('test-log.txt');
</code></pre>
<p><a name="test/function-proto.js/Parser/readFile"></p>
<h3><a href="#test/function-proto.js/Parser">Parser</a>#readFile(file)</h3>
<p>Helper method for reading a file into the log parser directly. </p>
<p>Assumes first line of the file is going to be a header, so skips it for parsing. Buffers input <br />until newline, then feeds each line into the parser. When its finished, it emits an end event. <br />Because parsing is synchronous, you can depend on parsing being complete.</p>
<p><a name="test/function-proto.js/Parser/write"></p>
<h3><a href="#test/function-proto.js/Parser">Parser</a>#write(line)</h3>
<p>Write log file lines to be parsed</p>
<p>Conforming to the stream api, mostly so you can parse together data transform streams. This stream<br />expects lines in string format.</p>
<p><a name="test/function-proto.js/Parser/parseTransportData"></p>
<h3><a href="#test/function-proto.js/Parser">Parser</a>#parseTransportData(line)</h3>
<p>Parse sococo transport data out of a log line</p>
<p>We have a header on log messages that conforms roughly to a {{name:value;name:value}} format. This<br />method parses that data off raw log message and returns a javascript object.<br /><a name="test/proto.js/Parser" /></p>
<h2>Parser &bull; <a href="#top">top</a></h2>
<p>Location: test/proto.js</p>
<p>A class for parsing sococo log files and emitting structured data</p>
<p>This conforms to the node Stream base class, and can be chained together with other stream filters<br />using the <code>.pipe()</code> method. This class expects data to be in line format rather than chunks of<br />data coming directly from the file. You can use readFile to pass in a file directly, and it will<br />convert into buffered lines for you.</p>
<pre><code>var p = new Parser();
p.on('data', function(data){
console.log(data);
});
p.on('end', function(){
console.log('parsing complete');
});
p.readFile('test-log.txt');
</code></pre>
<p><a name="test/proto.js/Parser/readFile"></p>
<h3><a href="#test/proto.js/Parser">Parser</a>#readFile(file)</h3>
<p>Helper method for reading a file into the log parser directly. </p>
<p>Assumes first line of the file is going to be a header, so skips it for parsing. Buffers input <br />until newline, then feeds each line into the parser. When its finished, it emits an end event. <br />Because parsing is synchronous, you can depend on parsing being complete.</p>
<p><a name="test/proto.js/Parser/write"></p>
<h3><a href="#test/proto.js/Parser">Parser</a>#write(line)</h3>
<p>Write log file lines to be parsed</p>
<p>Conforming to the stream api, mostly so you can parse together data transform streams. This stream<br />expects lines in string format.</p>
<p><a name="test/proto.js/Parser/parseTransportData"></p>
<h3><a href="#test/proto.js/Parser">Parser</a>#parseTransportData(line)</h3>
<p>Parse sococo transport data out of a log line</p>
<p>We have a header on log messages that conforms roughly to a {{name:value;name:value}} format. This<br />method parses that data off raw log message and returns a javascript object.<br /><a name="ATestFunction2-ATestFunction2"></p>
<h3>ATestFunction2(stuff, things) &bull; <a href="#top">top</a></h3>
<p>Location: test/function-proto.js</p>
<p>A test function summary for a second function</p>
<p>With a full summary</p>
<pre><code>ATestFunction2(stuff, things);
</code></pre>
<p><a name="functions.js-functions.js"></p>
<h3>functions.js(stuff, things) &bull; <a href="#top">top</a></h3>
<p>Location: test/functions.js</p>
<p>A test function summary</p>
<p>With a full summary</p>
<pre><code>ATestFunction(stuff, things);
</code></pre>
<p><a name="ATestFunction2-ATestFunction2"></p>
<h3>ATestFunction2(stuff, things) &bull; <a href="#top">top</a></h3>
<p>Location: test/functions.js</p>
<p>A test function summary for a second function</p>
<p>With a full summary</p>
<pre><code>ATestFunction2(stuff, things);
</code></pre>