Ebookmaker

Latest version: v0.13.4

Safety actively analyzes 701396 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 25

0.13.3

- fix failures with unknown mediatypes.
- fix validation errors with linked image

0.13.2

With this release we add some important new capabilities to Ebookmaker; other more profound functionalities such as PDF generation have been deferred to the next major version (0.14), but important groundwork is laid so that problems can surface sooner rather than later.

- This release includes support for MathML. Although it's over 10 years old, it's only recently that all the major web browsers are supporting MathML. MathML has been part of the EPUB3 spec since its beginning. MathML also has important accessibility attributes and some assistive technologies (but not all), are supporting it. It renders math beautifully, allowing equations to reflow in ebooks, the lack of which makes our math-containing ebooks a poor experience in EPUB readers and Kindles. Fixes 254
- For compatibility with older ebook readers, we are converting `math` element to `img` elements for our EPUB2 files. The `alttext` attribute of the math element will be used for the `alt` attribute. Because of this, use of the `altimg` and `alttext` attributes on the math element should be encouraged. If altimage is not supplied, the text content of the mathML content will be used in the EPUB2 file.
- While support for MathML in Ebookmaker enables experimental use and possibly deployment at PG, it is up to PG and DP management to determine if and when to recommend its use.
- MathCAT is software to look into for generating alt text from MathML https://nsoiffer.github.io/MathCAT/
- An online service existed to generate alt text automatically from MathML: https://github.com/openstax/mathmlcloud I am trying to find out more about its status.
- arXiv uses LaTeXML to convert LaTeX math to MathML https://math.nist.gov/~BMiller/LaTeXML/
- fixed issue where html5 `math` element produced EPUB3 that didn't validate

- This release adds support for inline (embedded) SVG via the `svg` element. Fixes 136, 135,
- Previous versions of Ebookmaker only supported external svg images.
- Because Ebookmaker is required to produce XML based output in EPUB files, inline SVG must use XML syntax rather than HTML5 syntax. This means that element and attribute names inside the `svg` element are case-sensitive, and the `svg` element MUST include an `xmlns="http://www.w3.org/2000/svg"` attribute.
- While use of the alt attribute on external svg images in img elements should be well understood, the impact of inline SVG on accessibility is mixed. If the svg does not contain text elements, the use of the svg title attribute is recommended. See https://www.unimelb.edu.au/accessibility/techniques/accessible-svgs for a good discussion.
- We remove the svg `role` attribute in EPUB2 files, because there's no way to use use it in EPUB2 files without triggering a validation error. The `role` attribute is retained for inline svg in EPUB3 files. No problems occur for HTML5 files.

- implement HTML5/EPUB3 audio element for sound files. Fixes 214.
- links to mp3 and ogg are replaced with HTML5 audio elements during initial parsing
- HTML `audio` elements are deprecated to links for EPUB2 files
- mp3 and ogg files will be included in EPUB3 files.
- because PPers have been hiding links to sound files for ebook files using `x-ebookmaker` CSS, we are adding CSS to unhide elements that contain the audio elements, for EPUB3 only.
- we no longer include music xml files in our EPUB documents
- HTML5 audio elements have many attributes. PG and DP need to decide what settings are best to use. No `autoplay` please!
- the audio element as converted to mobi by calibre displays, but doesn't play on older Amazon products. It's our understanding that send-to-kindle does not accept EPUBs with audio, so kindle users may need to use our EPUB2 files for send-to-kindle when the ebook contains audio.
- When adding HTML5 audio to a book, use code like this: `<audio title="" controls="controls"><source src="music/test.mp3" type="audio/mpeg" id="id-audio">Audio content is not currently supported on your device.</audio>`. It's important to have localized fallback text inside the `audio` element, after the `source` element.
- in addition the mp3 audio, the code supports "ogg" audio files, whatever they are.

- groundwork for PDF generation from html5 (v 0.14)
- removed html.noimages, pdf.noimages.
- having css attached to the body element can cause all sorts of problems for HTML print pagination. This release adds a 'screen' media selector to problematic css rules that include body in their selector. For now, this is just margin and padding rules. If you find that this changes anything, please let us know!

