Releases: DenverCoder1/table2ascii
Releases · DenverCoder1/table2ascii
v1.1.3
What's Changed
- fix: Prevent text wrapping when already within width (avoids issue with manually inserted line breaks being ignored - #112) by @DenverCoder1 in #113
Full Changelog: v1.1.2...v1.1.3
v1.1.2
Fixes
- Add name and version to setup.py for older version of pip by @DenverCoder1 in #109
Full Changelog: v1.1.1...v1.1.2
v1.1.1
Bug Fixes
- Include
py.typedin package data for mypy to recognize types (#100)
Meta
- All exceptions, warnings, and
SupportsStrare now importable directly through thetable2asciimodule (#94) - All class and data references in the docs were fixed to link to the proper documentation (#94)
- Changed
TableStyle.set()example to one that will not throw an exception (#94)
Full Changelog: v1.1.0...v1.1.1
1.1.0
Features
- Added
Alignment.DECIMALfor aligning numbers to a decimal point in #90 - Added ability to align all columns with a single
Alignmentinstead of a list in #91 - Support for aligning numbers separately from other strings by passing
number_alignmentstotable2asciiin #92
Meta
- Moved version number to
pyproject.tomlin #87
Full Changelog: v1.0.4...v1.1.0
1.0.4
Bug Fixes
- Made dependencies and other build arguments static by @ohjunseung in #86
New Contributors
- @ohjunseung made their first contribution in #86
Full Changelog: v1.0.3...v1.0.4
1.0.3
Bug Fixes
- Fix setup error occurring when installing on Windows by @DenverCoder1 in #85
Meta
- Added CI step for testing the project on Windows by @DenverCoder1 in #85
Full Changelog: v1.0.2...v1.0.3
1.0.2
What's Changed
- Added invalid column width error for negative column widths by @DenverCoder1 in #83
Meta
- docs(readme): fixed action build badge by @DenverCoder1 in #81
- docs: Updated build status badge by @DenverCoder1 in #84
- ci: Updated publish script to use build module by @DenverCoder1 in #82
Full Changelog: 1.0.1...v1.0.2
1.0.1
What's Changed
- Resolved pyproject and setup.py conflicts by @DenverCoder1 in #80
Full Changelog: 1.0.0...1.0.1
1.0.0
Features
- Added
use_wcwidthfor wide and fullwidth character support by @DenverCoder1 in #63 - Added the ability to merge cells with
Merge.LEFTby @DenverCoder1 in #67 - Alignment is now an
IntEnumso numbers 0-2 can be passed toalignmentsby @DenverCoder1 in #75 - Added custom exception classes by @DenverCoder1 in #74
- Added
PresetStyles.double_thin_boxstyle (this is the style used in the TableStyle docs) by @DenverCoder1 in #67
Breaking Changes
- The library now uses
wcwidthfor determining the length of a cell instead oflen().- The
wcswidth()function takes into account double-width characters (East Asian Wide and East Asian Fullwidth) and zero-width characters (combining characters, zero-width space, etc.), whereaslen()determines the width solely based on the number of characters in the string. - In most cases, this will not affect the output of
table2ascii. - To revert to using
len()instead ofwcswidth()passuse_wcwidth=Falsetotable2ascii. - Note: The width of East Asian Wide and East Asian Fullwidth characters is up to the platform and font used. If the font used to display the wide characters does not make them take up exactly 2 character width, it may still not display correctly.
- The
table2ascii.options.Optionshas a new optionuse_wcwidth. All options are required when manually creating anOptionsobject.- Eight new fields have been added to
TableStyle. If you are manually creating aTableStyleobject, you can now provide symbols for the edges of merged table cells. This is not a mandatory change, but a warning will be printed if you do not provide these fields.
Meta
- New annotation style from Python 3.9+ (backwards compatible) by @DenverCoder1 in #61
- Only installs
typing_extensionsif not using Python 3.8+ by @DenverCoder1 in #61 - Refactored comment style and reduced nesting complexity by @DenverCoder1 in #65
table2asciinow accepts allSequencecompatible objects instead of onlylistby @DenverCoder1 in #78- Use
sphinx-book-themefor docs by @DenverCoder1 in #79
Full Changelog: 0.5.0...1.0.0
0.5.0
Features
- Added
plainto preset table styles in #50
>>> table2ascii(header=[1,2,3,4], body=[[5,6,7,8], [9,10,11,12]], style=PresetStyle.plain)
1 2 3 4
5 6 7 8
9 10 11 12- Added
cell_paddingconfigurable option in #52
>>> table2ascii(header=['A','B','C'], body=[[1,2,3]], footer=[5,6,7], first_col_heading=True, cell_padding=0)
╔═╦═══╗
║A║B C║
╟─╫───╢
║1║2 3║
╟─╫───╢
║5║6 7║
╚═╩═══╝Meta
Full Changelog: 0.4.0...0.5.0