oxt_import module reference¶
-
gtkspellcheck.oxt_import.
deflate_oxt
(oxt_path, extract_path, override=False, move_path=None)¶ Uncompress, read and install LibreOffice
.oxt
dictionaries extensions.Parameters: - oxt_path – path to a directory containing the
.oxt
extensions. - extract_path – path to extract Hunspell dictionaries files.
- override – override files.
- move_path – Optional path to move the
.oxt
files after processing.
Return type: None
This function extracts the Hunspell dictionaries (
.dic
and.aff
files) from all the.oxt
extensions found onoxt_path
directory to theextract_path
directory.Extensions like the ones found here:
In detail, this functions does the following:
- Find all the
.oxt
extension files withinoxt_path
- Open (unzip) each extension.
- Find the dictionary definition file within (dictionaries.xcu)
- Parse the dictionary definition file and locate the dictionaries files.
- Uncompress those files to
extract_path
.
By default file overriding is disabled, set
override
parameter to True if you want to enable it. As and additional option, each processed extension can be moved tomove_path
.- oxt_path – path to a directory containing the