Skip to content

5.5.0

Latest

Choose a tag to compare

@ilius ilius released this 08 Nov 09:14
· 17 commits to master since this release
985f877

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 public Archive.get_entry_by_id API. Upgrade with pip install "libzim>=4.0"
  • Remove the --reverse option and glossary reverse feature, along with the reverse-related configuration keys and UI parameters
  • FreeDict and FreeDict Markdown readers: remove the discover option; unsupported tags are still logged
  • Remove the ayandict_sqlite reader/writer from the supported plugins; the code is now kept under pyglossary/exp/ayandict_sqlite/
  • Move the edlin plugin to pyglossary/exp/

Bug fixes (security)

  • Web UI: require a per-process token and validate the Host and Origin headers on WebSocket and POST /convert requests, 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 #INCLUDE paths to the dictionary directory to prevent reading arbitrary local files. An #INCLUDE pointing 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 *_offsets example 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 xsl mode, 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:lang on <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_gtk3 and ui_gtk4: fatal error when FileSizeOption has an empty or non-integer value, #735

Features

New read/write format functionalities

New command-line features

  • view-glossary / pyglossary-view: add --no-pager to write entries to stdout instead of using a pager
  • Glossary-aware Git diff driver: scripts/git-diff-glossary with checked-in .gitconfig and .gitattributes; enable it per clone with git config --local include.path ../.gitconfig. The driver also handles unmerged entries

New user interface features

Improvements

  • FreeDict and FreeDict Markdown readers: render <usg> usage labels as tags (with the usage_color option) and <lbl> labels (with the new label_color option), preserving nested markup
  • WordNet reader: add the word_title read 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.md for AI-assisted coding
  • Correct a typo and add macOS 15 to the README, PR #738 by @foxmean
  • Update README.md: format with mdformat and add PyGlossaryTK.app
  • Add documentation for the supported modules in the third-party plugin API
  • Move library documentation under doc/lib/, merge internals.md into ARCHITECTURE.md, and update doc/config.rst
  • Add and update docstrings
  • Document the experimental status of modules under pyglossary.exp in 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 into pyglossary/stubs, the Gregorian module into plugin_lib, Persian helpers into pyglossary/langs, and the slob library package into the Aard2 Slob plugin
  • Move glossary_creator.py, stardict_creator.py, and sdsqlite.py into pyglossary/exp/ which is for experimental modules.
  • Rename internal word variables, helpers, and arguments to term
  • 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_bdc plugin module

Other changes

  • Switch to the wxPython build for macOS releases
  • Switch to glossary_v2 in scripts/ and doc/lib-examples/; move the legacy glossary.py implementation to glossary_v1.py while 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.sh to scripts/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-py to test dependencies
  • Remove the .cursor/rules/ directory
  • Update ruff to 0.17.4 and fix new errors

New Contributors

Full Changelog: 5.4.2...5.5.0