mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Tidy up pinout tool PR
This commit is contained in:
@@ -11,16 +11,16 @@ tool to write details of the GPIO pins available.
|
|||||||
|
|
||||||
Unless specified, the revision of the current device will be detected. A
|
Unless specified, the revision of the current device will be detected. A
|
||||||
particular revision may be selected with the --revision command-line
|
particular revision may be selected with the --revision command-line
|
||||||
option. *e.g.*:
|
option. e.g::
|
||||||
|
|
||||||
pinout.py --revision 000d
|
pinout --revision 000d
|
||||||
|
|
||||||
By default, the output will include ANSI color codes if run in a color-capable
|
By default, the output will include ANSI color codes if run in a color-capable
|
||||||
terminal. This behaviour may be overridden by the --color or --monochrome
|
terminal. This behaviour may be overridden by the --color or --monochrome
|
||||||
options to force colored or non-colored output, respectively. *e.g.*:
|
options to force colored or non-colored output, respectively. e.g::
|
||||||
|
|
||||||
pinout.py --monochrome
|
pinout --monochrome
|
||||||
|
|
||||||
Full usage details are available with:
|
Full usage details are available with::
|
||||||
|
|
||||||
pinout.py --help
|
pinout --help
|
||||||
@@ -18,7 +18,7 @@ Table of Contents
|
|||||||
api_tools
|
api_tools
|
||||||
api_pins
|
api_pins
|
||||||
api_exc
|
api_exc
|
||||||
cli_pinout
|
cli_tools
|
||||||
changelog
|
changelog
|
||||||
license
|
license
|
||||||
|
|
||||||
|
|||||||
4
gpiozero/cli/pinout.py
Normal file → Executable file
4
gpiozero/cli/pinout.py
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
"""
|
"""
|
||||||
pinout.py - gpiozero command-line pinout tool.
|
pinout - gpiozero command-line pinout tool.
|
||||||
|
|
||||||
Output Raspberry Pi GPIO pinout information.
|
Output Raspberry Pi GPIO pinout information.
|
||||||
"""
|
"""
|
||||||
@@ -56,7 +56,7 @@ def main():
|
|||||||
try:
|
try:
|
||||||
pi_info().pprint(color=args.color)
|
pi_info().pprint(color=args.color)
|
||||||
except IOError:
|
except IOError:
|
||||||
print('This device is not a Raspberry Pi?')
|
print('This device is not a Raspberry Pi')
|
||||||
exit(2)
|
exit(2)
|
||||||
else:
|
else:
|
||||||
pi_info(args.revision).pprint(color=args.color)
|
pi_info(args.revision).pprint(color=args.color)
|
||||||
|
|||||||
3
setup.py
3
setup.py
@@ -75,6 +75,9 @@ __entry_points__ = {
|
|||||||
'MockPin = gpiozero.pins.mock:MockPin',
|
'MockPin = gpiozero.pins.mock:MockPin',
|
||||||
'MockPWMPin = gpiozero.pins.mock:MockPWMPin',
|
'MockPWMPin = gpiozero.pins.mock:MockPWMPin',
|
||||||
],
|
],
|
||||||
|
'console_scripts': [
|
||||||
|
'pinout = gpiozero.cli.pinout:main',
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user