- Implement subscriptions view with bidirectional recurring transaction sync - Add cascade delete/pause/resume between subscriptions and recurring - Fix foreign key constraints when deleting recurring transactions - Add cross-view instant refresh via callback pattern - Replace Bezier chart smoothing with Fritsch-Carlson monotone Hermite interpolation - Smooth budget sparklines using shared monotone_subdivide function - Add vertical spacing to budget rows - Add app icon (receipt on GNOME blue) in all sizes for desktop, web, and AppImage - Add calendar, credit cards, forecast, goals, insights, and wishlist views - Add date picker, numpad, quick-add, category combo, and edit dialog components - Add import/export for CSV, JSON, OFX, QIF formats - Add NLP transaction parsing, OCR receipt scanning, expression evaluator - Add notification support, Sankey chart, tray icon - Add demo data seeder with full DB wipe - Expand database schema with subscriptions, goals, credit cards, and more
34 lines
968 B
Rust
34 lines
968 B
Rust
use std::path::PathBuf;
|
|
|
|
fn main() {
|
|
let data_dir: PathBuf = dirs_next().join("outlay");
|
|
let db_path = data_dir.join("outlay.db");
|
|
|
|
println!("Database path: {}", db_path.display());
|
|
|
|
if db_path.exists() {
|
|
println!("Removing existing database for a clean seed...");
|
|
std::fs::remove_file(&db_path).expect("Failed to remove existing database");
|
|
}
|
|
|
|
let db = outlay_core::db::Database::open(&db_path)
|
|
.expect("Failed to open database");
|
|
|
|
println!("Seeding demo data (2 years of realistic usage)...");
|
|
|
|
outlay_core::seed::seed_demo_data(&db)
|
|
.expect("Failed to seed demo data");
|
|
|
|
println!("Done! Restart Outlay to see the demo data.");
|
|
}
|
|
|
|
fn dirs_next() -> PathBuf {
|
|
if let Ok(dir) = std::env::var("XDG_DATA_HOME") {
|
|
PathBuf::from(dir)
|
|
} else if let Ok(home) = std::env::var("HOME") {
|
|
PathBuf::from(home).join(".local").join("share")
|
|
} else {
|
|
PathBuf::from(".")
|
|
}
|
|
}
|