🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
6 messages
6 total messages Started by yamo' Fri, 23 Dec 2022 09:59
[flnews] Archive headers
#265921
Author: yamo'
Date: Fri, 23 Dec 2022 09:59
15 lines
1437 bytes
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) -+-
Re: [flnews] Archive headers
#265920
Author: Michael Bäuerle
Date: Fri, 23 Dec 2022 11:12
57 lines
2896 bytes
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.
Re: [flnews] Archive headers
#265922
Author: yamo'
Date: Thu, 29 Dec 2022 15:41
34 lines
2113 bytes
Hi,
Michael Bäuerle a tapoté :
> yamo' wrote:

> Example for a POSIX script "~/.config/flnews/pp_script.sh":

Could it be packaged with flnews?

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

It works fine! Thank you!

> 
> > 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.


I will search a standard Linux editor that could do that...

-- 
Stéphane 🔗<http://pasdenom.info/fortune/>
Plus le désir s'accroît, plus l'effet se recule. 
	-+- Pierre Corneille, Polyeucte -+-
Re: [flnews] Archive headers
#265926
Author: Michael Bäuerle
Date: Fri, 30 Dec 2022 08:39
9 lines
1203 bytes
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.
Re: [flnews] Archive headers
#265923
Author: yamo'
Date: Wed, 04 Jan 2023 09:51
13 lines
1574 bytes
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) -+-
Re: [flnews] Archive headers
#265928
Author: Michael Bäuerle
Date: Fri, 27 Jan 2023 15:34
12 lines
1552 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads