Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v0.5.1 (2019-11-12)¶
Bug fix release
Changed¶
Add the parse_width() function used to parse a width and return the value and its unit.
Fixed¶
Documentation: add missing link to
convert_cals2formexin the main page.Fix #4: Remove superfluous attributes in cals2formex.
Change in the
FormexBuilderclass: Add thedrop_superfluous_attrs()method: drop superfluous CALS-like attributes at the end of the Formex building.Fix #5: The title generation should be optional.
Change in the
Formex4Builderclass: Add the detect_titles option: if this option is enable, a title will be generated if the first row contains an unique cell with centered text. The detect_titles options is disable by default.Change in the
Formex4Builderclass: Allow empty strings for cals_ns and cals_prefix options.Fix #6: Formex 2 Cals conversion: missing
entry/@valign.Change in the
FormexParserclass: The “vertical-align” style is built from the@cals:valignattribute.Change in the
CalsParserclass: The “vertical-align” style is built from the@cals:valignattribute.Change in the
FormexBuilderclass: The@cals:valignattribute is built from the “vertical-align” style.Change in the
CalsBuilderclass: The@cals:valignattribute is built from the “vertical-align” style.Fix #7: Formex 2 Cals conversion: missing
table/@width.Change in the
CalsBuilderclass: Add support for the@widthattribute (table width).Change in the
FormexBuilderclass: Add support for the@widthCALS-like attribute (table width).Minor change in the
OoxmlParserclass: XML indentation between cell paragraphs is ignored.Fix #9: Cals 2 Formex conversion: Text and PIs lost in entries.
Add the
append_cell_elements()method: Append XML elements, PIs or texts to a cell element.Change in the
CalsBuilderandFormexBuilderclasses: Preserve processing instruction in cell content.Fix #10: Formex 2 Cals conversion:
GR.NOTESshould be preserved.Change in
FormexParserclass:GR.NOTESelements can be embedded if the embed_gr_notes options isTrue.Change in the
FormexBuilderclass: DuringGR.NOTESextraction, existingGR.NOTESare moved before theCORPUS(or created if missing).Change in the
convert_formex2cals()function: Add the embed_gr_notes options to allowGR.NOTESelement embedding.Fix #11: Cals 2 Formex conversion: missing
CORPUS/@width.Change in the
CalsParserclass: Add thewidth_unitoption, and add support for the@cals:widthattribute (table width).Fix #12: Cals 2 Formex conversion: missing
colspecattributes.Change in the
FormexBuilderclass: Add support for CALS-like attributes:@colnum,@align,@colsep, and@rowsepin thecolspecelement.Change in the
CalsBuilderclass: The@colsepand@rowsepattributes are generated.
Other¶
- Change link to the Formex documentation to “https://op.europa.eu/en/web/eu-vocabularies/formex”.
- Change Tox & AppVeyor configuration to use lxml v4.3.3 on Windows (for Python 3.4), because lxml v4.3.5 is not available for this platform.
v0.5.0 (2019-09-25)¶
Minor release
Changed¶
- Refactoring (rename “Formex4” to “Formex”):
- the module
benker/builders/formex4.pyis renamedbenker/builders/formex.py, - the module
benker/converters/ooxml2formex4.pyis renamedbenker/converters/ooxml2formex.py, - the module
benker/parsers/formex4.pyis renamedbenker/parsers/formex.py, - the class
Formex4Builderis renamedFormexBuilder, - the class
Ooxml2Formex4Converteris renamedOoxml2FormexConverter, - the function
convert_ooxml2formex4is renamedconvert_ooxml2formex, - the class
Formex4Parseris renamedFormexParser,
- the module
- Change in the class
Table: add the methodfill_missing()to fill the missing cells in a table. - Change in the class
CalsBuilder: Add support for the@cals:rowstyleattribute (extension). The@colnumand@alignattributes are generated for the<colspec>element. The new options cals_ns and cals_prefix allow the used of namespaces in CALS. The option tgroup_sorting can be used to sort thethead,tbodyandtfootelements. - Change in the method
parse_file: Always generate the XML declaration in the destination file.
Added¶
- Change in the converter:
convert_ooxml2formex(): Add the option use_cals (and related options: cals_ns, cals_prefix and width_unit): This options is used to generate additional CALS-like elements and attributes to simplify the layout of Formex document in typesetting systems. - Add support for the Table/Cell shading in the OOXML parser.
- Add support for
bgcolor(Table/Cell background color) in the CALS builder. - Add support for
bgcolor(Table/Cell background color) in the Formex 4 builder (only with the use_cals option). - New parser:
CalsParser: CALS tables parser.
Fixed¶
- Change in the builder
CalsBuilder: the possible values for row/cell nature is “header”, “body” and “footer” (instead of “head”, “body”, “foot”). - Fix in the class
OoxmlParser: rows with missing cells are filled with empty cells of the same nature as the row.
Other¶
- Fix an issue with the AppVeyor build: upgrade setuptools version in
appveyor.yml, change the Tox configuration: setpy27,py34,py35: pip >= 9.0.3, < 19.2. - Change the project‘s slogan: “Easily convert your CALS, HTML, Formex 4, Office Open XML (docx) tables from one format to another.”
- Change Tox configuration file to test the library with lxml v4.3 on Python 3.4 (support for Python 3.4 was removed in lxml v4.4).
- Change Tox configuration file to test the library on Python 3.8.
- Change the Travis CI configuration to build on Python 3.7 and 3.8-dev.
v0.4.3 (unreleased)¶
Bug fix release
v0.4.2 (2019-06-06)¶
Bug fix release
Fixed¶
Fix #1: Cell nature should inherit row nature by default.
Change in the class
Styled: The default value of the nature parameter isNone(instead of “body”).Change in the methods
insert_cell()andinsert_cell()The nature of a cell is inherited from its parent’s row (or column).
Other¶
- Change the requirements for Sphinx: add ‘requests[security]’ for Python 2.7.
- Fix an issue with the AppVeyor build: change the Tox configuration: set
py27,py34,py35: pip >= 9.0.3.
v0.4.1 (2019-04-24)¶
Bug fix release
Fixed¶
- Change in the parser
OoxmlParser: fix the ‘x-sect-cols’ value extraction when thew:sectPris missing (use “1” by default). - Fix the Formex 4 builder
FormexBuilder: Generate a<IE/>element if the cell content (the string representation) is empty.
v0.4.0 (2019-04-23)¶
Feature release
Added¶
- New converter:
convert_ooxml2formex(): Convert Office Open XML (OOXML) tables to Formex 4 tables. - New builder:
FormexBuilder: Formex 4 builder used to convert tables intoTBLelements. - Change in the parser
OoxmlParser:- The section width and height are now stored in the ‘x-sect-size’ table style (units in ‘pt’).
- Change in the builder
BaseBuilder: Add the methodfinalize_tree(): Give the opportunity to finalize the resulting tree structure.
v0.3.0 (2019-02-16)¶
Feature release
Added¶
- Change in the parser
OoxmlParser:- Parse cell
w:tcPr/w:vAlignvalues. - Parse paragraph alignments to calculate cell horizontal alignments.
- Parse cell
w:tcPr/w:tcBordersvalues to extract border styles.
- Parse cell
- Change in the builder
benker.builders.cals.CalsBuilder:- Generate
entry/@valignattributes. - Generate
entry/@alignattributes. - Generate
entry/@colsepandentry/@rowsepattributes.
- Generate
Changed¶
- Change in the parser
OoxmlParser:- Add more supported border styles
v0.2.2 (2018-12-15)¶
Bug fix release
Added¶
- Add a Python alternative to
lxml.etree.iterwalkif using lxml < 4.2.1. See lxml changelog v4.2.1.
Fixed¶
- Fix the implementation of
parse_table(): use a new implementation oflxml.etree.iterwalkif using lxml < 4.2.1.
Other¶
- Change Tox configuration file to test the library with lxml v3 and v4.
- Add a changelog in the documentation.
v0.2.1 (2018-11-27)¶
Fixed¶
- Fix Coverage configuration file.
- Fix and improve configuration for Tox.
- Fix docstring in
ooxml2cals. - Fix calculation of the
@frameattribute in the methodbenker.builders.cals.CalsBuilder.build_table().
Other¶
- Change link to PyPi project to “https://pypi.org/project/Benker/”.
- Add the README to the documentation.
- Add configuration files for TravisCI and AppVeyor.
v0.2.0 (2018-11-26)¶
Changed¶
- Update project configuration
- Add missing
__init__.pyfile intestsdirectory: it is required for test modules import.
v0.1.0 (2018-11-26)¶
- First version of Benker.