Add software_columns CLI parameter
This commit is contained in:
parent
a8753a1121
commit
27235f9372
@ -20,9 +20,8 @@ except ImportError:
|
||||
pass # noqa
|
||||
import sys
|
||||
|
||||
from . import config, escpos
|
||||
from . import config, escpos, version
|
||||
from . import printer as escpos_printer_module
|
||||
from . import version
|
||||
|
||||
|
||||
# Must be defined before it's used in DEMO_FUNCTIONS
|
||||
@ -209,6 +208,38 @@ ESCPOS_COMMANDS: List[Dict[str, Any]] = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"parser": {
|
||||
"name": "software_columns",
|
||||
"help": "Print a list of texts arranged into columns",
|
||||
},
|
||||
"defaults": {
|
||||
"func": "software_columns",
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
"option_strings": ("--text_list",),
|
||||
"help": "list of texts to print",
|
||||
"nargs": "+",
|
||||
"type": str,
|
||||
"required": True,
|
||||
},
|
||||
{
|
||||
"option_strings": ("--widths",),
|
||||
"help": "list of column widths",
|
||||
"nargs": "+",
|
||||
"type": int,
|
||||
"required": True,
|
||||
},
|
||||
{
|
||||
"option_strings": ("--align",),
|
||||
"help": "list of column alignments",
|
||||
"nargs": "+",
|
||||
"type": str,
|
||||
"required": True,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"parser": {
|
||||
"name": "cut",
|
||||
|
Loading…
x
Reference in New Issue
Block a user