aboutsummaryrefslogtreecommitdiff
path: root/files/bibiman.toml
blob: df260fe3f09fd3cee3db6997647b026d753f28b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# [general]
## Default files/dirs which are loaded on startup
## Use absolute paths (~ for HOME works). Otherwise, loading might not work.
# bibfiles = [ "/path/to/bibfile", "path/to/dir/with/bibfiles" ]

## Default editor to use when editing files. Arguments are possible
# editor = "vim" # with args: "vim -y"

## Default app to open PDFs/Epubs
# pdf_opener = "xdg-open"

## Default app to open URLs/DOIs
# url_opener = "xdg-open"

## Prefix which is prepended to the filepath from the `file` field
## Use absolute paths (~ for HOME works). Otherwise, loading might not work.
# file_prefix = "/some/path/prefix"

# [colors]
## Default values for dark-themed terminal
## Possible values are:
## ANSI color names. E.g. "bright-black"
## 256-colors indices. E.g. "250"
## Hex color codes. E.g. "#3a3a3a"
# main_text_color = "250"
# highlight_text_color = "254"
# entry_color = "36"
# keyword_color = "101"
# info_color = "99"
# confirm_color = "47"
# warn_color = "124"
# bar_bg_color = "234"
# popup_bg_color = "234"
# selected_row_bg_color = "237"
ss="c1">// You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. ///// use app::App; use cliargs::CLIArgs; use color_eyre::eyre::Result; use config::BibiConfig; use errorsetup::init_error_hooks; pub mod app; pub mod bibiman; pub mod cliargs; pub mod config; pub mod errorsetup; pub mod tui; #[tokio::main] async fn main() -> Result<()> { // Parse CLI arguments let mut parsed_args = CLIArgs::parse_args()?; // Print help if -h/--help flag is passed and exit if parsed_args.helparg { println!("{}", cliargs::help_func()); std::process::exit(0); } // Print version if -v/--version flag is passed and exit if parsed_args.versionarg { println!("{}", cliargs::version_func()); std::process::exit(0); } if parsed_args .cfg_path .as_ref() .is_some_and(|f| !f.try_exists().unwrap() || !f.is_file()) { BibiConfig::create_default_config(&parsed_args); } let mut cfg = if parsed_args.cfg_path.is_some() { BibiConfig::parse_config(&parsed_args)? } else { BibiConfig::new(&parsed_args) }; cfg.cli_overwrite(&parsed_args); init_error_hooks()?; // Create an application. let mut app = App::new(&mut parsed_args, &mut cfg)?; app.run(&cfg).await?; Ok(()) }