index : livejrnl-rs.git

ascending towards madness

author berrysweet <berrysweet@noreply.codeberg.org> 2023-07-06 9:12:06.0 +00:00:00
committer berrysweet <berrysweet@noreply.codeberg.org> 2023-07-06 9:12:06.0 +00:00:00
commit
2b780be532ce858b348917432e303006ca45084b [patch]
tree
4eb70aa7cb43076e9e14a0233f8b4def12c7dddb
parent
14859feb4caaea250c9d78eb2539bd2622d24018
download
2b780be532ce858b348917432e303006ca45084b.tar.gz

feat: add accepting input piped from jrnl



Diff

 Cargo.toml  | 1 +
 src/main.rs | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/Cargo.toml b/Cargo.toml
index 948bc3e..c918f03 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,3 +9,4 @@ edition = "2021"
confy = "0.5.1"
serde = { version = "1.0.164", features = ["derive"] }
walkdir = "2.3.3"
read_pipe = "0.1.2"
\ No newline at end of file
diff --git a/src/main.rs b/src/main.rs
index ddfc8bc..5a889c7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -8,6 +8,12 @@ mod util {
const APP_NAME: &str = "livejrnl-rs";

fn main() {
	let mut jrnl_json: String = String::new();
	if let Some(pipe) = read_pipe::read_pipe() {
		jrnl_json.push_str(&pipe);
	}
	println!("{:#?}", jrnl_json);

	let config_data = load_config();
	match config_data {
		Ok(config_data) => {