smah.runner.response_parser

Classes

ExecTag

ResponseParser()

SetConditionTag

SmahLookup

TagBase

ThoughtTag

ThoughtType(value)

An enumeration.

class smah.runner.response_parser.ExecTag[source]

Bases: TagBase

property command
property exec_if
property markdown
property purpose
property shell
property title
class smah.runner.response_parser.ResponseParser[source]

Bases: object

static escape_response(response: str) str[source]
static extract_commands(response: str, options: dict | None = None) list | None[source]
static extract_conditions(response: str, options: dict | None = None) list | None[source]
static replace_tag(elem: any, replace: str | None = None, tail: str | None = None)[source]
static to_markdown(response: str, options: dict | None = None) str[source]
static unescape_response(response: str | None) str | None[source]
class smah.runner.response_parser.SetConditionTag[source]

Bases: TagBase

property choices
property name
property prompt
class smah.runner.response_parser.SmahLookup[source]

Bases: CustomElementClassLookup

lookup(self, type, doc, namespace, name)[source]
class smah.runner.response_parser.TagBase[source]

Bases: ElementBase

extract_child(tag: str)[source]
class smah.runner.response_parser.ThoughtTag[source]

Bases: TagBase

THOUGHT_TYPES = {'assumption': ThoughtType.ASSUMPTION, 'inner-critic': ThoughtType.INNER_CRITIC, 'question': ThoughtType.QUESTION, 'tangent': ThoughtType.TANGENT, 'thinking': ThoughtType.THINKING}
property markdown
property thought
property type
class smah.runner.response_parser.ThoughtType(value)[source]

Bases: Enum

An enumeration.

ASSUMPTION = 3
INNER_CRITIC = 4
OTHER = 0
QUESTION = 2
TANGENT = 5
THINKING = 1