Repository navigation
What's Changed
Compatibility changes
- Remove the pyglossary.plugins.formats_common module; third-party plugins should import from the supported public modules listed in the plugin API
- ZIM reader now requires
libzim>=4.0, using the publicArchive.get_entry_by_idAPI. Upgrade withpip install "libzim>=4.0" - Remove the
--reverseoption and glossary reverse feature, along with the reverse-related configuration keys and UI parameters - FreeDict and FreeDict Markdown readers: remove the
discoveroption; unsupported tags are still logged - Remove the
ayandict_sqlitereader/writer from the supported plugins; the code is now kept underpyglossary/exp/ayandict_sqlite/ - Move the
edlinplugin topyglossary/exp/
Bug fixes (security)
- Web UI: require a per-process token and validate the
HostandOriginheaders on WebSocket andPOST /convertrequests, preventing cross-site pages from driving the loopback server (GHSA-44vp-6rwc-488v). Thanks to @Artur12555 for the private report - DSL reader: confine resource and
#INCLUDEpaths to the dictionary directory to prevent reading arbitrary local files. An#INCLUDEpointing outside the dictionary directory is now skipped with a warning (GHSA-292p-qrm8-49jr). Thanks to @Artur12555 for the private report
Bug fixes (plugins)
-
Kobo E-Reader Dictionary writer: support generating Japanese dictionaries (single-character prefix generation), PR #740, #741 by @kylefeng28
-
Wiktextract reader: fix a warning about
*_offsetsexample keys, #733 -
EPWING reader: fix reader parsing, PR #744 by @sashi0034
-
PocketBook SDIC writer: prevent crashing when an entry exceeds the maximum encodable size, PR #746 by @Tiger-222
-
XDXF and StarDict readers: fix XDXF rendering issues by refactoring the transformer using a state machine and disabling
xslmode, issues #532, #562 -
DSL reader: prevent the title from being overwritten by an abbreviation file (
_abrv.dsl) or#INCLUDE, PR #750 by @glowinthedark -
EPUB2 writer: point table-of-contents entries at their own group pages, PR #755 by @wleeaf
-
EPUB2 writer: escape terms and plain text definitions, PR #756 by @wleeaf
-
QuickDic6 reader: avoid hitting the recursion limit on deep index chains, #675
-
QuickDic6 reader: handle malformed stop-list sizes in older DictionaryPC files and replace invalid surrogate character references with U+FFFD, #675
-
FreeDict and FreeDict Markdown readers: fix data-loss and rendering edge cases, including XML comments inside
<gramGrp>/<sense>, inline markup and spacing in<def>, nested markup in<usg>/<lbl>, empty<ref>links,<note>inside examples, XInclude cycles,xml:langon<p>, and usage/label placement -
AppleDict Binary reader: normalize UTF-16 CSS resources to UTF-8, #748
-
Yomichan reader: avoid inserting spaces in structured content, #757
-
WordNet reader: escape HTML in generated output, sort data files for deterministic output, and close data files after reading
Bug fixes (user interface)
- Bug fix in
ui_gtk3andui_gtk4: fatal error whenFileSizeOptionhas an empty or non-integer value, #735
Features
New read/write format functionalities
-
Reader and writer for Wudict Markdown (
.wudict.md) — regular Markdown with GFM tables, plus the small header block used by the wudict dictionary app. The reader processes the file in chunks to handle very large dictionaries. PR #751, #754 by @glowinthedark -
Reader for Dict.cc translation exports — Dict.cc (tab-separated source file).
-
PocketBook SDIC writer: support custom metadata through
metadata.json, PR #745 by @Tiger-222
New command-line features
view-glossary/pyglossary-view: add--no-pagerto write entries to stdout instead of using a pager- Glossary-aware Git diff driver:
scripts/git-diff-glossarywith checked-in.gitconfigand.gitattributes; enable it per clone withgit config --local include.path ../.gitconfig. The driver also handles unmerged entries
New user interface features
- Add
ui_slint, PR #732 by @glowinthedark
Improvements
- FreeDict and FreeDict Markdown readers: render
<usg>usage labels as tags (with theusage_coloroption) and<lbl>labels (with the newlabel_coloroption), preserving nested markup - WordNet reader: add the
word_titleread option to prepend the headword as an<h1>title; the title is now off by default
Documentation
- Add and clarify documentation about StarDict's HTML support
- Format Python code in
doc/lib-usage.md - Add
CLAUDE.mdfor AI-assisted coding - Correct a typo and add macOS 15 to the README, PR #738 by @foxmean
- Update
README.md: format withmdformatand addPyGlossaryTK.app - Add documentation for the supported modules in the third-party plugin API
- Move library documentation under
doc/lib/, mergeinternals.mdinto ARCHITECTURE.md, and updatedoc/config.rst - Add and update docstrings
- Document the experimental status of modules under
pyglossary.expin the library usage docs - Update the architecture diagram, switch from Mermaid to AVIF image made with Draw.io
- Update
doc/arch/arch.drawio - Convert tracked SVGZ documentation assets to SVG and use Git LFS for SVG files
- Use white backgrounds for two Octopus MDict SVG assets
Refactoring and cleanup
- Reorganize internal modules: move utilities into
pyglossary/utils, type-only modules intopyglossary/stubs, the Gregorian module intoplugin_lib, Persian helpers intopyglossary/langs, and thesloblibrary package into the Aard2 Slob plugin - Move
glossary_creator.py,stardict_creator.py, andsdsqlite.pyintopyglossary/exp/which is for experimental modules. - Rename internal
wordvariables, helpers, and arguments toterm - Refactor the FreeDict, DSL, JMDict, QuickDic6, Wiktextract, Wudict Markdown, Dict.cc source, Babylon BGL, HTML directory, gettext PO, and WordNet readers to break up complex functions
- Remove the unused
ui_qt.py - Remove the empty
babylon_bdcplugin module
Other changes
- Switch to the wxPython build for macOS releases
- Switch to
glossary_v2inscripts/anddoc/lib-examples/; move the legacyglossary.pyimplementation toglossary_v1.pywhile keeping the compatibility alias - Add tests for resource-directory subdirectories in the StarDict reader and
TextGlossaryReader - Kobo: add Japanese e2e test
- Fix remaining misspelled words in source code and
doc/releases/ - Add
scripts/csv/replace-newline.py, #736 - Add Lakota to the supported languages, PR #734 by @BoboTiG
- Add Dungan to the supported languages
- Fix
scripts/create-release/github-build - Move
.github/scripts/get-ruff.shtoscripts/ci/get-ruff.sh - Move CI build scripts
- Update
pyproject.toml - Ensure Git LFS files are checked out for PyPI packaging and installation from the Git repository
- Improve CI detection of untracked files generated by
scripts/gen - Add tests for the Dict.cc source reader, Wudict Markdown plugin, WordNet reader, FreeDict fixtures, QuickDic6 index building, and DSL parsing
- Add
markdown-it-pyto test dependencies - Remove the
.cursor/rules/directory - Update
ruffto 0.17.4 and fix new errors
New Contributors
- @foxmean made their first contribution in PR #738
- @kylefeng28 made their first contribution in PR #741
- @sashi0034 made their first contribution in PR #744
- @wleeaf made their first contribution in PR #755
Full Changelog: 5.4.2...5.5.0