Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom location of dictionaries #111

Open
zdposter opened this issue Jun 25, 2022 · 4 comments
Open

Custom location of dictionaries #111

zdposter opened this issue Jun 25, 2022 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@zdposter
Copy link

Please allow to set custom location of (hunspell) dictionaries - I do not want to have the same dictionaries on multiple location.

@zdposter zdposter added the enhancement New feature or request label Jun 25, 2022
@krassowski
Copy link
Collaborator

What locations are you using? Maybe we could just add them for everyone if that makes sense. Also, which operating system? On the other hand, have you considered symlinking?

@zdposter
Copy link
Author

I use windows.
I did not consider symlink - IMO that is workaround. I prefer cleaner solution with config option.
Hunspell is used these projects I use regularly: libreoffice, chromium, firefox, thunderbird, notepad++ (maybe more).

Hunspell checks for env variable DICPATH + it looks at many different locations (hunspell.exe -D):

SEARCH PATH:
.;;C:\Hunspell\;C:\Users\USER\Application Data\OpenOffice.org 2\user\wordbook;C:\Users\USER\AppData\Roaming\LibreOffice\4\user\wordbook;C:\Program files\OpenOffice.org 2.4\share\dict\ooo\;C:\Program files\OpenOffice.org 2.3\share\dict\ooo\;C:\Program files\OpenOffice.org 2.2\share\dict\ooo\;C:\Program files\OpenOffice.org 2.1\share\dict\ooo\;C:\Program files\OpenOffice.org 2.0\share\dict\ooo\C:\Program Files\LibreOffice\share\extensions;C:\Program Files (x86)\LibreOffice\share\extensions
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
C:\Users\USER\AppData\Roaming\LibreOffice\4\user\wordbook\standard

https://github.com/hunspell/hunspell/blob/80d24cc3a664d04bbc62be27e1580d1aa181900b/src/tools/hunspell.cxx#L2041-L2060

https://github.com/hunspell/hunspell/blob/80d24cc3a664d04bbc62be27e1580d1aa181900b/src/tools/hunspell.cxx#L118-L147

@krassowski
Copy link
Collaborator

I think that it would be nice to add these here:

'Windows': [
# TODO - contributions welcome
]

Though we would likely need to do some variable name expansions to cover USERs and possibly allow glob patterns to allow for different open/libre office versions?

data_paths.extend(OS_SPECIFIC_PATHS[system])

@ocordes
Copy link
Collaborator

ocordes commented Jul 6, 2022

This looks good so far, the problem is to cover all possible directories for the different OSes. Linux is easy, but
for Darwin you have different ways to install the dictionaries, my dictionaries are in ~/Library/Spellchecker ... actually I don't have a clue how this can be addressed in Windows ...

@krassowski krassowski added the good first issue Good for newcomers label Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants