Skip to content

0.12

Choose a tag to compare

@mmulqueen mmulqueen released this 08 May 23:42
· 97 commits to main since this release
  • New pystrich console script with a subcommand per format and PNG / SVG / EPS / ASCII / terminal / DXF output. See Command-line interface.
  • Data Matrix: DataMatrixData now expects either an encoding= argument or auto_encoding=True to be set on construction. The new auto_encoding=True flag picks the narrowest encoding.
  • SVG output for QR Code and Data Matrix via new save_svg / get_svg methods on QRCodeEncoder and DataMatrixEncoder.
  • SVG output for the 1D barcodes via the same save_svg / get_svg methods on Code39Encoder, Code128Encoder and EAN13Encoder.
  • EPS output for QR Code and Data Matrix via new save_eps / get_eps methods on the same classes.
  • EPS output for the 1D barcodes via the same save_eps / get_eps methods on Code39Encoder, Code128Encoder and EAN13Encoder.
  • The human-readable labels for 1D barcodes are rendered with bundled Courier Prime glyph outlines (SIL Open Font License).
  • DXF: get_dxf() on QRCodeEncoder and DataMatrixEncoder now writes the correct $INSUNITS value for "in", "ft", "mi", "cm" and "m" (previously any value other than "mm" was silently treated as unspecified); you should now pass units=None if unspecified is desired.
  • All vector outputs accept a mark_shape keyword argument (MarkShape) selecting how matched cells are grouped and drawn: horizontal runs (the SVG / EPS default), one square mark per cell (the DXF default), or one filled circle per cell.
  • Tests: round-trip DXF coverage for QR Code and Data Matrix – the rendered DXF is read with ezdxf, rasterised, and decoded back to the original string.
  • New get_terminal_art method on QRCodeEncoder and DataMatrixEncoder, rendering the symbol with Unicode half-block characters so it scans on screen. ANSI background/foreground codes are applied by default for readability on any terminal theme; pass ansi_bg=False for plain output.