From b45c42343940f202a45e2cf4e27c59ad2c67e97b Mon Sep 17 00:00:00 2001 From: Lyle Mantooth Date: Sun, 13 Nov 2022 23:35:37 -0500 Subject: [PATCH 1/2] Add deps for zora-post. --- Cargo.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 417200b..2ad2a1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,11 @@ name = "zora" version = "0.1.0" edition = "2021" +[dependencies] +pico-args = "0.5.0" + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[dependencies.ureq] +version = "2.5.0" +features = ["cookies", "encoding_rs", "json", "serde_json"] From 4c3690e5295176ed8292b0abd86c9a94bdb63e4e Mon Sep 17 00:00:00 2001 From: Lyle Mantooth Date: Sun, 13 Nov 2022 23:53:27 -0500 Subject: [PATCH 2/2] First draft of zora-post. --- src/bin/zora-post/main.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/bin/zora-post/main.rs diff --git a/src/bin/zora-post/main.rs b/src/bin/zora-post/main.rs new file mode 100644 index 0000000..ef6f8a7 --- /dev/null +++ b/src/bin/zora-post/main.rs @@ -0,0 +1,14 @@ +use pico_args::Arguments; + +fn main() { + let args = Arguments::from_env(); + + // Get path to file to post from args. + // Read title from file's metadata. + // Read Zola config.toml. + // Determine URL to selected file using config data and file path (strip off `content/`, change .md to .html) + // Read cached Mastodon app data. + // If none, register on theres.life. + // Login as IslandUsurper. + // Post new status with title and URL, with #Bible #journal hashtags. +}