http://ryubahamut.googlepages.com/row_alternator.py
Figured this might be useful to people while HTMLizing something with a lot of tables, like http://www.smogon.com/dp/articles/breeding_guide_part3. It's a Python script that takes a file as input, identifies tables in it and row-alternating them, and then outputs the row-alternated file on stdout. I have tried it on a few table-intensive pages, and it has worked pretty fine.
Just be careful not to send in a file with any row-alternated table -- the results will be an ugly table with re-alternated rows (instead of ABABAB you'll probably see something like ABBAABABBAAB).
Figured this might be useful to people while HTMLizing something with a lot of tables, like http://www.smogon.com/dp/articles/breeding_guide_part3. It's a Python script that takes a file as input, identifies tables in it and row-alternating them, and then outputs the row-alternated file on stdout. I have tried it on a few table-intensive pages, and it has worked pretty fine.
Usage: row_alternator.py <file>
row_alternator.py <file> > <output>
Simple HTML row alternation script.
Arguments:
<file> The file to be processed.
<output> The file in which the processed data is to be written.
Omitting '> <output>' outputs the processed data to stdout.
<output> will be overwritten without warning.
Just be careful not to send in a file with any row-alternated table -- the results will be an ugly table with re-alternated rows (instead of ABABAB you'll probably see something like ABBAABABBAAB).