Skip to main content

Module service

Module service 

Source
Expand description

High-level service for monolingual dictionary management.

MonolingualDictionaryService is the single public entry point for all monolingual dictionary operations: querying the remote catalogue, listing installed dictionaries, and installing a new one.

Structsยง

MonolingualDictionaryService
Provides monolingual dictionary management: querying available dictionaries, listing installed ones, and downloading + extracting new ones.

Constantsยง

READER_DICT_SUBDIR ๐Ÿ”’
Subdirectory inside the dictionaries root where reader-dict downloads live.

Functionsยง

dict_file_target_name ๐Ÿ”’
Maps a ZIP entry filename to its renamed output filename <lang>.<ext>.
extract_zip_renamed ๐Ÿ”’
Extracts all entries from a ZIP archive into dest, renaming each file to Reader-Dict-<lang><ext> where <ext> is .index, .dict, or .dict.dz.
has_dict_pair ๐Ÿ”’
Returns true when dir contains at least one .index file that is paired with a .dict or .dict.dz file sharing the same stem.