diff --git a/Cargo.toml b/Cargo.toml index ab6f164..5e7894a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] -# ammonia = "*" done by feed-rs anyhow = "*" clap = { version = "*", features = ["derive"] } env_logger = "*" diff --git a/src/feed_store.rs b/src/feed_store.rs index 8b9cba3..9e72e6c 100644 --- a/src/feed_store.rs +++ b/src/feed_store.rs @@ -41,7 +41,7 @@ impl FeedStore { format!("{}.toml", self.feed_path(url)) } - pub fn get_fetchdata(&self, url: &Url) -> FetchData { + pub fn load_fetchdata(&self, url: &Url) -> FetchData { let path = self.fetchdata_path(url); if !fs::exists(path.clone()).unwrap() { return FetchData::default(); diff --git a/src/fetcher.rs b/src/fetcher.rs index bb98269..8cc469a 100644 --- a/src/fetcher.rs +++ b/src/fetcher.rs @@ -32,7 +32,7 @@ impl Fetcher { } pub fn fetch(&self, url: Url, feed_store: &FeedStore) -> bool { - let fetchdata = feed_store.get_fetchdata(&url); + let fetchdata = feed_store.load_fetchdata(&url); let mut builder = self .agent .get(url.to_string()) diff --git a/templates/index.html b/templates/index.html index 0c781cf..c82073e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -9,24 +9,28 @@ -
-

Planet TVL

- {% for entry in entries %} -
-

{{ entry.title|striptags }}

- {% if entry.published %}{{ entry.published | date(format="%Y-%m-%d %H:%M", timezone="Europe/Moscow") }}{% endif %}{# todo: maybe group posts by day? #} - -
- {{ entry.content }} -
-

full post

-
- {% endfor %} -
+
+

Planet TVL

+
+
+
+ {% for entry in entries %} + + {% endfor %} +
- + +