30 lines
810 B
Rust
30 lines
810 B
Rust
use crate::asset_account::AssetAccount;
|
|
use crate::books::Books;
|
|
use crate::external_account::ExternalAccount;
|
|
use crate::oracle::CommoditiesPriceOracle;
|
|
use crate::spreadsheet::export_to_spreadsheet;
|
|
|
|
pub mod asset_account;
|
|
pub mod books;
|
|
pub mod external_account;
|
|
pub mod oracle;
|
|
pub mod spreadsheet;
|
|
|
|
use clap::Parser;
|
|
|
|
/// Search for a pattern in a file and display the lines that contain it.
|
|
#[derive(Parser)]
|
|
struct CommandLineParser {
|
|
/// The pattern to look for
|
|
book_file: String,
|
|
start_date: String,
|
|
stop_date: String,
|
|
}
|
|
|
|
fn main() {
|
|
let args = CommandLineParser::parse();
|
|
let mut books = Books::new(&args.start_date, &args.stop_date);
|
|
books.load_ledger(&args.book_file, &args.stop_date);
|
|
export_to_spreadsheet("test.ods", &books, &args.start_date, &args.stop_date);
|
|
}
|