2021-05-11 18:12:41 +02:00
|
|
|
#!/bin/sh
|
|
|
|
CACHE="${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/cache.db"
|
|
|
|
unread="$(sqlite3 "$CACHE" "SELECT unread,pubDate,title FROM rss_item;" |
|
2021-05-11 18:19:14 +02:00
|
|
|
grep -vE '^0' | sort -t'|' -k2 -gr | head -n1 |
|
2021-05-11 18:12:41 +02:00
|
|
|
sed 's/[0-9]*|[0-9]*|//')"
|
|
|
|
|
|
|
|
notify-send "newsboat" "$(printf 'new article:\n %s' "$unread")"
|