CSV to HTML translation: Difference between revisions

m
Forgot a 'pack'
(Added PicoLisp)
m (Forgot a 'pack')
Line 434:
(prinl)
(while (split (line) ",")
(<row> NIL (ht:Prin (pack (car @))) (ht:Prin (pack (cadr @))))
(prinl) ) ) )</lang>
Output:
Line 440:
<tr><td>Character</td><td>Speech</td></tr>
<tr><td>The multitude</td><td>The messiah! Show us the messiah!</td></tr>
<tr><td>Brians mother</td><td><&lt;angry>&gt;Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!<&lt;/angry>&gt;</td></tr>
<tr><td>The multitude</td><td>Who are you?</td></tr>
<tr><td>Brians mother</td><td>I'm his mother; that's who!</td></tr>
Line 453:
(prinl)
(while (split (line) ",")
(<row> NIL (ht:Prin (pack (car @))) (ht:Prin (pack (cadr @))))
(prinl) ) ) ) )</lang>
Output:
<pre><table class="myStyle"><tr><th>Character</th><th>Speech</th></tr>
<tr><td>The multitude</td><td>The messiah! Show us the messiah!</td></tr>
<tr><td>Brians mother</td><td><&lt;angry>&gt;Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!<&lt;/angry>&gt;</td></tr>
<tr><td>The multitude</td><td>Who are you?</td></tr>
<tr><td>Brians mother</td><td>I'm his mother; that's who!</td></tr>
Anonymous user