added command-line argument to specify repository path
Dependencies
- [2]
PL4TK55Oadded command-line argument to specify executable path - [3]
4RPYR65Cconnect GUI to pijul to display simple channel list - [4]
IQY5LHENadd GUI element to display simple `pijul log` results - [5]
NCRTU7M4cargo init - [6]
NSE6BLWAinit slint project from https://github.com/slint-ui/slint-rust-template - [*]
6ECOC7L5parsed `pijul channel` text blob into individual UI components
Change contents
- edit in ui/app-window.slint at line 106[2.35][8.792]
in property <string> repo_path; - replacement in src/main.rs at line 6
use std::path::Path;use std::path::{Path, PathBuf}; - edit in src/main.rs at line 19
ui.set_repo_path(match cli_args.repo_path {Some(path_str) => path_str.into(),None => path_to_uistr(std::env::current_dir()?),}); - replacement in src/main.rs at line 31
let repo_path = Path::new("/Users/beckerawqatty/Repos/pijul-gui/");let repo_path_string = ui.get_repo_path();let repo_path = Path::new(repo_path_string.as_str()); - replacement in src/main.rs at line 60
let repo_path = Path::new("/Users/beckerawqatty/Repos/pijul-gui/");let repo_path_string = ui.get_repo_path();let repo_path = Path::new(repo_path_string.as_str()); - replacement in src/main.rs at line 98
/// the file path of the `pijul` executable#[argh(option, default = "\"pijul\".to_string()")]/// the file system path of the `pijul` executable#[argh(option, default = "\"pijul\".into()")]// TODO argh does not support OS strings:// https://github.com/google/argh/blob/f02f6b44444b340a553ff2db298744721ebc77a7/argh/src/lib.rs#L698// -> use raw std::env::args_os?:// https://doc.rust-lang.org/std/env/fn.args_os.html//exe_path: PathBuf, - edit in src/main.rs at line 106
/// the file system path of the pijul repository (i.e., the directory containing the `.pijul` folder)#[argh(option)]// TODO argh does not support OS strings:// https://github.com/google/argh/blob/f02f6b44444b340a553ff2db298744721ebc77a7/argh/src/lib.rs#L698// -> use raw std::env::args_os?:// https://doc.rust-lang.org/std/env/fn.args_os.html// repo_path: Option<PathBuf>,repo_path: Option<String>,}fn path_to_uistr(path: PathBuf) -> SharedString {format!("{:?}", path).into()