Toolset 3.0.1 released

98 views
Skip to first unread message

Alex Cabal

unread,
Mar 3, 2026, 2:37:06 PM (6 days ago) Mar 3
to Standard Ebooks Mailing List
This is a major version release. To upgrade, run `pipx upgrade
standardebooks`.

Highlights:

- `se-lint-ignore.xml` now recognizes line numbers, so specific lines
can be ignored instead of the whole file. Additionally, the syntax has
changed slightly: codes are now *attributes* of <ignore> and not
*children*. <ignore> may have zero or more <line> children; if there are
none, then entire file is ignored, but if there are any lines then only
those lines are ignored. For example:

<se-lint-ignore>
<file path="chapter-7.xhtml">
<ignore code="t-033">
<line>12</line>
<line>17</line>
<reason>Matched text is as-is in print.</reason>
</ignore>
</file>
</se-lint-ignore>

- Illustrators are now NOT included by the SE identifier by default. The
`--illustrator` option has been removed from `create-draft`. To force
the inclusion of any contributor (not just the illustrator) in the SE
identifier, give them a non-zero `display-seq` property in the metadata.

- Kobo updates: Thanks to a generous donation of a modern Kobo by Ray
Ryan, I've been able to test dark mode in Kobos. This uncovered a Kobo
bug in which hyperlinks are not underlined in dark mode, which `se
build` now works around. Unfortunately, Kobo doesn't support dark mode
media queries, so there isn't much more we can do for dark mode for now.
Additionally, `se build` now adds soft hyphens to the Kobo build to
improve on its default hyphenation algorithm.


Full changelog:

# 3.0.1

## General

- Fix ZSH completion problems. Thanks to HackerNCoder

- Escape HTML in shell completion help text

- Show whether the toolset is installed as editable via `--version`.
Thanks to Vince Rice

- Don't list contributors besides author/translator if they don't have
`display-seq` set

## se build

- Optimize output PNGs

- Add soft hyphens to kepub builds

- Return error code if build failed

- Add workaround for link underlines in Kobo dark mode

- Ignore useless VNU warning about times being mistyped

- Fix PNG cover image path in se build. Thanks to Andrew Paseltiner

## se build-images

- Optimize output PNGs

- Add missing options to shell completions

- Rebalance multilines in extreme cases. Thanks to Robin Whittleton

## se clean

- Preserve `<pre>` whitespace. Thanks to Robin Whittleton

## se create-draft

- Fix covers for authors with long names. Thanks to Robin Whittleton

- Fix empty Anonymous author attribution on `titlepage.xhtml`. Thanks to
Robin Whittleton

- Correct 'naive' transcriber sort

- Remove `--illustrator` option

## css-select

- Add the `--quiet` option to not output anything, only the return code

## se lint

- Improve check for canonical IA URLs and fix broken xpath

- Correctly find line number for unsed selectors with pseudo-elements

- Don't include the ToC in t-009

- Improve s-023

- Improve y-015

- Ignore eras in t-032

- Allow `se-lint-ignore.xml` files to ignore specific lines

- Restructure `se-lint-ignore.xml` file, validate it using RelaxNG
schema, and allow more than one line per ignore statement

- Output correct line numbers for errors relating to the long description

## se modernize-spelling

- Various additions

## se semanticate

- Add `z3998:name-title` semantic to St. followed by a no-break space
(added by typogrify). Thanks to Vince Rice

- Correct negative lookahead on a few regexes. Thanks to Vince Rice

- Don't crash on invalid XML

- Don't add roman semantics to MathML

- Automatically add initialism/acronym semantics to some obvious candidates

- Add `z3998:initialism` semantics to `AD`/`BC`

## se titlecase

- Always lowercase `a.m.`/`p.m.`

- Remove workaround for titlecase library bug that has since been fixed

- Improve `BC`/`AD` capitalization at the start of titles

## se typogrify

- Fix `'tis` directly after an opening quote. Thanks to Robin Whittleton

- Attempt to only add no-break space following `St.` abbrs if it's for
Saint. Thanks to Vince Rice

- Improve em dash standardization

- Typogrify `PhD`

- Have smartypants return unicode characters rather than HTML entities.
Thanks to Vince Rice

## xpath

- Add the `--quiet` option to not output anything, only the return code

- Correctly output float and string results

Vince

