--- /srv/rebuilderd/tmp/rebuilderdp7Ud1F/inputs/luma.led-matrix-doc_1.7.0-1_all.deb +++ /srv/rebuilderd/tmp/rebuilderdp7Ud1F/out/luma.led-matrix-doc_1.7.0-1_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2023-01-21 09:31:23.000000 debian-binary │ -rw-r--r-- 0 0 0 1952 2023-01-21 09:31:23.000000 control.tar.xz │ --rw-r--r-- 0 0 0 6885716 2023-01-21 09:31:23.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 6885468 2023-01-21 09:31:23.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,13 +1,13 @@ │ │ │ Package: luma.led-matrix-doc │ │ │ Source: luma.led-matrix │ │ │ Version: 1.7.0-1 │ │ │ Architecture: all │ │ │ Maintainer: Debian Electronics Team │ │ │ -Installed-Size: 7054 │ │ │ +Installed-Size: 7051 │ │ │ Depends: libjs-sphinxdoc (>= 5.2) │ │ │ Section: python │ │ │ Priority: optional │ │ │ Multi-Arch: foreign │ │ │ Homepage: https://github.com/rm-hull/luma.led_matrix │ │ │ Description: doc for library interfacing LED matrix displays │ │ │ Library interfacing LED matrix displays with the MAX7219 driver │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -37,15 +37,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 4146 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/genindex.html │ │ │ -rw-r--r-- 0 root (0) root (0) 22112 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/index.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17799 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/install.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6963 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/intro.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7170 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/notes.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1197 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/objects.inv │ │ │ -rw-r--r-- 0 root (0) root (0) 4200 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/py-modindex.html │ │ │ --rw-r--r-- 0 root (0) root (0) 62774 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/python-usage.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 59715 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/python-usage.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5460 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/references.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3757 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/search.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17858 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/searchindex.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/_static/_sphinx_javascript_frameworks_compat.js -> ../../../../javascript/sphinxdoc/1.0/_sphinx_javascript_frameworks_compat.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/_static/doctools.js -> ../../../../javascript/sphinxdoc/1.0/doctools.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/_static/jquery.js -> ../../../../javascript/sphinxdoc/1.0/jquery.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2023-01-21 09:31:23.000000 ./usr/share/doc/luma.led-matrix-doc/html/_static/language_data.js -> ../../../../javascript/sphinxdoc/1.0/language_data.js │ │ ├── ./usr/share/doc/luma.led-matrix-doc/html/python-usage.html │ │ │ @@ -72,20 +72,20 @@ │ │ │ │ │ │ font = ImageFont.truetype("examples/pixelmix.ttf", 8) │ │ │ │ │ │ with canvas(device) as draw: │ │ │ draw.rectangle(device.bounding_box, outline="white", fill="black") │ │ │ │ │ │ │ │ │ -

The luma.core.render.canvas class automatically creates an │ │ │ -PIL.ImageDraw object of the correct dimensions and bit depth suitable │ │ │ +

The luma.core.render.canvas class automatically creates an │ │ │ +PIL.ImageDraw object of the correct dimensions and bit depth suitable │ │ │ for the device, so you may then call the usual Pillow methods to draw onto the │ │ │ canvas.

│ │ │

As soon as the with scope is ended, the resultant image is automatically │ │ │ -flushed to the device’s display memory and the PIL.ImageDraw object is │ │ │ +flushed to the device’s display memory and the PIL.ImageDraw object is │ │ │ garbage collected.

│ │ │
│ │ │

Note

│ │ │

