- add deck_terms to schema imports - add addTermsToDeck — diffs source term IDs against existing deck_terms, inserts only new ones, returns count of inserted terms - add updateValidatedLanguages — recalculates and persists validated_languages on every run so coverage stays accurate as translation data grows - wire both functions into main with isNewDeck guard to avoid redundant validated_languages update on deck creation - add final summary report - fix possible undefined on result[0] in createDeck - tick off remaining roadmap items
60 lines
960 B
Markdown
60 lines
960 B
Markdown
# notes
|
|
|
|
## tasks
|
|
|
|
- pinning dependencies in package.json files
|
|
- rethink organisation of datafiles and wordlists
|
|
|
|
## openwordnet
|
|
|
|
download libraries via
|
|
|
|
```bash
|
|
python -c 'import wn; wn.download("omw-fr")';
|
|
```
|
|
|
|
libraries:
|
|
|
|
odenet:1.4
|
|
omw-es:1.4
|
|
omw-fr:1.4
|
|
omw-it:1.4
|
|
omw-en:1.4
|
|
|
|
upgrade wn package:
|
|
|
|
```bash
|
|
pip install --upgrade wn
|
|
```
|
|
|
|
check if wn is available, eg italian:
|
|
|
|
```bash
|
|
python -c "import wn; print(len(wn.words(lang='it', lexicon='omw-it:1.4')))"
|
|
```
|
|
|
|
remove a library:
|
|
|
|
```bash
|
|
python -c "import wn; wn.remove('oewn:2024')" python -c "import wn; wn.remove('oewn:2024')"
|
|
```
|
|
|
|
list all libraries:
|
|
|
|
```bash
|
|
python -c "import wn; print(wn.lexicons())"
|
|
```
|
|
|
|
## drizzle
|
|
|
|
generate migration file, go to packages/db, then:
|
|
|
|
```bash
|
|
pnpm drizzle-kit generate
|
|
```
|
|
|
|
execute migration, go to packages/db (docker containers need to be running):
|
|
|
|
```bash
|
|
DATABASE_URL=postgresql://username:password@localhost:5432/database pnpm drizzle-kit migrate
|
|
```
|