HTML table to “graphical text” for code comments
Posted
by Atif Aziz
on Stack Overflow
See other posts from Stack Overflow
or by Atif Aziz
Published on 2010-05-17T11:59:12Z
Indexed on
2010/05/17
12:10 UTC
Read the original article
Hit count: 621
Is there a tool (ideally command-line-based) that can help in converting the source to HTML tables into “graphical text” (think perhaps ASCII art for HTML tables) for use in code comments (like /*…*/
), as show below?
/*
+--------------------------------------------------------------------+
| Network |
+--------------------------------------------------------------------+
| 11.05.2010 | ABC | DEF |
+------------+-------------+-------------+-------------+-------------+
| | INPUT | OUTPUT | INPUT | OUTPUT |
+------------+-------------+-------------+-------------+-------------+
| Value | 366,899,791 | 0 | 213,001 | 2,132,827 |
+------------+-------------+-------------+-------------+-------------+
*/
Background: A piece of code that reads values from HTML tables can be annotated with comments depicting text-based graphical representations of complex HTML table layouts. Someone maintaining the code later can then find it easier to understand, for example, how a piece of code is slicing and dicing an HTML table or plucking values at certain cell positions.
© Stack Overflow or respective owner