-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store dictionaries as SQLite databases
- Loading branch information
Showing
11 changed files
with
194 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
import dataclasses | ||
from pathlib import Path | ||
|
||
from ankiutils.consts import AddonConsts as BaseAddonConsts | ||
from ankiutils.consts import get_consts | ||
|
||
consts = get_consts(__name__) | ||
|
||
@dataclasses.dataclass | ||
class AddonConsts(BaseAddonConsts): | ||
userfiles_dir: Path | ||
dicts_dir: Path | ||
icons_dir: Path | ||
|
||
|
||
base_consts = get_consts(__name__) | ||
consts = AddonConsts( | ||
**dataclasses.asdict(base_consts), | ||
userfiles_dir=base_consts.dir / "user_files", | ||
dicts_dir=base_consts.dir / "user_files" / "dictionaries", | ||
icons_dir=base_consts.dir / "icons" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.