aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-08-31 14:27:09 +0000
committerterminaldweller <devi@terminaldweller.com>2024-08-31 14:27:09 +0000
commiteb841f3c49bcc0bf591096e25b805e6b6616d21c (patch)
tree1f3d9291e10b253339d1666fb9b1586b0f11db53
parentadded rss functionality to milla, watchlists now allow you to give them a col... (diff)
downloadmilla-eb841f3c49bcc0bf591096e25b805e6b6616d21c.tar.gz
milla-eb841f3c49bcc0bf591096e25b805e6b6616d21c.zip
fixed a bug where we would still get previously seen feeds, updated the readme
Diffstat (limited to '')
-rw-r--r--README.md9
-rw-r--r--rss.go2
2 files changed, 8 insertions, 3 deletions
diff --git a/README.md b/README.md
index 23c19dd..3a41db3 100644
--- a/README.md
+++ b/README.md
@@ -347,9 +347,8 @@ ircProxy = "socks5://127.0.0.1:9050"
llmProxy = "http://127.0.0.1:8180"
skipTLSVerify = false
useTLS = true
-plugins = ["/plugins/plugin1.lua", "/plugins/plugin2.lua"]
adminOnly = false
-plugins = ["/plugins/ip.lua", "/plugins/urban.lua", "/plugins/remind.lua"]
+plugins = ["/plugins/ip.lua", "/plugins/urban.lua"]
[ircd.devinet.watchlist.security]
watchList = ["#securityfeeds"]
watchFiles = ["/watchfiles/voidbox.list"]
@@ -738,6 +737,11 @@ rss_feed()
```
The example rss plugin, accepts a yaml file as input, reeds the provided rss feeds once, extracts the title, author name and link to the resource, sends the feed over to the `#rssfeed` irc channel and exits.<br/>
+Also please note that this is just an example script. If you want milla to handle some rss feeds for you, you can use the builtin rss functionality.<br/>
+
+### Milla's Lua Module
+
+Here's a list of the available function in milla's lua module:
```lua
milla.send_message(msg, target)
@@ -872,6 +876,7 @@ Milla would not exist without the following projects:
- [pgx](https://github.com/jackc/pgx)
- [ollama](https://github.com/ollama/ollama)
- [toml](https://github.com/BurntSushi/toml)
+- [gofeed](https://github.com/mmcdole/gofeed)
## Similar Projects
diff --git a/rss.go b/rss.go
index c1d65aa..6bc8933 100644
--- a/rss.go
+++ b/rss.go
@@ -56,7 +56,7 @@ func GetFeed(feed FeedConfig,
slices.SortFunc(parsedFeed.Items, sortFunc)
for _, item := range parsedFeed.Items {
- if item.PublishedParsed.Unix() >= newestFromDB {
+ if item.PublishedParsed.Unix() > newestFromDB {
client.Cmd.Message(channel, parsedFeed.Title+": "+item.Title)
}
}