user.core.text.formatters.py

Modules

Actions

user.formatted_text(phrase: str | ..., formatters: str) str

Formats a phrase according to formatters. formatters is a comma-separated string of formatters (e.g. 'CAPITALIZE_ALL_WORDS,DOUBLE_QUOTED_STRING')

user.formatters_reformat_last(formatters: str) str

Clears and reformats last formatted phrase

user.formatters_reformat_selection(formatters: str) str

Reformats the current selection.

user.get_formatters_words() dict

returns a list of words currently used as formatters, and a demonstration string using those formatters

user.insert_formatted(phrase: str | ..., formatters: str)

Inserts a phrase formatted according to formatters. Formatters is a comma separated list of formatters (e.g. 'CAPITALIZE_ALL_WORDS,DOUBLE_QUOTED_STRING')

user.insert_many(strings: list[str]) None

Insert a list of strings, sequentially.

user.insert_with_history(text: str)

Inserts some text, remembering it in the phrase history.

user.reformat_text(text: str, formatters: str) str

Reformat the text.

Captures

user.formatters: str
{self.formatters}+

Returns a comma-separated string of formatters e.g. 'SNAKE,DUBSTRING'

user.format_text: str
<self.formatters> <user.text> (<user.text> | <user.formatter_immune>)*

Formats the text and returns a string

user.formatter_immune: ImmuneString
(<user.symbol_key> | (numb | numeral) <number>)

Text that can be interspersed into a formatter, e.g. characters.     It will be inserted directly, without being formatted.    

Lists

user.formatters

list of formatters

'all cap'
'all down'
'camel'
'dotted'
'dub string'
'dunder'
'hammer'
'kebab'
'packed'
'padded'
'slasher'
'smash'
'snake'
'string'
'title'
user.prose_formatter

words to start dictating prose, and the formatter they apply

'say' 'NOOP'
'speak' 'NOOP'
'sentence' 'CAPITALIZE_FIRST_WORD'