CSV to HTML translation: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 2,901: | Line 2,901: | ||
{def csv2html |
{def csv2html |
||
{lambda {:csv} |
{lambda {:csv} |
||
{table |
{table {@ style="background:#eee;"} |
||
{S.replace ([^,]*),([^_]*)_ |
{S.replace ([^,]*),([^_]*)_ |
||
by {tr {td €1} {td €2}} |
by {tr {td {@ style="width:120px;"}{b €1}} {td {i €2}}} |
||
in {S.replace \\n by _ in :csv}}}}} |
in {S.replace \\n by _ in :csv}}}}} |
||
-> csv2html |
-> csv2html |
||
{csv2html {CSV}} -> |
{csv2html {CSV}} -> |
||
<table> |
|||
<tbody> |
|||
<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><angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry></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> |
|||
<tr> |
|||
<td> The multitude</td> |
|||
<td>Behold his mother! Behold his mother!</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</lang> |
</lang> |
||
{{out}} |
|||
<table style="background:#eee;"><tr><td style="width:120px;"><b>Character</b></td> <td><i>Speech</i></td></tr><tr><td style="width:120px;"><b> The multitude</b></td> <td><i>The messiah! Show us the messiah!</i></td></tr><tr><td style="width:120px;"><b> Brians mother</b></td> <td><i>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</i></td></tr><tr><td style="width:120px;"><b> The multitude</b></td> <td><i>Who are you</i></td></tr><tr><td style="width:120px;"><b> Brians mother</b></td> <td><i>I'm his mother; that's who!</i></td></tr><tr><td style="width:120px;"><b> The multitude</b></td> <td><i>Behold his mother! Behold his mother!</i></td></tr></table> |
|||
=={{header|Liberty BASIC}}== |
=={{header|Liberty BASIC}}== |