CSV to HTML translation: Difference between revisions
Content added Content deleted
(→{{header|Vedit macro language}}: TXR wipes the floor with this triviality.) |
|||
Line 2,457: | Line 2,457: | ||
[[file:tuscript_csv2html.png|500px|thumb|none|rendered by browser ]] |
[[file:tuscript_csv2html.png|500px|thumb|none|rendered by browser ]] |
||
=={{header|TXR}}== |
|||
<lang txr>@(collect) |
|||
@char,@speech |
|||
@(end) |
|||
@(output) |
|||
<table> |
|||
@ (repeat) |
|||
<tr> |
|||
<td>@char</td> |
|||
<td>@speech</td> |
|||
</tr> |
|||
@ (end) |
|||
</table> |
|||
@(end)</lang> |
|||
Output: |
|||
<pre>$ txr csv.txr csv.txt |
|||
<table> |
|||
<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> |
|||
</table></pre> |
|||
=={{header|Vedit macro language}}== |
=={{header|Vedit macro language}}== |