Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 1.77 KB

build_db.md

File metadata and controls

62 lines (40 loc) · 1.77 KB

Building the DB from scratch

  1. Download the repo
git clone --depth=1 https://github.com/digitalpalidictionary/dpd-db.git
  1. Navigate into the directory
cd dpd-db
  1. Download the submodules from Github
git submodule init && git submodule update
4. Install [nodejs](https://nodejs.org/en/download) for your operating system

5. Install [go](https://go.dev/doc/install) for your operating system

6. Install [uv](https://astral.sh/uv/install) for your operating system
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Install all the dependencies with uv
uv sync
  1. Run this once to initialize the project
uv run bash scripts/bash/initial_setup_run_once.sh
  1. Build the database, this can take up to an hour the first time.
uv run bash scripts/bash/initial_build_db.sh

That should create an SQLite database dpd.db in the root folder which can be accessed with DB Browser, DBeaver, through SQLAlechmy or your preferred method.

For a quick tutorial on how to access any information in the db with SQLAlchemy, see scripts/tutorial/db_search_example.py


Additional configuration

There are some additional dependencies in different parts of the project that may need to be installed depending on your use case.

  1. The GoldenDict exporter requires dictzip

  2. Running the GUI requires tkinter

  3. The database tests may require pyperclip dependencies.