The default Pillow font is too big for 8px high devices like the LED matrices │ │ │ here, so the luma.examples repo │ │ │ inclues a small TTF pixel font called pixelmix.ttf (attribution: │ │ │ http://www.dafont.com/) which just fits.

│ │ │ @@ -96,23 +96,23 @@ │ │ │ from luma.core.legacy.font import proportional, CP437_FONT, LCD_FONT │ │ │ │ │ │ with canvas(device) as draw: │ │ │ text(draw, (0, 0), "A", fill="white", font=proportional(CP437_FONT)) │ │ │
│ │ │ │ │ │

The fixed-width fonts can be “converted” on-the-fly to proportionally │ │ │ -spaced by wrapping them with the luma.core.legacy.font.proportional │ │ │ +spaced by wrapping them with the luma.core.legacy.font.proportional │ │ │ class.

│ │ │ │ │ │
│ │ │

Scrolling / Virtual viewports

│ │ │

A single 8x8 LED matrix clearly hasn’t got a lot of area for displaying useful │ │ │ information. Obviously they can be daisy-chained together to provide a longer │ │ │ line of text, but as this library extends luma.core, │ │ │ -then we can use the luma.core.virtual.viewport class to allow │ │ │ +then we can use the luma.core.virtual.viewport class to allow │ │ │ scrolling support:

│ │ │
import time
│ │ │  
│ │ │  from luma.core.interface.serial import spi, noop
│ │ │  from luma.core.render import canvas
│ │ │  from luma.core.virtual import viewport
│ │ │  from luma.led_matrix.device import max7219
│ │ │ @@ -127,27 +127,27 @@
│ │ │      draw.text((3, 3), "Hello world", fill="white")
│ │ │  
│ │ │  for offset in range(8):
│ │ │      virtual.set_position((offset, offset))
│ │ │      time.sleep(0.1)
│ │ │  
│ │ │
│ │ │ -

Calling set_position() on a virtual │ │ │ +

Calling set_position() on a virtual │ │ │ viewport, causes the device to render what is visible at that specific │ │ │ position; altering the position in a loop refreshes every time it is called, │ │ │ and gives an animated scrolling effect.

│ │ │

By altering both the X and Y co-ordinates allows scrolling in any direction, │ │ │ not just horizontally.

│ │ │
│ │ │
│ │ │

Color Model

│ │ │ -

Any of the standard PIL.ImageColor color formats may be used, but since │ │ │ +

Any of the standard PIL.ImageColor color formats may be used, but since │ │ │ the 8x8 LED Matrices are monochrome, only the HTML color names "black" and │ │ │ "white" values should really be used; in fact, by default, any value │ │ │ -other than black is treated as white. The luma.core.render.canvas │ │ │ +other than black is treated as white. The luma.core.render.canvas │ │ │ constructor does have a dither flag which if set to │ │ │ True, will convert color drawings to a dithered monochrome effect.

│ │ │
with canvas(device, dither=True) as draw:
│ │ │      draw.rectangle(device.bounding_box, outline="white", fill="red")
│ │ │  
│ │ │
│ │ │
│ │ │ @@ -246,28 +246,28 @@ │ │ │ blocks_arranged_in_reverse_order=True) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │

7-Segment LED Displays

│ │ │ -

For the 7-segment device, initialize the luma.core.virtual.sevensegment │ │ │ +

For the 7-segment device, initialize the luma.core.virtual.sevensegment │ │ │ class, and wrap it around a previously created max7219 │ │ │ device:

│ │ │
from luma.core.interface.serial import spi, noop
│ │ │  from luma.core.render import canvas
│ │ │  from luma.core.virtual import sevensegment
│ │ │  from luma.led_matrix.device import max7219
│ │ │  
│ │ │  serial = spi(port=0, device=0, gpio=noop())
│ │ │  device = max7219(serial, cascaded=2)
│ │ │  seg = sevensegment(device)
│ │ │  
│ │ │
│ │ │ -

The seg instance now has a text │ │ │ +

The seg instance now has a text │ │ │ property which may be assigned, and when it does will update all digits │ │ │ according to the limited alphabet the 7-segment displays support. For example, │ │ │ assuming there are 2 cascaded modules, we have 16 character available, and so │ │ │ can write:

│ │ │
seg.text = "Hello world"
│ │ │  
│ │ │
│ │ │ @@ -275,15 +275,15 @@ │ │ │ ‘slices’, as per the below example:

│ │ │
seg.text[0:5] = "Goodbye"
│ │ │  
│ │ │
│ │ │

This replaces Hello in the previous example, replacing it with Gooobye. │ │ │ The usual python idioms for slicing (inserting / replacing / deleteing) can be │ │ │ used here, but note if inserted text exceeds the underlying buffer size, a │ │ │ -ValueError is raised.

│ │ │ +ValueError is raised.

│ │ │

Floating point numbers (or text with ‘.’) are handled slightly differently - the │ │ │ decimal-place is fused in place on the character immediately preceding it. This │ │ │ means that it is technically possible to get more characters displayed than the │ │ │ buffer allows, but only because dots are folded into their host character

