PageSizeType¶
-
class
PageSizeType¶ click.ParamTypesub-class to automatically converts a user-provided page size string into a tuple of float in CSS pixel units. Seeconvert_page_size()for information on the page size descriptor syntax.Example:
>>> import click >>> import vpype_cli >>> import vpype >>> @vpype_cli.cli.command(group="my commands") ... @click.argument("fmt", type=vpype.PageSizeType()) ... @vpype.generator ... def my_command(fmt: Tuple[float, float]): ... pass
Methods
Attributes
Methods¶
Attributes¶
-
PageSizeType.__doc__= ':class:`click.ParamType` sub-class to automatically converts a user-provided page size\n string into a tuple of float in CSS pixel units. See :func:`convert_page_size` for\n information on the page size descriptor syntax.\n\n Example::\n\n >>> import click\n >>> import vpype_cli\n >>> import vpype\n >>> @vpype_cli.cli.command(group="my commands")\n ... @click.argument("fmt", type=vpype.PageSizeType())\n ... @vpype.generator\n ... def my_command(fmt: Tuple[float, float]):\n ... pass\n '¶
-
PageSizeType.__module__= 'vpype.utils'¶
-
PageSizeType.name= 'PAGESIZE'¶