From 639ddf4b2e88bdc95a9e09eadea1be606327dea5 Mon Sep 17 00:00:00 2001 From: A Farzat Date: Sun, 8 Feb 2026 11:22:27 +0300 Subject: Add display and config modules --- src/config.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/config.rs (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..1f3a846 --- /dev/null +++ b/src/config.rs @@ -0,0 +1,11 @@ +use std::path::{Path, PathBuf}; + +pub fn cookies_file() -> PathBuf { + let exe = std::env::current_exe().unwrap(); + exe.parent().unwrap_or(Path::new(".")).join("cookies.json") +} + +pub fn books_root() -> PathBuf { + let exe = std::env::current_exe().unwrap(); + exe.parent().unwrap_or(Path::new(".")).join("Books") +} -- cgit v1.2.3-70-g09d2