cburgmer / cjklib

Han character library for CJKV languages
Other
149 stars 49 forks source link

Configuring install location #1

Closed tony closed 12 years ago

tony commented 12 years ago

When trying to set up cjklib in a development environment I want to control where the databases download to.

So I have the config file in $HOME/.cjklib.conf.

I set

[Connection]
url = sqlite:////Users/tony/.cjklib/cjklib.db

I would expect cjklib.dictionary.install to install cjklib.db to my user directory. However, it detects I'm on OSX (darwin) and attempts to install it to the system's Application Support.

The installer will use DictonaryInstaller.getDefaultDatabaseUrl(). As I would expect, it detects configuration['sqlalchemy.url'] in my config file, and also will default to download it to the cjklib dir itself (cjklib/cjklib/cjklib.db).

My fix allowed me to move forward configuring a local environment and installed the db to the correct location.

tony commented 12 years ago

I'm still at the tip of the ice burg when it comes to wrapping brain around this. The likelihood of this change cascading to other parts of the code was likely. :)

If we can set up cjklib to more transparently handle this / or document it better it'll create a decent starting point for further refactoring.

I'm closing this pull request and we can approach this as an issue.

cburgmer commented 12 years ago

Hi, sorry, didn't see your latest comment. I opened a new bug report for tracking this issue: #2