Releases: BoboTiG/thermalprinter
Releases · BoboTiG/thermalprinter
2.1.0
Bug Fixes
- Calendar recipe: prevent whole-day events from day N-1 to also appear at day N.
- Calendar recipe: whole-day event date formatting.
- Calendar recipe: consistent spacing between the calendar picture and the next item.
- Weather recipe: shortened descriptions to fit into the remaining 18 characters wide.
- Tests: missing code adaptation in
test_calendar.py::test_get_events_on_multi_days()
.
Features
- Calendar recipe: support in-between recurring events.
Technical Changes
- Calendar recipe: removed the
icalevents
requirement. - Calendar recipe: added
recurring-ical-events
, andrequests
, requirements.
2.0.0
Bug Fixes
- Weather recipe: fixed special characters handling (#49).
- Weather recipe: added the missing
byteorder
(keyword-)argument toint.from_bytes()
calls for Python 3.9, and 3.10.
Features
- Calendar recipe: improve multi-days event display (#43).
- Calendar recipe: improve printing performances.
- Calendar recipe: feed before printing birthdays.
- Weather recipe: now using a custom User-Agent HTTP header to fetch OpenWeatherMap data.
Technical Changes
- Drop support for Python 3.7, and 3.8.
- Calendar recipe: added the
recipes.calendar.format_event_date()
function. - Calendar recipe: moved the
recipes.calendar.Calendar.forge_header_image()
method to its ownrecipes.calendar.forge_header_image()
function. - Weather recipe: added the
recipes.weather.USER_AGENT
constant. - Weather recipe: removed the
recipes.weather.UNKNOWN
constant.
1.0.0
Bug Fixes
- Reworked images printing to, hopefully, fix all issues.
- Fixed printed lines counting in
ThermalPrinter.out()
.
Features
- Support for QR701 printers is confirmed (#15).
- New extra:
calendar
, to print daily stuff from your calendar, and birthdays as a bonus! It provides theprint-calendar
executable. - New extra:
persian
, to make your life easier when printing Persian text:ThermalPrinter.out("...", persian=True")
. - New extra:
weather
, to print the weather alongside with the saint of the day! It provides theprint-weather
executable. - New text styles:
font_b
, andleft_blank
. - New options to tweak printer behaviors:
byte_time
,dot_feed_time
,dot_print_time
,read_timeout
, andwrite_timeout
. - New option to control printer settings at initialization:
ThermalPrinter(..., run_setup_cmd=bool)
(#15). - It is now possible to pass barcode styling instructions in
ThermalPrinter.barcode(DATA, BARCODE_TYPE, **kwargs)
, in the same way it's done forThermalPrinter.out()
. - Introduced statistics persisted at exit. This behavior can be disabled by passing
use_stats=False
to the class. - Enhanced the demonstration code.
- Rewrote the entire documentation to cover all possible stuff, and it is way prettier now, (thanks to the awesome Shibuya theme).
- Improved the documentation by fixing issues found with Harper.
- 100% tests coverage!
- Added lot of logs.
Technical Changes
- Added the
Justify
constant to use in theThermalPrinter.justify()
method (breaking change). - Added the
Size
constant to use in theThermalPrinter.size()
method (breaking change). - Added the
Underline
constant to use in theThermalPrinter.underline()
method (breaking change). - Added the
Defaults
constant. And they can be tweaked viaTP_*
environment variables. - Added the
ThermalPrinter.__exit__()
method to properly close the printer when leaving the context manager. - Added the
ThermalPrinter.has_paper
property. - Added the
ThermalPrinter.close()
method. - Added the
ThermalPrinter.demo()
method. - Added the
ThermalPrinter.font_b()
method. - Added the
ThermalPrinter.image_chunks()
method. - Added the
ThermalPrinter.image_convert()
method. - Added the
ThermalPrinter.image_resize()
method. - Added the
ThermalPrinter.init()
method. - Added the
ThermalPrinter.left_blank()
method. - Added the
ThermalPrinter.status_to_dict()
method. - Added the
tools.stats_file()
function. - Added the
tools.stats_load()
function. - Added the
tools.stats_save()
function. - Moved the
tools.printer_tests()
function to theThermalPrinter.demo()
method (breaking change). - Moved the
tools.print_char()
function to theThermalPrinter.print_char()
method (breaking change). - Moved the
validate.validate_barcode()
function to theThermalPrinter.validate_barcode()
method. - Removed the
validate.py
file, and most ofvalidate_*()
functions. - Removed the
exceptions.ThermalPrinterConstantError
class.
0.3.0
Features
- Added support for Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14.
- Support for DP-EH400/1 printers is confirmed (#17).
- Added type annotations.
- New option to specify commands timeout via
ThermalPrinter(..., command_timeout=float)
(#17). - Documentation is now generated from the source code to never miss signature changes.
- Moved the CI from Travis-CI to GitHub actions.
- Run ruff on the entire source code.
- Added more quality checks.
Technical Changes
- Drop support for Python 3.5, and 3.6.
- Renamed
tools.test_char()
→tools.print_char()
. - Renamed
tools.testing()
→tools.printer_tests()
. - No longer checks that the provided
image
argument toThermalPrinter.image()
is aPIL.Image
object.
Contributors
0.2.0
Bug Fixes
- Fixed image printing in
tools.testing()
when the module is installed. Will now raise an exception ifraise_on_error
argument isTrue
(default).
Features
- Add communication error in the
status()
(issue #5 ). Will now raise an exception ifraise_on_error
argument isTrue
(default). - Use
setup.cfg
instead ofsetup.py
Technical Changes
- Removed
ThermalPrinterAttributeError
exception - Attributes
is_online
,is_sleeping
,lines
,feeds
andmax_column
now raiseAttributeError
when trying to set them (previously raisingThermalPrinterAttributeError
) - Changed signature of
tools.testing(port='/dev/ttyAMA0', heat_time=80)
->tools.testing(printer=None, raise_on_error=True)
- Changed signature of
tools.test_char(char)
->tools.test_char(char, printer=None)
Contributors
💟 Thanks to our beloved contributors: @d21d3q