diff options
| author | lukeflo | 2024-09-26 22:20:21 +0200 |
|---|---|---|
| committer | lukeflo | 2024-09-26 22:20:21 +0200 |
| commit | 576e7a39312f26ff3df24cf2eb279e6fdabbe903 (patch) | |
| tree | 26cda065ccf821c9b26036046854f3b768828be1 /src/main.rs | |
| parent | 81cd14a7603ce4a9b312f3a5a62eb8e9ad7e3e2f (diff) | |
| download | bibiman-576e7a39312f26ff3df24cf2eb279e6fdabbe903.tar.gz bibiman-576e7a39312f26ff3df24cf2eb279e6fdabbe903.zip | |
refinement of bib backend 2.0
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index a9011f6..a07b75a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,10 @@ use std::io; -use backend::cliargs::{self, CLIArgs}; +use backend::{ + bib::{BibiData, BibiMain}, + cliargs::{self, CLIArgs}, +}; use ratatui::{backend::CrosstermBackend, Terminal}; use crate::{ @@ -50,8 +53,11 @@ async fn main() -> AppResult<()> { // TODO: Implement logic for CLI arguments/options which need to be handled // before the TUI is started + let mut bib_main = BibiMain::new(); + let mut bib_data = BibiData::new(&bib_main.bibliography, &bib_main.citekeys); + // Create an application. - let mut app = App::new(); + let mut app = App::new(&mut bib_main, &mut bib_data); // Initialize the terminal user interface. let backend = CrosstermBackend::new(io::stdout()); @@ -75,5 +81,7 @@ async fn main() -> AppResult<()> { // Exit the user interface. tui.exit()?; + // let idx = &app.entry_table.entry_table_state.selected().unwrap(); + // println!("{:#?}", &app.entry_table.entry_table_items[*idx].citekey); Ok(()) } |
