HTML table to “graphical text” for code comments
- by Atif Aziz
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.