Skip to content

Releases: ilius/pyglossary

5.4.2

Choose a tag to compare

@ilius ilius released this 30 Jun 23:13
1b22233

What's Changed

Bug fixes (user interface)

  • ui_gtk3: fix application_id for flatpak

Features

User interface features

  • Add ui_wx, use with --wx or --ui=wx
  • Web UI (--ui=web): add file picker (#728)

Plugin Features

  • StarDict writer: automatically write multiple glosaries, add max_file_size option
  • Add progress support for resource files and avoid freezing for large number of files
    • For all text-based formats
  • Aard2 slob: add audio format support for m4a, m4b, aac, webm (#731)

Other changes

  • Replace broken link for python-lzo Windows installation (#729), by @glowinthedark
  • Add pyglossary/ui/tests/argparse_config_flags_test.py
  • Add build-windows-wx workflow, and refactor build scripts
  • Add docstrings to pyglossary/glossary_progress.py
  • Add pyglossary/glossary_creator.py, update doc/lib-examples/
  • Add pyglossary/stardict_creator.py and doc/lib-examples/custom-writer-stardict.py
  • Document which modules are imported in plugins
  • Extract coverage on ci, and post a summary as PR comment
  • Glossary_progress.py: change _byteProgressIter to support DSL res files also add docstring
  • Remove utf-8 encoding headers
  • Update README.md and help
  • Validate Reader and Writer classes on ci

Full Changelog: 5.4.1...5.4.2

5.4.1

Choose a tag to compare

@ilius ilius released this 04 Jun 13:52
e9eeadf

What's Changed

Compatibility changes

  • Correct python_requires in setup.py to >=3.12.0 (was incorrectly >=3.10.0, which could mislead pip on older Python versions)

Bug fixes (core)

  • Fix config flags such as --log-config not being applied (regression in StoreConstAction / registerConfigOption handling)

Bug fixes (plugins)

  • CSV reader: fix progress reporting when loading many bundled resource files (#725)
  • CSV reader: load resources from subdirectories under the resource directory (#725)

Bug fixes (user interface)

  • CLI: call progress(1.0) before finishing the progress bar so the bar reaches 100%
  • Gtk3 / Gtk4: fix AttributeError when a read/write option has a multi-line comment in the format options UI

Features

New command-line features

  • --md-to-html — treat plaintext (Markdown) definitions as Markdown and convert them to HTML during conversion (md_to_html entry filter; requires mistune; documented in doc/entry-filters.md)

New user interface features

  • ui_tk_wizard (--ui=tk_wizard, --tkw): drag-and-drop dictionary files onto the wizard window on input/output steps (optional tkinterdnd2 package)
  • ui_qt6 (--ui=qt6, --qt6): drag-and-drop onto the input/output steps and navigation bar

Other changes

  • Declare Python 3.14 support in PyPI classifiers
  • Refactor pyproject.toml packaging metadata
  • Normalize plugin doc table formatting in doc/p/*
  • Normalize issue/PR link style in older doc/releases/ notes

Full Changelog: 5.4.0...5.4.1

5.4.0

Choose a tag to compare

@ilius ilius released this 26 May 22:37
e4c2be1

What's Changed

Compatibility changes

  • XDXF: switch to XSL transform mode by default to fix whitespace issues (#562)
  • On Windows and macOS, the default GUI is now tk_wizard (use --ui=tk for the classic Tkinter UI)
  • On Linux, auto-launching a GUI is disabled when neither PyGObject (gi) nor Tkinter is available (#713)

Bug fixes (security)

  • DataEntry.save: refuse absolute paths and ../ segments to prevent malicious dictionary content from writing files outside the chosen output directory. Thanks to @gistrec for the private report.

Bug fixes (core)

  • Avoid loading all plugin modules at startup despite reading from index.json, which could register plugins twice (#712)

Bug fixes (plugins)

  • Aard2 Slob writer: fix compatibility with Python 3.14: option file_size_approx misbehaving
  • Aard2 Slob writer: fix image link replacement (missing slash in replacement) (#723)
  • MOBI writer: fix leading double-quote in CSS charset declaration (#715)

Bug fixes (user interface)

  • Interactive CLI: fix text color on light terminal backgrounds
  • CLI: exit early when inputFormat is invalid
  • Gtk4 on macOS: fix AttributeError for display.get_primary_monitor (#724)
  • Gtk3 / Gtk4: fix exception when convertOptions=None
  • Tkinter UI: fix not applying infoOverride from flags like --name

Features

New read/write format functionalities

  • Babylon BGL writer: added for testing purposes for now; wraps HTML src / href resource links into BGL binary link format when bundled data entries are present
  • TMX reader (#716) — Translation Memory eXchange XML (.tmx), the standard interchange format for translation-memory tools. Use case: import source/target translation units from CAT tools or TM archives as glossary entries for lookup or conversion to StarDict, Tabfile, etc.
  • XLIFF reader (#716) — XML Localization Interchange File Format (.xlf, .xliff) used in software and document localization pipelines. Use case: turn bilingual XLIFF segments into term/definition pairs for dictionaries or further processing alongside TMX workflows.
  • FreeDict Markdown reader — reads FreeDict TEI (.tei) like the existing FreeDict plugin, but stores definitions as Markdown instead of HTML. Use case: feed FreeDict dictionaries into Markdown-friendly targets (e.g. Yomitan, view-glossary, or text-oriented writers) without HTML cleanup.
  • WordFrequency.info reader — tab-separated COCA lemma frequency lists (.wordfrequency, e.g. lemmas_60k.txt from wordfrequency.info), with part-of-speech tags and per-genre counts. Use case: build frequency-ranked vocabulary glossaries for learners, flashcard apps, or filtered word lists.
  • AppleDict Source reader — Apple Dictionary XML source bundles (.apple directories produced by Dictionary Development Kit). Use case: read and convert existing Apple dictionary source projects on any platform, edit entries outside macOS, or round-trip with the existing AppleDict writer.

New command-line features

Conversion flags and standalone CLI tools (pyglossary, pyglossary-view / view-glossary, pyglossary-diff / diff-glossary):

  • --skip-term-regex=REGEX — skip entries whose headword or alternate fully matches a regex (skip_term_regex config key; documented in doc/config.rst and doc/entry-filters.md)
  • pyglossary-view (view-glossary): render Markdown definitions (needs rich module)
  • Expand built-in help text: entry filters, sorting, read/write options, --interactive / --no-interactive, Gtk4 launcher, --log-time, and SQLite mode notes

New user interface features

  • Add ui_tk_wizard: step-by-step Tkinter wizard (--ui=tk_wizard, --tkw); default on Windows and macOS
  • Add ui_qt6: Qt 6 wizard-based interface (--ui=qt6, --ui=qt, --qt6, --qt); install with pip install pyglossary[qt6]
  • Gtk3 / Gtk4: add Options → Info / Metadata dialog — set Glossary Name, Source Language, and Target Language before conversion (same fields as the Tk/Qt dialogs and CLI flags --name, --source-lang, --target-lang); values are passed as glossary info to the output writer (e.g. StarDict .ifo, EPUB metadata)
  • About dialogs / tabs in Gtk3, Gtk4, Tk, Qt6 UIs: show Python and GUI toolkit versions

Improvements

Other changes

  • Update README.md format table with new readers
  • Refactor large modules into packages: Babylon BGL reader, Slob, Tkinter UI, interactive CLI
  • Replace scripts/gen bash script with a faster Python implementation
  • Add ARCHITECTURE.md, CONTRIBUTING.md, and doc/tabfile-spec.md
  • Ship some test data files with the repository
  • CI: add workflow to prevent large git objects; check that plugin names contain no spaces
  • Linting and typing: ruff/mypy cleanup across the codebase

New Contributors

Full Changelog: 5.3.0...5.4.0

5.3.0

Choose a tag to compare

@ilius ilius released this 27 Mar 19:35
71475a2

What's Changed

Compatibility changes

  • Require Python 3.12 or later
  • Avoid mapping license to copyright in glossary info (glos.getInfo)
  • SQL writer: change dbinfo table columns (no dict app depends on this schema AFAIK)

Features

  • Add EWPING Reader (#707)
  • Add PocketBook SDIC (.dic) writer plugin (#708)
  • Aard2 slob writer: add license.name tag, #706
  • Add --license flag, #706
  • Add --copyright flag, #706
  • WordNet reader: set creationTime info, #706
  • view-glossary: support env var SHOW_DEFI_FORMAT=1
  • view-glossary: support env var READ_OPTIONS with json format
  • Use underline as alternative separator in glos.detectLangsFromName

Bug fixes

  • c2c9d0d github actions: fix Nuitka 4.0.7 build failure (#709)
  • d55cd51 fix detectLangsFromName and add a test set, including tests from PR #700

Other changes

  • Linting: fix some mypy, ruff and pylint errors
  • Update pyglossary/langs/langs.json
  • 9fddf03 XDXF transform: if failed to parse xml, show error and skip rendering (take it as html)
  • 9dde242 wordnet: change grammar info from Italic to colored, defaulting to green just like FreeDict and Wiktextract
  • 5b9d800 add generated comment to plugin docs
  • d591e8b update tools for stardict, dsl and mdict
  • e5a175a use shebang #!/usr/bin/env bash
  • 5f72b32 Wordnet: refactor WordNet class

New Contributors

Full Changelog: 5.2.1...5.3.0

5.2.1

Choose a tag to compare

@ilius ilius released this 05 Dec 06:04
231b413

What's Changed

  • Add command pyglossary-view

  • Glossary: write: avoid removing trailing slash from filename
    Allow converting to a directory with StarDict, #694

  • StarDict writer:

    • Remove existing .dict.dz, .syn.dz, .syn, syn.oft, .idx.oft, #694
    • Bugfix/feature: add a new option dictzip_syn = False, #694
      do not use dictzip option for .syn because the comment only says .dict
  • Fix BGL no-CRC-check support (for odd BGL files) for Python 3.14

  • Add test workflow for Python 3.14

  • Refactor and cleanup scripts and workflows

  • Drop MacOS-13 build (because the Github image is no longer available)

  • ui: avoid normalizing paths from command line

  • ui_gtk4: a few improvements and cleanup

  • ui_tk: fix inconsistency of "Output Format" row on top of "Output File"

  • view_glossary.py: prevent multiple --format flags

Full Changelog: 5.2.0...5.2.1

5.2.0

Choose a tag to compare

@ilius ilius released this 18 Nov 20:42
ec2f9d3

What's Changed

  • Fix exception on command line progress bar when tqdm is not installed

  • Fix a few packaging details (PEP 639) (#684)

  • Fix potential error in library compatibility:

    • Entry: add back word= keyword argument as deprecated, also make defi arg optional
  • Add command pyglossary-diff, #686

  • Add/update type annotations, update documentation and sample codes

  • FreeDict: set auto_rtl=True by default, drop support for auto_rtl=None

  • CSV writer: show error for bad encoding value

  • StarDict:

    • Reader" replace sametypesequence=None with sametypesequence="-"
      Now sametypesequence=None is the same as sametypesequence=""
      which means auto-set based on contents

    • Writer: replace sqlite=None option with autosqlite=True

  • Zim reader: fix quoting of href= value

  • Edict2

    • Add test
    • Add option to create links from references to other words (#679)
    • Make summary alternatives optional (#682)
    • Improve pinyin (romanization) (#678)
  • Tkinter UI: Lots of improvements and new options

    • Re-design Read/Write Options Dialog without Treeview
    • Move Read/Write Options into "Options" MenuButton, like ui_gtk3
    • Add Options -> Info / Metedata
    • Add Options -> General Options
    • Fix Format Dialog's Treeview row height and fast scrolling
    • Fix not validating inputFormat and outputFormat given by command line
  • Gtk3 UI: Lots of improvements and new options

    • Re-design Read/Write Options Dialog without Treeview
    • Gerenal Options: Sort: use RadioButton and some fixes
    • Fix dialog for showing dependencies
    • Fix not validating inputFormat and outputFormat given by command line
  • Gtk4 UI: Lots of improvements and new options

    • Re-design Read/Write Options Dialog without Treeview
    • Replace read/write/general options buttons with a single "Options" MenuButton
    • Gerenal Options: Sort: add Locale and fix updateWidgets
    • Fix not validating inputFormat and outputFormat given by command line

New Contributors

Full Changelog: 5.1.1...5.2.0

5.1.1

Choose a tag to compare

@ilius ilius released this 16 Sep 15:32
2e0bd05

What's Changed

Bug fixes:

  • 7268524 ui/main.py: exit with status 2 on invalid arguments/options
  • 72efa1c pyproject.toml: fix build-system still accepting Python 3.10, also remove fixit
  • 6785bbc fix scripts/diff-glossary and scripts/view-glossary

Features / Improvements

  • 5f0989a add requirements.txt generated by scripts/gen.sh
  • d676af5 add relatedFormats variable to plugins, use it to link formats in docs
  • d7b4518 DSL: add support for .webp images, #670
  • 0b07293 DSL: support .dsl.files.zip file, #670
  • e560697 DSL: support .ico and .svg images
  • 74d0fa4 add some optional or language-specific dependencies for appledict, jmdict and mdx plugins
  • 02e07e9 update langs.json: add Baoulé, fix script for Dyula, fix #665
  • 8773814 slob: support .ico images
  • f6b84ae StarDict: disable dictzip by default
  • Github workflow for building binaries for windows-x86, macos-x86, macos-arm64; resolves #608 by @glowinthedark in #668

Update documentation

Refactoring, better linting and typing

Full Changelog: 5.1.0...5.1.1

5.1.0

Choose a tag to compare

@ilius ilius released this 01 Jul 10:31
f1bd374

What's Changed

Switch to Python 3.11 (drop Python 3.10)

Bug fixes

  • Fix bug in DataEntry causing exception for empty resource files
  • Wiktextract: fix #653 (TypeError) and some refactoring

Features / improvements

  • glossary_v2: auto-sort on glos.write if format has sortOnWrite=ALWAYS, #656
  • Add Yomichan reader (#655) by @Electro98
  • Mobipocket writer: save res files / data entries
  • StarDict reader: support directories inside res dir
  • TextGlossaryReader: support directories inside *_res dir. Applies to these formats:
    • Tabfile (.txt)
    • Lingoes LDF
    • Dictfile (.df)
    • cc_kedict
    • dictunformat

Type annotations, refactoring, documentation

  • ae26e45 migrate to modern logger interface (#659)
  • f5ffed4 mobi writer: only use kindlegen verbose mode on log debug mode
  • a0b431f add ConfigType with TypedDict
  • fec5a4d switch to ruff 0.11.12, fix PLC0207 errors
  • 6653153 typing: fix UIType
  • 804c6b8 typing: fix pyright errors in glossary_v2.py
  • 60a86ab typing fixes / improvements
  • c084fe7 typing: fixes in glossary_types.py
  • 74497ff ui: move some code from base.py to config.py
  • c774a07 ui: remove UIBase.configDefDict
  • c768688 ui_tk: #654: fix formatting, update comment
  • cb1ffd6 ui_tk: typing fixes and cleanup
  • 0b234ec update all in text_utils.py, update pyproject.toml
  • e65aa50 update doc/internals.md
  • b68e7c8 Update ui_tk.py (make app DPI-aware, remove blurry fonts on Windows) by @sklart
  • d93a990 use relative imports in pyglossary/*.py

New Contributors

Full Changelog: 5.0.10...5.1.0

5.0.10

Choose a tag to compare

@ilius ilius released this 09 May 15:42
195276e

What's Changed

  • Glossary: fix not ignoring disabled plugins by default and respect skipDisabledPlugins argument to Glossary.init

  • Fix setup.py: list res/* files by extension, ignoring res/hicolor, #645

    • Add .github/workflows/pip-mac.yml to prevent such bugs in future
  • Improvements in FreeDict reader

    • Put grammer text inside <div>, instead of adding <br> afrer it Fixes extra newline in Qt's QTextBrowser
    • Add support for sense.sense.sense, fix some warnings, add dummy support for idioms
  • Improvements in Wiktextract reader

    • rudimentary handler for Chinese phonology section. by @pannxe in #638
    • rudimentary ruby text handler for example sense by @pannxe in #639
    • a more comprehesive list-style pronunciation section for Chinese entries by @pannxe in #640
    • Wiktionary: add handling for non-Unicode character by @pannxe in #641
    • Fix examples section of Chinese entries by @pannxe in #642
    • Use "" instead of "_" for fallback key in zh_utils.py/processSound by @pannxe in #643
  • Fixes and improvements in user interfaces:

    • ui_tk: set className to show in Cinnamon panel instead of "Tk"
    • ui_tk: show log level names in verbosity OptionMenu, also add "6 - All"
    • ui_gtk3: UI improvements, refactoring
    • ui_gtk4: fixes, UI improvements, refactoring
  • Fix type annotations and lint errors

  • Dictfile: remove mistune version locking

  • Remove broken sym link pyglossary/plugins/check-style

  • Update scripts/docker-deb-setup.sh to use Debian packages, by @emfox in #644

New Contributors

Full Changelog: 5.0.9...5.0.10

5.0.9

Choose a tag to compare

@ilius ilius released this 22 Mar 10:36
ac17fde

What's Changed

  • Glossary: fix #633 bad DeprecationWarning in read and write
  • Glossary: do not catch LookupError in Glossary.write
  • FreeDict: fix adding inflections as keywords (#632)
  • DSL: fix IndexError in parseEntryBlock, #623
  • TextGlossaryReader: optimize progress bar, and add env NO_READ_MULTI_PART
  • StarDict reader: support type 'r'
  • Mobi: add 2 kindlgen flags (#629) by @BoboTiG
  • Mobi: print error logs if source/target lang is not set, #624
  • Add --gtk3 and --ui=gtk3, make --gtk and --ui=gtk an alias for gtk3 rename ui_gtk.py to ui_gtk3.py
  • ui_tk: About: combine 3 tabs into 1 (like before removing tix)
  • ui_tk: improve layout: hide status bar when switch to About tab
  • Github actions: move all inline bash scripts into script files, switch to ruff 0.11.0
  • scripts/plugin-doc.py: switch to tomllib, requires Python >= 3.11 now
  • scripts/diff-glossary: add a ZWNJ between deleted(red) and added(green) words

New Contributors

Full Changelog: 5.0.8...5.0.9