<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Yoji SHIDARA <dara****@shida*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2012-08-15 17:46:38 +0900 (Wed, 15 Aug 2012)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29">c2dcbaa88e1a438ea6814d80692a4ffd4363cf29</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Log</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em">Partially reverts 58c78f
The change of convers.js on the commit was about debug printing.</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#diff-0">tools/convert.js</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: tools/convert.js (+1 -11)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L23">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L24">24</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L25">25</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L26">26</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L27">27</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L28">28</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L29">29</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L30">30</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L31">31</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L32">32</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L33">33</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L34">34</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L35">35</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L36">36</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L45">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L46">46</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L47">47</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L48">48</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L49">49</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L50">50</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L51">51</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L52">52</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L53">53</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L57">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L58">58</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L59">59</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L60">60</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L61">61</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L62">62</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L63">63</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L64">64</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L73">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L74">74</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L75">75</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L76">76</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L77">77</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L78">78</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L79">79</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0L80">80</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R23">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R24">24</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R25">25</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R26">26</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R27">27</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R28">28</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R29">29</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R38">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R39">39</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R40">40</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R41">41</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R42">42</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R43">43</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R44">44</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R48">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R49">49</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R50">50</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R51">51</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R52">52</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R53">53</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R54">54</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R63">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R64">64</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R65">65</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R66">66</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R67">67</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R68">68</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R69">69</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/nroonga/norema/commit/c2dcbaa88e1a438ea6814d80692a4ffd4363cf29#L0R70">70</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -24,13 +24,6 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function htmlToText(html, callback) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> });</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-function titleToId(title) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- return title</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- .toLowerCase()</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- .replace(/[^a-z0-9]+/g, '_')</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- .replace(/^_|_$/g, '');</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-}</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> function parse(doc, context) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var item = {};</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -46,8 +39,6 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function parse(doc, context) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (doc.desc) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> item.desc = doc.desc;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> item.title = context.title;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- item.id = titleToId(context.title);</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- console.log([item.id, item.title]);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> item.path = context.path.map(function(item) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return item.title;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }).filter(function(title) {</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -58,7 +49,6 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function parse(doc, context) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> context.path.push(item);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> for (var type in doc) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- console.log("TYPE", type);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (doc[type] instanceof Array) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> doc[type].forEach(function(subdoc) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> parse(subdoc, context);</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -74,7 +64,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function toSdf(records) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var version = (new Date()).getTime();</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return records.map(function(record, index) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- //console.log(index, record.path, record.title);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ console.log(index, record.path, record.title);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> type: 'add',</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> id: 'doc_' + index,</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>