Initial commit: MTG personal library catalog (Tauri v2 + React/TS)
Full working app with: - Rust core (mtgc-core): Scryfall ingester, nucleo fuzzy search, SQLite two-DB architecture (reference.db + library.db via ATTACH), criteria filters, deck ops - Tauri v2 shell exposing the core as typed IPC commands - React/TS frontend: card entry, library browser, deck editor - Features: fuzzy card search, color/CMC/type/commander-identity filters, tile/list view toggle, hover card previews, deck format + commander support, per-card location field, grouping by type/subtype/CMC/color, localStorage persistence for active tab/deck/grouping, Discord-inspired dark UI (#C8553D accent) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
28
crates/mtgc-core/src/bin/ingest.rs
Normal file
28
crates/mtgc-core/src/bin/ingest.rs
Normal file
@@ -0,0 +1,28 @@
|
||||
//! CLI: build reference.db from Scryfall bulk data.
|
||||
//!
|
||||
//! Usage: `mtgc-ingest [path/to/reference.db]` (defaults to ./reference.db)
|
||||
|
||||
use std::path::PathBuf;
|
||||
use std::process::ExitCode;
|
||||
|
||||
fn main() -> ExitCode {
|
||||
let dest = std::env::args()
|
||||
.nth(1)
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|| PathBuf::from("reference.db"));
|
||||
|
||||
eprintln!("Building reference db at {}", dest.display());
|
||||
match mtgc_core::ingest::build_reference_db(&dest, |msg| eprintln!(" {msg}")) {
|
||||
Ok(stats) => {
|
||||
eprintln!(
|
||||
"Done: {} oracle cards, {} printings.",
|
||||
stats.oracle_cards, stats.printings
|
||||
);
|
||||
ExitCode::SUCCESS
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("Ingest failed: {e}");
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user