unread,
Mar 4, 2026, 12:15:10 AM (5 days ago) Mar 4
to Ebooks Standard
Should our general practice be as before, i.e. without lines to include the entire file, or should we generally use lines if the count with a file is low? IOW, what should be our default?

Alex Cabal

unread,
Mar 4, 2026, 9:59:01 AM (5 days ago) Mar 4
to standar...@googlegroups.com
You should now always specify line numbers unless a code occurs an
unreasonable amount of times (off the top of my head like Decameron for
example). This way, if a lint test improves in the future, it could
catch other errors in the file that it might not have previously.

On 3/3/26 11:14 PM, Vince wrote:
> Should our /general/ practice be as before, i.e. without lines to
> include the entire file, or should we /generally/ use lines if the count
> with a file is low? IOW, what should be our default?
>
>> On Mar 3, 2026, at 1:36 PM, 'Alex Cabal' via Standard Ebooks
>> <standar...@googlegroups.com> wrote:
>>
>> This is a major version release. To upgrade, run `pipx upgrade
>> standardebooks`.
>>
>> Highlights:
>>
>> - `se-lint-ignore.xml` now recognizes line numbers, so specific lines
>> can be ignored instead of the whole file. Additionally, the syntax has
>> changed slightly: codes are now *attributes* of <ignore> and not
>> *children*. <ignore> may have zero or more <line> children; if there
>> are none, then entire file is ignored, but if there are any lines then
>> only those lines are ignored. For example:
>>
>> <se-lint-ignore>
>> <file path="chapter-7.xhtml">
>> <ignore code="t-033">
>> <line>12</line>
>> <line>17</line>
>> <reason>Matched text is as-is in print.</reason>
>> </ignore>
>> </file>
>> </se-lint-ignore>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Standard Ebooks" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to standardebook...@googlegroups.com
> <mailto:standardebook...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> standardebooks/417EAC40-3B2D-4571-804D-B66C20B909C2%40letterboxes.org
> <https://groups.google.com/d/msgid/
> standardebooks/417EAC40-3B2D-4571-804D-B66C20B909C2%40letterboxes.org?
> utm_medium=email&utm_source=footer>.

Asher Smith

unread,
Mar 4, 2026, 1:45:51 PM (5 days ago) Mar 4
to Standard Ebooks
xpath is now giving me the following error since the update:

se xpath "//p//text()[re:test(., '[A-Z]{2,}') and not(contains(., 'OK') or contains(., 'SOS')) and not(parent::abbr or parent::var or parent::a or parent::*[contains(@epub:type, 'z3998:roman')])]" src/epub/text/*.xhtml


Traceback (most recent call last):
  File "/Users/asher/.local/bin/se", line 6, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/asher/.local/pipx/venvs/standardebooks/lib/python3.11/site-packages/se/main.py", line 75, in main
    module = importlib.import_module(command_module)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/pyt...@3.11/3.11.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 936, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1074, in get_code
  File "<frozen importlib._bootstrap_external>", line 1004, in source_to_code
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/asher/.local/pipx/venvs/standardebooks/lib/python3.11/site-packages/se/commands/xpath.py", line 53
    output = f"[path][link=file://{filepath.resolve()}#L{node.sourceline}]Line {node.sourceline}[/][/]: {node.to_string().replace('[', '\\[')}"
                                                                                                                                               ^
SyntaxError: f-string expression part cannot include a backslash

Alex Cabal

unread,
Mar 4, 2026, 2:29:53 PM (5 days ago) Mar 4
to standar...@googlegroups.com
Thanks, this has been fixed in master.
> <https://groups.google.com/d/msgid/>
> > standardebooks/417EAC40-3B2D-4571-804D-
> B66C20B909C2%40letterboxes.org <http://40letterboxes.org>
> > <https://groups.google.com/d/msgid/ <https://groups.google.com/d/
> msgid/>
> > standardebooks/417EAC40-3B2D-4571-804D-
> B66C20B909C2%40letterboxes.org <http://40letterboxes.org>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Standard Ebooks" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to standardebook...@googlegroups.com
> <mailto:standardebook...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> standardebooks/6d4e1892-da60-46d7-8fdf-b270270779d7n%40googlegroups.com
> <https://groups.google.com/d/msgid/standardebooks/6d4e1892-
> da60-46d7-8fdf-b270270779d7n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages