1 # $NetBSD: nanpa.sed,v 1.2 2006/12/25 18:39:48 wiz Exp $
3 # Parse HTML tables output by
4 # http://docs.nanpa.com/cgi-bin/npa_reports/nanpa
5 # Specifically, for each html table row (TR),
6 # print the <TD> elements separated by colons.
8 # This could break on HTML comments.
13 # Join all lines with unterminated HTML tags
18 # Replace all </TR> with EOL tag
20 # Join lines with only <TR>.
26 # Also, join all lines starting with <TR>.
27 /<[TtRr][^>]*>[^$]*$/{
34 # Remove lines not starting with <TR>
36 # Replace all <TD> with colon
40 # Handle HTML characters
42 # Compress spaces/tabs
44 # Strip leading colons
46 # Strip leading/trailing whitespace