diff options
| author | A Farzat <a@farzat.xyz> | 2026-02-08 11:22:27 +0300 |
|---|---|---|
| committer | A Farzat <a@farzat.xyz> | 2026-02-08 11:22:27 +0300 |
| commit | 639ddf4b2e88bdc95a9e09eadea1be606327dea5 (patch) | |
| tree | a608d3811b7d1d0e0324930140fcb8ed0ec4563a /src/config.rs | |
| parent | 9d3bff94d9dfc332a6bb05efc923135cf22a35d2 (diff) | |
| download | safaribooks-rs-639ddf4b2e88bdc95a9e09eadea1be606327dea5.tar.gz safaribooks-rs-639ddf4b2e88bdc95a9e09eadea1be606327dea5.zip | |
Add display and config modules
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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") +} |
