krakentools.documentation.mySpanParser

class krakentools.documentation.mySpanParser(out_fname)

Bases: HTMLParser

Parses span ids from a html document. Used for wikifying code inputs.

__init__(out_fname)

Initialization

Parameters:

out_fname (str) – Name of the file to write the ids into

Methods

__init__(out_fname)

Initialization

check_for_whole_start_tag(i)

clear_cdata_mode()

close()

Handle any buffered data.

error(message)

feed(data)

Feed data to the parser.

get_starttag_text()

Return full source of start tag: '<...>'.

getpos()

Return current line number and offset.

goahead(end)

handle_charref(name)

handle_comment(data)

handle_data(data)

handle_decl(decl)

handle_endtag(tag)

handle_entityref(name)

handle_pi(data)

handle_startendtag(tag, attrs)

handle_starttag(tag, attrs)

_summary_

parse_bogus_comment(i[, report])

parse_comment(i[, report])

parse_declaration(i)

parse_endtag(i)

parse_html_declaration(i)

parse_marked_section(i[, report])

parse_pi(i)

parse_starttag(i)

reset()

Reset this instance.

set_cdata_mode(elem)

unknown_decl(data)

updatepos(i, j)

Attributes

CDATA_CONTENT_ELEMENTS

close()

Handle any buffered data.

feed(data)

Feed data to the parser.

Call this as often as you want, with as little or as much text as you want (may include ‘n’).

get_starttag_text()

Return full source of start tag: ‘<…>’.

getpos()

Return current line number and offset.

handle_starttag(tag, attrs)

_summary_

Parameters:
  • tag (str) – _description_

  • attrs (List[Tuple[str, str]]) – _description_

reset()

Reset this instance. Loses all unprocessed data.