- added the "production" flag to allow context-sensitive log entries. if the flag is set, then lack of header/footer markers will be reported as CRITICAL errors; if not (the default, there will be INFO messages instead. The production flag also turns on ALTTEXT logging. Fixes 251
- added FILESDIR and CACHEDIR to sample conf file
- changed the WARNING when FILESDIR was not configured to an INFO; there was already a sensible default. Fixes 248.
- it's been a long time since logging was rationalized. In general, there was much unneeded logging. Many WARNING messages were changed to INFO; many INFO messages were changed to DEBUG, and several DEBUG messages were removed, commented out, or changed to summary messages outside of a loop. Fixes 250, 249
- any links to gutenberg.org, pglaf.org, or pgdp.org are now considered gutenberg links and get an INFO message rather than a WARNING.
- Flow optimization
- store sourcefile urls in ParserFactory to enable skipping duplicate epub generation.
- this should allow faster processing and less duplication of log messages.
- nonstandard single-line comments in `style` elements are now removed. These made up a majority of our ERROR logs. fixes 252
- removed dependency on CherryPy that made code hard to understand and was useful only when using Ebookmaker as a web spider, which we don't do. mediatypes are no longer wrapped in a `Hederelement` object, they're just strings.
- inappropriate alt text ERRORs changed to WARNINGs.
- added test for html5 source file

0.12.48

- the existing warnings for empty alt attributes proved to be somewhat counterproductive. The physician's motto "first, do no harm" is wise. Empty alt attributes are in many cases the correct solution for accessibility, but there are many commonly used entries that are much worse for accessibility. Based on a census of actual alt text entries, the following changes are being made:
- empty WARNING for empty strings in alt attributes is changed to an INFO message. (total 179,161 occurrences)
- common decorative image indicators in alt text (such as "decoration") are now removed from alt text with a WARNING and data-role="presentation" is added. (total 6,288 occurrences)
- common inappropriate alt text entries (such as "[image unavailable.]") are now replaced with "" and an ERROR message. (total 16420 occurrences). fixes 239
- improved alt-text logging, refactored filesdir
- fixed a very old bug that affects only EPUB2 files generated from html that references GIF files in CSS. It's long been the case that Ebookmaker converts gif files to png for EPUB packaging, and this bug was fixed for EPUB3 files when EPUB3 support was added.
- added experimental alt-text insertion capability in HTMLParser. It checks for a json file of contributed alt text in the logs directory. Added some code to test that it works. Implemented the alt_text_good method to update the EPUB3 accessibility data.
- added gd, nv, and oj to the 3 to 2 language table, fixing 243
- added removal for aria-* and role attributes for EPUB2 files.
- restore role attribute from data-role attributes for EPUB3 files since the EPUB validator doesn't have the html5 validator's bug.
- (via libgutenberg) fixed bug that caused original publication year to be omitted for pubinfo strings. Fixes 245
- replace ruby markup for EPUB2, rb element for HTML5. (`ruby`, `rt` and `rp` are not allowed in EPUB2, and `rb`, "ruby base", is deprecated in HTML5) Fixes 244.

0.12.47

- because of a validator bug, the W3C recommended markup for images with `role="presentation"` fails w3c validation. We have made `data-role' a synonym for `role` in this context, allowing files that use the "presentation" role to do so without raising a validation error. https://github.com/validator/validator/issues/1599

0.12.45

- generated covers are now 1600x2400 to comply with Apple Books recommended minimum width and DP guidelines https://www.pgdp.net/wiki/DP_Official_Documentation:PP_and_PPV/Post-Processing_FAQ#Information_for_all_types_of_cover 234
- added accessibility metadata to EPUB3 content.ocf as suggested by ACE
- stub implementation to allow assertions of good alt text in config.
- added aria labels and roles to nav elements of EPUB3 content.ocf and toc.xhtml
- added lang attribute to wrapper file html elements as suggested by ACE
- fix opengraph urls in HTML metadata 235
- update cchardet to solve problems installing on python 3.11
- alt-text logging is restructured
- empty alt-text warnings are now suppressed in figures
- empty alt-text warnings are now suppressed when role='presentation' or aria-labelledby attributes are present
- the alt text examination is moved from the Spider module to the HTMLParser module.
- ids are assigned to all img elements to facilitate alt-text mitigation.
- alt-text logging is improved.
- empty alt-text warnings now reference a newly added doc page: https://github.com/gutenbergtools/ebookmaker/blob/master/docs/alt-text.md
- bug in undeployed 0.12.44 fixed

0.12.43

- fixed chunker bugs:
- no longer emits empty chunks (was happening with large child elements of body) 224
- no longer splits elements in NEVER_SPLIT list when they are only children. 226
- fix missing empty line in txt output for copyrighted books 222
- made copyright addition in header/footer case-insensitive
- adds NFC unicode normalization to text parser 218
- libgutenberg 0.10.5
- don't strip periods from title_no_subtitle
- The `heading` column in the database's author-book many to many table was being ignored by much of our code. The result was that multiple authors were being listed in alphabetical order. now, the heading column is used and the first sort column for the authors of a book, and the authors other than the first author are have heading=2 (instead of the default `heading=1`) set on initial metadata load. The cataloguer can reset the heading numbers, but does not wish the order of authors other than the "main" author to be tracked in the database.
- fixed a reversion in 0.10.10 that made author name matching case sensitive.
- get ebook number from filename if parse fails 225

Page 1 of 25

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.