lets test
This commit is contained in:
6
homegrown/email/.dockerignore
Normal file
6
homegrown/email/.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
||||
debug
|
||||
target
|
||||
**/*.rs.bk
|
||||
*.pdb
|
||||
**/mutants.out*/
|
||||
|
1838
homegrown/email/Cargo.lock
generated
Normal file
1838
homegrown/email/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
11
homegrown/email/Cargo.toml
Normal file
11
homegrown/email/Cargo.toml
Normal file
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "email"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
reqwest = { version = "0.12", features = ["json"] }
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
lettre = "0.11"
|
4
homegrown/email/Dockerfile
Normal file
4
homegrown/email/Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
||||
FROM rust:1.88.0
|
||||
COPY ./ ./
|
||||
RUN cargo build --release
|
||||
CMD ["./target/release/email"]
|
2
homegrown/email/readme.md
Normal file
2
homegrown/email/readme.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# email
|
||||
sends me an email every monday with all the new videos from channels i like on youtbue
|
13
homegrown/email/src/main.rs
Normal file
13
homegrown/email/src/main.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
//getting the list of channels with id's first
|
||||
let resp = reqwest::get("https://raw.githubusercontent.com/bvanroll/home/static/yters.json")
|
||||
.await?
|
||||
.json::<HashMap<String, String>>()
|
||||
.await?;
|
||||
println!("{resp:#?}");
|
||||
Ok(())
|
||||
|
||||
}
|
Reference in New Issue
Block a user