Path: ...!weretis.net!feeder8.news.weretis.net!news.imp.ch!news.alphanet.ch!alphanet.ch!.POSTED!not-for-mail From: "M.V." Newsgroups: fr.comp.usenet.serveurs Subject: Re: =?UTF-8?B?UmF0aW8gbm9tYnJlIGRlIGxpZ25lcyBkZSBjaXRhdGlvbiA=?= =?UTF-8?B?LyBub21icmUgZGUgbGlnbmVzIGRlIHLDqXBvbnNl?= Date: Tue, 16 Aug 2022 20:46:16 -0000 (UTC) Organization: M.V. & Co Archive: no Message-ID: References: <6d81d728-e950-498f-8b90-da9ffe0903ban@googlegroups.com> <62f8caaa$0$22066$426a34cc@news.free.fr> <62f94176$0$9137$426a74cc@news.free.fr> Reply-To: michel.vauquois@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 16 Aug 2022 20:46:16 -0000 (UTC) Injection-Info: shakotay.alphanet.ch; posting-account="michelvauquois"; logging-data="32069"; mail-complaints-to="usenet@alphanet.ch"; posting-host="961b1d675b4792ec2ef50fdab1e0d2ea.nnrp.alphanet.ch" User-Agent: MacCafe/2.08 (Mac OS X 10.14.6 (18G9323) - MacBookAir7,2) Cancel-Lock: sha1:OzYX+dRkbPb4bMGfZTDeyMRXPzw= sha256:oRwI3PfyJvtPW7E3hgwMzLDBHuHypG6RRzN2SH5vgVg= sha256:vgIhUl9JeGmmf7S/xIGRBIPa+XIf5YsssKQdv9dnVYw= Mail-Copies-To: nobody X-No-Archive: yes URL-perso: http://michelvauquois.fr In-Reply-To: X-Face: 0f|`H5*Our0P$s'uj0)fS=&`R#U+JYple<6GW!O'TO4sB4,Q9"tHNQo]\7p\,,nCZ_saH4~Ie 'gYktutVOXK})aU*/@meZ_y=ixi8qwcJ,ssAk~G4Rr?qr60d_euHkHHJ_;EHES_(IExNo h6 Bytes: 3626 Lines: 52 Dans le message , jdd a écrit le 16 août 2022 à 20 h 29 : >> La config est au début de ce fichier. > > on ne dirait pas Marc Schaefer m'avait répondu ce qui suit lorsque je lui avais demandé comment fonctionnait ce filtre : =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= voici la config utilisée (c'est sauf erreur celle par défaut): my %config = (checkincludedtext => 1, includedcutoff => 40, includedratio => 0.6, quotere => '^[>:]', antiquotere => '^[<]', # so as not to reject dict(1) output ); Et voici le code: if ($config{checkincludedtext}) { my ($lines, $quoted, $antiquoted) = analyze($body); if ($lines > $config{includedcutoff} && $quoted - $antiquoted > $lines * $config{includedratio}) { $rval = "Article contains too much quoted text"; } } sub analyze { my ($lines, $quoted, $antiquoted) = (0, 0, 0); local $_ = shift; do { if ( /\G$config{quotere}/mgc ) { $quoted++; } elsif ( /\G$config{antiquotere}/mgc ) { $antiquoted++; } } while ( /\G(.*)\n/gc && ++$lines ); return ($lines, $quoted, $antiquoted); } =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= -- 🇺🇦 Michel Vauquois - 🇺🇦 Les fous paient pas d'impôts: ils sont peut-être fous mais ils sont pas cons, ah ça non ! (Brèves de comptoir - Jean-Marie Gourio)