Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[flnews] Archive headers

2 views
Skip to first unread message

yamo'

unread,
Dec 23, 2022, 4:59:54 AM12/23/22
to
Hi,

flnews has a good functionality : handle the Archive header
but not the classical XNAY.

Is it configurable?

A spell checker would also be great!

--
Stéphane 🔗<http://pasdenom.info/fortune/>
Petit poisson deviendra grand,
Pourvu que Dieu lui prête vie.
-+- Jean de La Fontaine (1621-1695),
Le Petit Poisson et le Pêcheur (Fables V.3) -+-

Michael Bäuerle

unread,
Dec 23, 2022, 6:12:31 AM12/23/22
to
yamo' wrote:
>
> flnews has a good functionality : handle the Archive header
> but not the classical XNAY.
>
> Is it configurable?

There is no direct support, but the postprocessor feature can be used
to add additional headers.
Check the documentation for the entry "post_proc" in "configfile".

Example for a POSIX script "~/.config/flnews/pp_script.sh":
------------------------------------------------------------------------
#! /bin/sh

# Abort on error
set -e

# Set locale with UTF-8 encoding for awk
# Note: The filter will be feeded with whole article (body is always UTF-8 encoded)
export LC_ALL=en_US.UTF-8

# Process article
awk -v i=0 '/^Archive: no\r$/ { print ; if(!i) print "X-No-Archive: yes\r" ; i=1 ; next } /^\r$/ { i=1 } { print }'
------------------------------------------------------------------------

The locale name "en_US.UTF-8" must be modified to match an existing
locale of your system (that uses UTF-8 encoding).
Check with "locale -a" what your system offers.

awk looks for the header field "Archive: no" (as defined in RFC 5536)
and prints the nonstandard "X-No-Archive: yes" only if it is present.
This is done only once and only in the header of the article.

The postprocessor script must have the executable bit set and the
following entry in "configfile" tells flnews to execute it before
an article is sent:
|
| post_proc: /home/micha/.config/flnews/pp_script.sh
^^^^^^^^^^^^^^^^^^^
Modify this part to match your system.

If the checkbox for "Archive" in the GUI is deactivated, both headers
are added now.

> A spell checker would also be great!

Currently not on the roadmap, but an external editor can be used (that
provides that feature).
Check the documentation for the entry "editor" in "configfile".

Example:
|
| editor: /usr/pkg/bin/xnedit

Attention:
The editor must support (and be configured for) UTF-8 encoding.

Michael Bäuerle

unread,
Dec 30, 2022, 3:40:08 AM12/30/22
to
yamo' wrote:
> Michael Bäuerle a tapoté :
> > yamo' wrote:
> >
> > Example for a POSIX script "~/.config/flnews/pp_script.sh":
>
> Could it be packaged with flnews?

Yes, maybe I should add some more example scripts.

yamo'

unread,
Jan 4, 2023, 4:51:57 AM1/4/23
to
Hi,
Michael Bäuerle a tapoté :
> > Could it be packaged with flnews?
>
> Yes, maybe I should add some more example scripts.

Thanks and happy new year!

--
Stéphane
Le génie est fait d'un dixième d'inspiration... et de neuf dixième de
transpiration.
-+- Thomas Edison (1847-1931) -+-

Michael Bäuerle

unread,
Jan 27, 2023, 11:08:05 AM1/27/23
to
yamo' wrote:
> Michael Bäuerle a tapoté :
> >
> >
> > Example for a POSIX script "~/.config/flnews/pp_script.sh":
>
> Could it be packaged with flnews?

Now included in this snapshot:
<https://micha.freeshell.org/flnews/src/flnews-1.2.0pre18.tar.bz2>
Size(flnews-1.2.0pre18.tar.bz2)= 1214958
SHA2-256(flnews-1.2.0pre18.tar.bz2)= bf5e6cc4ff1bb1553b2237de58527d3abf163bcccfa9a8367e4ae89af29be7ae
0 new messages