From eeb8f1b39d965157ed3ea5f7bffae421cce435b3 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sat, 5 Oct 2024 22:37:02 +0200 Subject: reordering src structure, cli args struct --- src/backend/bib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/backend/bib.rs') diff --git a/src/backend/bib.rs b/src/backend/bib.rs index c897099..ba752a7 100644 --- a/src/backend/bib.rs +++ b/src/backend/bib.rs @@ -15,7 +15,6 @@ // along with this program. If not, see . ///// -use super::cliargs::PosArgs; use std::{fs, path::PathBuf}; use biblatex::{self, Bibliography}; @@ -33,9 +32,9 @@ pub struct BibiMain { } impl BibiMain { - pub fn new() -> Self { + pub fn new(main_bibfile: PathBuf) -> Self { // TODO: Needs check for config file path as soon as config file is impl - let bibfile = PosArgs::parse_pos_args().bibfilearg; + let bibfile = main_bibfile; let bibfilestring = fs::read_to_string(&bibfile).unwrap(); let bibliography = biblatex::Bibliography::parse(&bibfilestring).unwrap(); let citekeys = Self::get_citekeys(&bibliography); -- cgit v1.2.3