Article View: news.admin.peering
Article #1672Re: Renumber newsgroups by post date
From: Julien ÉLIE
Date: Fri, 05 May 2023 22:13
Date: Fri, 05 May 2023 22:13
63 lines
3778 bytes
3778 bytes
Hi Eli,
>>> The 'rnews01.batch' file contains these '^M' characters at the end of each
>>> line.
>>
>> Indeed, I'll have a look. Either by having pullnews write articles with
>> mere LF, or/and having rnews understand CRLF.
>
> I look forward to your solution.
Could you please test this following patch?
I've tested it with 2 articles in an rnews batch generated with rnews,
and it was imported fine.
(The first 2 fixes for Xref and Bytes are not needed in your case, but
should be fixed in the final commit as well as how $tx_len is computed.)
--- a/frontends/pullnews.in
+++ b/frontends/pullnews.in
@@ -1150,7 +1150,7 @@ sub crossFeedGroup {
my $xref_h
= "Xref: "
. $upstreamParams->{$server}->{name}
- . " $group:$i\n";
+ . " $group:$i\r\n";
splice(@{$article}, $idx_blank_pre_body, 0, $xref_h);
$tx_len += length($xref_h);
$idx_blank_pre_body++;
@@ -1162,7 +1162,7 @@ sub crossFeedGroup {
# field is not counted, as well as header fields
removed by
# pullnews.
my $bytes_real_count = $tx_len + scalar(@{$article});
- my $bytes_h = "Bytes: $bytes_real_count\n";
+ my $bytes_h = "Bytes: $bytes_real_count\r\n";
splice(@{$article}, $idx_blank_pre_body, 0, $bytes_h);
$tx_len += length($bytes_h);
$idx_blank_pre_body++;
@@ -1207,8 +1207,13 @@ sub crossFeedGroup {
) . "\n";
}
} elsif ($rnews) {
- printf RNEWS "#! rnews %d\n", $tx_len;
- map { print RNEWS $_ } @{$article};
+ my $artwithoutCR = "";
+ foreach my $line (@{$article}) {
+ $line =~ s/\r\n$/\n/;
+ $artwithoutCR .= $line;
+ }
+ printf RNEWS "#! rnews %d\n", length($artwithoutCR);
+ print RNEWS $artwithoutCR;
print LOG "+" unless $quiet;
$fed{$group}++;
$info{'rnews'}->{fed}++;
--
Julien ÉLIE
« Il avait juste assez de culture pour faire des citations fausses. »
(Byron)
Technical Details
Message-ID:
<u33v2v$1c60$4@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<7Qb1M.3786652$nwq3.3523857@fx13.ams4> <n6e5M.4177960$nwq3.2419823@fx13.ams4> <ihe5M.5661321$vSy3.4148856@fx04.ams4> <u33stc$1c5r$1@news.trigofacile.com> <SHe5M.5484231$MJk2.2274473@fx06.ams4>Show Full Headers
Complete Article Headers
Message-ID: <u33v2v$1c60$4@news.trigofacile.com> Subject: Re: Renumber newsgroups by post date Date: Sat, 6 May 2023 00:13:51 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <7Qb1M.3786652$nwq3.3523857@fx13.ams4> <n6e5M.4177960$nwq3.2419823@fx13.ams4> <ihe5M.5661321$vSy3.4148856@fx04.ams4> <u33stc$1c5r$1@news.trigofacile.com> <SHe5M.5484231$MJk2.2274473@fx06.ams4> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.admin.peering Organization: Groupes francophones par TrigoFACILE Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 5 May 2023 22:13:51 -0000 (UTC) Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105"; logging-data="45248"; mail-complaints-to="abuse@trigofacile.com" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Cancel-Lock: sha1:zWjAjZqe6nAmXRyocJfbdeCaAWg= sha256:/WiTXYnp2lIpbJ3SL5gLv+PLw7XD7BKO//nrd8BrN80= sha1:RC17HhTmmVc1jvoKTzIxi/LN/fw= sha256:e5qYtL24TcwlzxWMcniWJ4OhrrQEmnZhEEtlJVmgyno= In-Reply-To: <SHe5M.5484231$MJk2.2274473@fx06.ams4>