│ │ │ max7219 sevensegment │ │ │
│ │ │
│ │ │ @@ -400,15 +400,15 @@ │ │ │ neoseg.color[3:5] = ["cyan", "blue"] │ │ │ time.sleep(1) │ │ │ │ │ │ # Set the entire string to green │ │ │ neoseg.color = "green" │ │ │ │ │ │ │ │ │ -

The neosegment class extends sevensegment, │ │ │ +

The neosegment class extends sevensegment, │ │ │ so the same text assignment (Python slicing paradigms) can be used here as well - │ │ │ see the earlier section for further details.

│ │ │

The underlying device is exposed as attribute device, so methods │ │ │ such as show, hide and contrast are available.

│ │ │
│ │ │ │ │ │
│ │ │ @@ -435,22 +435,22 @@ │ │ │ brightness accordingly.

│ │ │
│ │ │
│ │ │

Emulators

│ │ │

There are various display emulators │ │ │ available for running code against, for debugging and screen capture functionality:

│ │ │ │ │ │

Invoke the demos with:

│ │ │
$ python examples/clock.py -d capture --transform=led_matrix
│ │ │  
│ │ │
│ │ │

or:

│ │ │ ├── html2text {} │ │ │ │ @@ -23,38 +23,38 @@ │ │ │ │ used as follows: │ │ │ │ from PIL import ImageFont │ │ │ │ │ │ │ │ font = ImageFont.truetype("examples/pixelmix.ttf", 8) │ │ │ │ │ │ │ │ with canvas(device) as draw: │ │ │ │ draw.rectangle(device.bounding_box, outline="white", fill="black") │ │ │ │ -The _l_u_m_a_._c_o_r_e_._r_e_n_d_e_r_._c_a_n_v_a_s class automatically creates an _P_I_L_._I_m_a_g_e_D_r_a_w object │ │ │ │ +The luma.core.render.canvas class automatically creates an PIL.ImageDraw object │ │ │ │ of the correct dimensions and bit depth suitable for the device, so you may │ │ │ │ then call the usual Pillow methods to draw onto the canvas. │ │ │ │ As soon as the with scope is ended, the resultant image is automatically │ │ │ │ -flushed to the device’s display memory and the _P_I_L_._I_m_a_g_e_D_r_a_w object is garbage │ │ │ │ +flushed to the device’s display memory and the PIL.ImageDraw object is garbage │ │ │ │ collected. │ │ │ │ Note │ │ │ │ The default Pillow font is too big for 8px high devices like the LED matrices │ │ │ │ here, so the _l_u_m_a_._e_x_a_m_p_l_e_s repo inclues a small TTF pixel font called │ │ │ │ ppiixxeellmmiixx..ttttff (attribution: _h_t_t_p_:_/_/_w_w_w_._d_a_f_o_n_t_._c_o_m_/) which just fits. │ │ │ │ Alternatively, a set of “legacy” fixed-width bitmap fonts are included in the │ │ │ │ _l_u_m_a_._c_o_r_e codebase and may be used as follows: │ │ │ │ from luma.core.legacy import text │ │ │ │ from luma.core.legacy.font import proportional, CP437_FONT, LCD_FONT │ │ │ │ │ │ │ │ with canvas(device) as draw: │ │ │ │ text(draw, (0, 0), "A", fill="white", font=proportional(CP437_FONT)) │ │ │ │ The fixed-width fonts can be “converted” on-the-fly to proportionally spaced by │ │ │ │ -wrapping them with the _l_u_m_a_._c_o_r_e_._l_e_g_a_c_y_._f_o_n_t_._p_r_o_p_o_r_t_i_o_n_a_l class. │ │ │ │ +wrapping them with the luma.core.legacy.font.proportional class. │ │ │ │ ******** SSccrroolllliinngg // VViirrttuuaall vviieewwppoorrttss_?¶ ******** │ │ │ │ A single 8x8 LED matrix clearly hasn’t got a lot of area for displaying useful │ │ │ │ information. Obviously they can be daisy-chained together to provide a longer │ │ │ │ line of text, but as this library extends _l_u_m_a_._c_o_r_e, then we can use the │ │ │ │ -_l_u_m_a_._c_o_r_e_._v_i_r_t_u_a_l_._v_i_e_w_p_o_r_t class to allow scrolling support: │ │ │ │ +luma.core.virtual.viewport class to allow scrolling support: │ │ │ │ import time │ │ │ │ │ │ │ │ from luma.core.interface.serial import spi, noop │ │ │ │ from luma.core.render import canvas │ │ │ │ from luma.core.virtual import viewport │ │ │ │ from luma.led_matrix.device import max7219 │ │ │ │ │ │ │ │ @@ -66,24 +66,24 @@ │ │ │ │ with canvas(virtual) as draw: │ │ │ │ draw.rectangle(device.bounding_box, outline="white", fill="black") │ │ │ │ draw.text((3, 3), "Hello world", fill="white") │ │ │ │ │ │ │ │ for offset in range(8): │ │ │ │ virtual.set_position((offset, offset)) │ │ │ │ time.sleep(0.1) │ │ │ │ -Calling _s_e_t___p_o_s_i_t_i_o_n_(_) on a virtual viewport, causes the device to render what │ │ │ │ +Calling set_position() on a virtual viewport, causes the device to render what │ │ │ │ is visible at that specific position; altering the position in a loop refreshes │ │ │ │ every time it is called, and gives an animated scrolling effect. │ │ │ │ By altering both the X and Y co-ordinates allows scrolling in any direction, │ │ │ │ not just horizontally. │ │ │ │ ******** CCoolloorr MMooddeell_?¶ ******** │ │ │ │ -Any of the standard _P_I_L_._I_m_a_g_e_C_o_l_o_r color formats may be used, but since the 8x8 │ │ │ │ +Any of the standard PIL.ImageColor color formats may be used, but since the 8x8 │ │ │ │ LED Matrices are monochrome, only the HTML color names "black" and "white" │ │ │ │ values should really be used; in fact, by default, any value ootthheerr than black │ │ │ │ -is treated as white. The _l_u_m_a_._c_o_r_e_._r_e_n_d_e_r_._c_a_n_v_a_s constructor does have a dither │ │ │ │ +is treated as white. The luma.core.render.canvas constructor does have a dither │ │ │ │ flag which if set to True, will convert color drawings to a dithered monochrome │ │ │ │ effect. │ │ │ │ with canvas(device, dither=True) as draw: │ │ │ │ draw.rectangle(device.bounding_box, outline="white", fill="red") │ │ │ │ ******** LLaannddssccaappee // PPoorrttrraaiitt OOrriieennttaattiioonn_?¶ ******** │ │ │ │ By default, cascaded matrices will be oriented in landscape mode. Should you │ │ │ │ have an application that requires the display to be mounted in a portrait │ │ │ │ @@ -161,36 +161,36 @@ │ │ │ │ 8x8 blocks in reverse order. In that case, you need to pass a True value to │ │ │ │ parameterblocks_arranged_in_reverse_order, requesting an additional pre- │ │ │ │ processing step that fixes this: │ │ │ │ ... │ │ │ │ device = max7219(serial, cascaded=4, block_orientation=-90, │ │ │ │ blocks_arranged_in_reverse_order=True) │ │ │ │ ********** 77--SSeeggmmeenntt LLEEDD DDiissppllaayyss_?¶ ********** │ │ │ │ -For the 7-segment device, initialize the _l_u_m_a_._c_o_r_e_._v_i_r_t_u_a_l_._s_e_v_e_n_s_e_g_m_e_n_t class, │ │ │ │ +For the 7-segment device, initialize the luma.core.virtual.sevensegment class, │ │ │ │ and wrap it around a previously created max7219 device: │ │ │ │ from luma.core.interface.serial import spi, noop │ │ │ │ from luma.core.render import canvas │ │ │ │ from luma.core.virtual import sevensegment │ │ │ │ from luma.led_matrix.device import max7219 │ │ │ │ │ │ │ │ serial = spi(port=0, device=0, gpio=noop()) │ │ │ │ device = max7219(serial, cascaded=2) │ │ │ │ seg = sevensegment(device) │ │ │ │ -The sseegg instance now has a _t_e_x_t property which may be assigned, and when it │ │ │ │ +The sseegg instance now has a text property which may be assigned, and when it │ │ │ │ does will update all digits according to the limited alphabet the 7-segment │ │ │ │ displays support. For example, assuming there are 2 cascaded modules, we have │ │ │ │ 16 character available, and so can write: │ │ │ │ seg.text = "Hello world" │ │ │ │ Rather than updating the whole display buffer, it is possible to update │ │ │ │ ‘slices’, as per the below example: │ │ │ │ seg.text[0:5] = "Goodbye" │ │ │ │ This replaces Hello in the previous example, replacing it with Gooobye. The │ │ │ │ usual python idioms for slicing (inserting / replacing / deleteing) can be used │ │ │ │ here, but note if inserted text exceeds the underlying buffer size, a │ │ │ │ -_V_a_l_u_e_E_r_r_o_r is raised. │ │ │ │ +ValueError is raised. │ │ │ │ Floating point numbers (or text with ‘.’) are handled slightly differently - │ │ │ │ the decimal-place is fused in place on the character immediately preceding it. │ │ │ │ This means that it is technically possible to get more characters displayed │ │ │ │ than the buffer allows, but only because dots are folded into their host │ │ │ │ character │ │ │ │ [max7219 sevensegment] │ │ │ │ ********** WWSS22881122 NNeeooPPiixxeellss_?¶ ********** │ │ │ │ @@ -289,15 +289,15 @@ │ │ │ │ │ │ │ │ # Set fourth and fifth chars ('S','E') accordingly │ │ │ │ neoseg.color[3:5] = ["cyan", "blue"] │ │ │ │ time.sleep(1) │ │ │ │ │ │ │ │ # Set the entire string to green │ │ │ │ neoseg.color = "green" │ │ │ │ -The neosegment class extends _s_e_v_e_n_s_e_g_m_e_n_t, so the same text assignment (Python │ │ │ │ +The neosegment class extends sevensegment, so the same text assignment (Python │ │ │ │ slicing paradigms) can be used here as well - see the earlier section for │ │ │ │ further details. │ │ │ │ The underlying device is exposed as attribute device, so methods such as show, │ │ │ │ hide and contrast are available. │ │ │ │ ********** NNeexxtt--ggeenneerraattiioonn AAPPAA110022 NNeeooPPiixxeellss_?¶ ********** │ │ │ │ APA102 RGB neopixels are easier to control that WS2812 devices - they are │ │ │ │ driven using SPI rather than precise timings that the WS2812 devices need. │ │ │ │ @@ -317,20 +317,20 @@ │ │ │ │ controls brightness │ │ │ │ APA102 RGB pixels can have their brightness individually controlled: by setting │ │ │ │ the alpha chanel to a translucent value (as per the above example) will set the │ │ │ │ brightness accordingly. │ │ │ │ ********** EEmmuullaattoorrss_?¶ ********** │ │ │ │ There are various _d_i_s_p_l_a_y_ _e_m_u_l_a_t_o_r_s available for running code against, for │ │ │ │ debugging and screen capture functionality: │ │ │ │ - * The _l_u_m_a_._e_m_u_l_a_t_o_r_._d_e_v_i_c_e_._c_a_p_t_u_r_e device will persist a numbered PNG file │ │ │ │ - to disk every time its _d_i_s_p_l_a_y_(_) method is called. │ │ │ │ - * The _l_u_m_a_._e_m_u_l_a_t_o_r_._d_e_v_i_c_e_._g_i_f_a_n_i_m device will record every image when its │ │ │ │ - _d_i_s_p_l_a_y_(_) method is called, and on program exit (or Ctrl-C), will │ │ │ │ + * The luma.emulator.device.capture device will persist a numbered PNG file │ │ │ │ + to disk every time its display() method is called. │ │ │ │ + * The luma.emulator.device.gifanim device will record every image when its │ │ │ │ + display() method is called, and on program exit (or Ctrl-C), will │ │ │ │ assemble the images into an animated GIF. │ │ │ │ - * The _l_u_m_a_._e_m_u_l_a_t_o_r_._d_e_v_i_c_e_._p_y_g_a_m_e device uses the pygame library to render │ │ │ │ + * The luma.emulator.device.pygame device uses the pygame library to render │ │ │ │ the displayed image to a pygame display surface. │ │ │ │ Invoke the demos with: │ │ │ │ $ python examples/clock.py -d capture --transform=led_matrix │ │ │ │ or: │ │ │ │ $ python examples/clock.py -d pygame --transform=led_matrix │ │ │ │ Note │ │ │ │ PPyyggaammee is required to use any of the emulated devices, but it is NNOOTT installed