Trangar / zettelkasten

Rust implementation of https://en.wikipedia.org/wiki/Zettelkasten
MIT License
2 stars 1 forks source link

zettelkasten

Rust implementation of https://en.wikipedia.org/wiki/Zettelkasten

Configuration

Zettelkasten is build up out of the following modules:

The following confirmations are available:

runtime data front
async-std sqlite terminal
postgres

Note that these modules can be mixed and matched in any way you want.

To run a particular combination, pass the set you want as feature flags. e.g.:

# runtime: async-std
# data: sqlite
# front: terminal
cargo run --features runtime-async-std,data-sqlite,front-terminal

Additionally you can use just:

cargo install just

And then run one of:

command runtime data front
just run_terminal async-std sqlite terminal

Setup

We highly recommend installing sqlx-cli:

cargo install sqlx-cli --no-default-features --features rustls,sqlite,postgres

Some configs require custom setup instructions

data-sqlite

data-sqlite will look for, or create, a database in the following places:

For local development where you also have a running zettelkasten system, we highly recommend setting DATABASE_URL to a temp database while working on this project.

To set a temp database you need to:

data-postgres

data-postgres will look for a database connection string in one of the following environment variables:

If such an environment variable is not set, postgres will not be able to run.

For local development where you also have a running zettelkasten system, we highly recommend setting DATABASE_URL to a temp database while working on this project.

To set a temp database you need to:

Contributing

Updating schema

When a change in the database schema is made, please follow the following steps to make sure the sqlx-data.json is properly updated: