CARVIEW |
Select Language
HTTP/2 200
date: Wed, 30 Jul 2025 11:06:05 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"946845417a797127016ed562b2c448b8"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=26A1nDWc3m92lMNnzC7aG8PP8CI5QaNwQcAYTUQxcJ9%2FSsNlB861JQdj2RWHInaGwBtNlmG5VHc16vbSTGNC4nBMwXn9wEQSS%2F4R2%2FucWSJpDtiPJmwptfaU%2FubIiUZ5COwypCTH1BmO%2BTb0SfpyR24FALCJf8vL9NvZWJrY29hdDaVoTWEoJ15%2B1z9TitIxu8GFAYPnp4YzG3ybF%2BQtc1KAdKRlGqDJrtsRnGcHHhmjTn6yRdsO4GhIK%2B%2FEj881M1Kg0hK022dirgARa4oShg%3D%3D--lDOu6OHVgIxCYRmh--SKzYgftovUHjt7dBKguWpg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1489410204.1753873565; Path=/; Domain=github.com; Expires=Thu, 30 Jul 2026 11:06:05 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 30 Jul 2026 11:06:05 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 8E4E:1A4ED6:901633:AD65F4:6889FC9C
Release 3.0.0 · ilius/pyglossary · GitHub
Loading
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 246
3.0.0
Compare
New versioning
- Using date as the version was a mistake I made 7 years ago
- From now on, versions are in X.Y.Z format (major.minor.patch)
- While X, Y and Z are digits(0-9) for simplicity (version strings can be compared alphabetically)
- Starting from 3.0.0
- Take it for migrating to Python 3.x, or Gtk 3.x, or being alphabetically larger than previous versions (date string)
Since I believe this is the first standard version, I'm not sure which code revision should I compare it with. So I just write the most important recent changes, in both application-view and library-view.
Breaking Compatibility
- Config migration
- Config file becomes a config directory containing config file
- Config file format changes from Python (loaded by
exec
) to JSON - Remove some obsolete / unused config parameters, and rename some
- Remove permanent
sort
boolean flag- Must give
--sort
in command line to enable sorting for most of output formats
- Must give
- Load user-defined plugins from a directory named
plugins
inside config directory
- Glossary class
- Remove some obsolete / unused method
copy
,attach
,merge
,deepMerge
,takeWords
,getInputList
,getOutputList
- Rename some methods:
reverseDic
->reverse
- Make some public attributes private:
data
->_data
info
->_info
filename
->_filename
- Clear (reset) the Glossary instance (data, info, etc) after
write
operation- Glossary class is for converting from file(s) to file, not keeping data in memory
- New methods:
convert
:convert
method is added to be used instead ofread
and thenwrite
- Not just for convenience, but it's also recommended,
- and let's Glossary class to have a better default behavior
- for example it enables direct mode by default (stay tuned) if sorting is not enabled (by user or plugin)
- all UI modules (Command line, Gtk3, Tkinter) use Glossary.convert method now
- Sorting policy
sort
boolean flag is now an argument towrite
method- sort=True if user gives
--sort
in command line - sort=False if user gives
--no-sort
in command line - sort=None if user does not give either, so
write
method itself decides what to do
- sort=True if user gives
- Now we allow plugins to specify sorting policy based on output format
- By
sortOnWrite
variable in plugin, with allowed values:ALWAYS
: force sorting even if sort=False (user gives--no-sort
), used only for writing StarDictDEFAULT_YES
: enable sorting unless sort=False (user gives--no-sort
)DEFAULT_NO
: disable sorting unless sort=True (user gives--sort
)NEVER
: disable sorting even if sort=True (user gives--sort
)
- The default and common value is:
sortOnWrite = DEFAULT_NO
- Plugin can also have a global
sortKey
function to be used for sorting - (like the
key
argument tolist.sort
method, Seepydoc list.sort
)
- By
- New way of interacting with Glossary instance in plugins:
glos.data.append((word, defi))
->glos.addEntry(word, defi)
for item in glos.data:
->for entry in glos:
for key, value in glos.info.items():
->for key, value in glos.iterInfo():
- Remove some obsolete / unused method
Gtk2 to Gtk3
- Replace obsolete PyGTK-based interface with a simpler PyGI-based (Gtk3) interface
Migrating to Python 3
- Even though
master
branch was based on Python 3 since 2016 Apr 29, there was some problem that are fixed in this release - If you are still forced need to use Python 2.7, you can use branch
python2.7
Introducing Direct mode
--direct
command line option- reads and writes at the same time, without loading the whole data into memory
- Partial sorting is supported
--sort
in command line--sort-cache-size=1000
is optional
- If plugin defines sortOnWrite=ALWAYS, it means output format requires full sorting, so direct mode will be disabled
- As mentioned above (using
Glossary.convert
method), direct mode is enabled by default if sorting is not enabled (by user or plugin) - Of course user can manually disable direct mode by giving
--indirect
option in command line
Progress Bar
Automatic command line Progress Bar for all input / output formats is now supported
- Implemented based on plugins Reader classes
- Works both for direct mode and indirect mode
- Only one progress bar for direct mode
- Two progress bars for indirect mode (one while reading, one while writing)
- Plugins must not update the progress bar anymore
- Still no progress bar when both
--direct
and--sort
flags are given, will be fixed later - User can disable progress bar by giving
--no-progress-bar
option (recommended for Windows users)
BGL Plugin
- BGL plugin works better now (comparing to latest Python 2.7 code), and it's much cleaner too
- I totally refactored the code, made it fully Python3-compatible, and much more easier to understand
- This fixes bytes/str bugs (like Bug #54), and CRC check problem for some glossaries (Bug #55)
- I'm a fan of micro-commits and I usually hate single-commit refactoring, but this time I had no choice!
Other Changes
Feature: Add encoding
option to read and write drivers of some plain-text formats
Feature: SQL and SQLite: read/write extra information from/to a new table dbinfo_extra, backward compatible
New format invented and implemented for later implementation of a Glossary Editor
edlin.py
(Editable Linked List of Entries) is optimized for adding/modifying/removing one entry at a time- while we can save the changes instantly after each modification
- Using the ideas of Doubly Linked List, and Git's hash-based object database
Rewrite non-working Reverse functionality
- The old code was messy, not working by default, slow, and language-dependent
- It's much faster and cleaner now
Improve and complete command line help (-h
or --help
)
Assets 2
You can’t perform that action at this time.