You are not logged in.

#1 2022-05-18 05:56:44

860lacov
Member
Registered: 2020-05-02
Posts: 497

How to enable news reader during update?

I don't know how to call this function so it it hard for me to find an answer for this question.

In pikaur when I do pikaur -Syu I get news from archlinux.org
For Example today it looked liket this:

:: Starting full AUR upgrade...
Reading repository package databases...
Reading local package database...
Reading AUR packages info...

There is news from archlinux.org!

Undone replacement of pipewire-media-session with wireplumber (Thu, 12 May 2022 19:48:50 +0000)
    Two days ago the wireplumber package was made to replace pipewire-media-session as the latter session manager ...

If I cancel the update process then the same news isn't showed again.

How can I set up this functionality in pacman? I usually do pacman -Syu. Today I did this in pikaur just to check if there are any aur updates and I got message I mentioned above.

Before every update, I check Arch main page for important news but I like this terminal info.

Offline

#2 2022-05-18 06:10:43

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How to enable news reader during update?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2022-06-19 20:37:26

860lacov
Member
Registered: 2020-05-02
Posts: 497

Re: How to enable news reader during update?

Thank you, but isn't it strictly for pikaur?
I have very basic coding/scripting knowledge, and I don't know what should I do with the script from the link.

Offline

#4 2022-06-19 21:04:35

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How to enable news reader during update?

If you want that functionality in pacman, you will have to patch it. Or convince the pacman dev's to implement it (which won't happen).


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2022-06-19 23:03:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,573

Re: How to enable news reader during update?

#!/bin/bash
LASTNEWS=$(<$HOME/.archnews.last)
[ -z "$LASTNEWS" ] && LASTNEWS="blafoobardummydontfail"
curl -s 'https://archlinux.org/feeds/news/' | tr -d '\n' > /tmp/archnews.rss
xmlstarlet sel -t -m "//item" -n -o '\e[34m' -v pubDate -o '\e[1m' -n -v title -o '\e[0m' -n -v description -n /tmp/archnews.rss | \
sed -s "/$LASTNEWS/Q; s/&lt;/</g;s/&gt;/>/g;s/<code>/\x1B[1;32m/g;s%</code>%\x1B[0m%g; \
       s/<a href=[^>]*>//g; s%</a>%%g; s/<p>/\n/g; s%</p>%\n%g; \
       s/<li>/\t· /g; s%</li>%\n%g; s%<ul>%\n%g; s%</ul>%\n%g; s%<br />%\n%g;\
       s/<em>/\x1B[1m/g;s%</em>%\x1B[0m%g; s/<strong>/\x1B[1m/g;s%</strong>%\x1B[0m%g; \
       s/<pre>/\t/g;s%</pre>%\x1B[0m%g; s/\\\e\[/\x1B[/g" | less -RF
xmlstarlet sel -t -v "//item/pubDate" /tmp/archnews.rss | head -1 > $HOME/.archnews.last

Offline

Board footer

Powered by FluxBB