Something went wrong. Try again.
My personal-knowledge-system, with deeply integrated task tracking and long term goal planning capabilities.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061# https://just.systems
default: @just --list
# debug mode by defaultmode := "debug"
cargo_flags := if mode == "release" { "--release" } else { "" }
# Builds everything in the workspacebuild: cargo build {{ cargo_flags }}
# Runs Filamentsrun: cargo run {{ cargo_flags }}
# Run all teststest: cargo nextest r {{ cargo_flags }}reset: rm -rf ./ZettelKasten rm -rf ./.data cargo run -- init cargo run
# Only used to build / generate entitiesdev-db := justfile_directory() + "/target/dev.db"dev-db-url := "sqlite:///" + dev-db
# build entities from migrations[working-directory("crates/dto")]entity: # remove dev db if it exists, and create a new one rm -f {{ dev-db }} touch {{ dev-db }}
# run the migration cd migration && cargo run -- -u {{ dev-db-url }}
# generate entity files based off the migraiton sea-orm-cli generate entity \ --database-url {{ dev-db-url }} \ --output-dir ./src/entity \ --experimental-preserve-user-modifications \ --entity-format=dense # add flag if expanded format is needed for debugging
# replace elementary types with specific ones sed -i 's/pub nano_id: String/pub nano_id: NanoId/g' ./src/entity/*.rs sed -i 's/pub priority: String/pub priority: Priority/g' ./src/entity/*.rs sed -i 's/pub color: i64/pub color: Color/g' ./src/entity/*.rs
# replace parent_group_id with proper nano_id sed -i 's/pub parent_group_id: Option<String>/pub parent_group_id: Option<NanoId>/g' ./src/entity/*.rs
# replace foregin key id's with nano_id sed -i 's/pub group_id: String/pub group_id: NanoId/g' ./src/entity/*.rs sed -i 's/pub zettel_id: String/pub zettel_id: NanoId/g' ./src/entity/*.rs