You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adafruit_pyportal.py
+31-18Lines changed: 31 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -97,31 +97,42 @@ def json(self):
97
97
98
98
99
99
classPyPortal:
100
-
# pylint: disable=line-too-long
101
100
"""Class representing the Adafruit PyPortal.
102
101
103
102
:param url: The URL of your data source. Defaults to ``None``.
104
-
:param json_path: The list of json traversal to get data out of. Can be list of lists for multiple data points. Defaults to ``None`` to not use json.
105
-
:param regexp_path: The list of regexp strings to get data out (use a single regexp group). Can be list of regexps for multiple data points. Defaults to ``None`` to not use regexp.
103
+
:param json_path: The list of json traversal to get data out of. Can be list of lists for
104
+
multiple data points. Defaults to ``None`` to not use json.
105
+
:param regexp_path: The list of regexp strings to get data out (use a single regexp group). Can
106
+
be list of regexps for multiple data points. Defaults to ``None`` to not
107
+
use regexp.
106
108
:param default_bg: The path to your default background image file. Defaults to ``None``.
107
-
:param status_neopixel: The pin for the status NeoPixel. Use ``board.NEOPIXEL`` for the on-board NeoPixel. Defaults to ``None``, no status LED
109
+
:param status_neopixel: The pin for the status NeoPixel. Use ``board.NEOPIXEL`` for the on-board
110
+
NeoPixel. Defaults to ``None``, no status LED
108
111
:param str text_font: The path to your font file for your data text display.
109
-
:param text_position: The position of your extracted text on the display in an (x, y) tuple. Can be a list of tuples for when there's a list of json_paths, for example
110
-
:param text_color: The color of the text, in 0xRRGGBB format. Can be a list of colors for when there's multiple texts. Defaults to ``None``.
111
-
:param text_wrap: Whether or not to wrap text (for long text data chunks). Defaults to ``False``, no wrapping.
112
+
:param text_position: The position of your extracted text on the display in an (x, y) tuple.
113
+
Can be a list of tuples for when there's a list of json_paths, for example
114
+
:param text_color: The color of the text, in 0xRRGGBB format. Can be a list of colors for when
115
+
there's multiple texts. Defaults to ``None``.
116
+
:param text_wrap: Whether or not to wrap text (for long text data chunks). Defaults to
117
+
``False``, no wrapping.
112
118
:param text_maxlen: The max length of the text for text wrapping. Defaults to 0.
113
-
:param image_json_path: The JSON traversal path for a background image to display. Defaults to ``None``.
114
-
:param image_resize: What size to resize the image we got from the json_path, make this a tuple of the width and height you want. Defaults to ``None``.
115
-
:param image_position: The position of the image on the display as an (x, y) tuple. Defaults to ``None``.
116
-
:param success_callback: A function we'll call if you like, when we fetch data successfully. Defaults to ``None``.
117
-
:param str caption_text: The text of your caption, a fixed text not changed by the data we get. Defaults to ``None``.
119
+
:param image_json_path: The JSON traversal path for a background image to display. Defaults to
120
+
``None``.
121
+
:param image_resize: What size to resize the image we got from the json_path, make this a tuple
122
+
of the width and height you want. Defaults to ``None``.
123
+
:param image_position: The position of the image on the display as an (x, y) tuple. Defaults to
124
+
``None``.
125
+
:param success_callback: A function we'll call if you like, when we fetch data successfully.
126
+
Defaults to ``None``.
127
+
:param str caption_text: The text of your caption, a fixed text not changed by the data we get.
128
+
Defaults to ``None``.
118
129
:param str caption_font: The path to the font file for your caption. Defaults to ``None``.
119
-
:param caption_position: The position of your caption on the display as an (x, y) tuple. Defaults to ``None``.
130
+
:param caption_position: The position of your caption on the display as an (x, y) tuple.
131
+
Defaults to ``None``.
120
132
:param caption_color: The color of your caption. Must be a hex value, e.g. ``0x808000``.
121
133
:param debug: Turn on debug print outs. Defaults to False.
0 commit comments