hertzforge.service.parsing¶
parsing
¶
What is typed into a list: the one id parser and the one number parser. Commas and spaces
both separate, and a run reads as the Element Groups table prints it (1-16 33-48), so a space
never glues two values into one.
Functions:
| Name | Description |
|---|---|
parse_id_runs |
'1-3, 7 9-10' as [1, 2, 3, 7, 9, 10], in the order named; a run either way round. |
parse_picks |
The 0-based items '1-3, 7' names, numbered from 1 as the shell shows them, each once, in |
each_picked |
An operation on one channel made to act on every channel picked in the tree. |
parse_optional_picks |
|
parse_numbers |
The numbers typed, separated by commas, spaces or semicolons; each one finite. |
Functions:¶
parse_id_runs
¶
'1-3, 7 9-10' as [1, 2, 3, 7, 9, 10], in the order named; a run either way round.
parse_picks
¶
The 0-based items '1-3, 7' names, numbered from 1 as the shell shows them, each once, in the order typed.
each_picked
¶
An operation on one channel made to act on every channel picked in the tree.
The shell's form no longer asks for a channel number: the action table sends what is
picked in the tree as picked, numbers from 1 as '1-3, 7', or ALL_PICKED when the
object is selected whole (Brandon, 2026-11-17). A call with no picked is the
operation as it was, on the one channel key names, which is how a script and a
table's cell call it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run
|
callable
|
The operation's own run, taking the project and its params. |
required |
key
|
str
|
The param that numbers the channel, from 1. |
'record'
|
source
|
str
|
The param naming the object whose channels they are. |
'source'
|
Returns:
| Type | Description |
|---|---|
callable
|
A run that calls |
parse_optional_picks
¶
parse_picks, with None for a blank text, which each caller reads as its own default.
parse_numbers
¶
The numbers typed, separated by commas, spaces or semicolons; each one finite.