Send inn-workers mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."


Today's Topics:

   1. INN::ovsqlite_client Perl module to manipulate an ovsqlite
      database (Julien ?LIE)
   2. Re: INN::ovsqlite_client Perl module to manipulate an
      ovsqlite database (Bo Lindbergh)
   3. Re: INN::ovsqlite_client Perl module to manipulate an
      ovsqlite database (Julien ?LIE)


----------------------------------------------------------------------

Message: 1
Date: Sat, 23 Dec 2023 13:28:45 +0100
From: Julien ?LIE <[email protected]>
To: "[email protected]" <[email protected]>
Subject: INN::ovsqlite_client Perl module to manipulate an ovsqlite
        database
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed

Hi all,

This message to make you aware of an INN::ovsqlite_client Perl module 
written by Bo Lindbergh.  I believe it will be of interest to people in 
this list.

This module permits accessing an ovsqlite overview database through 
ovsqlite-server from a Perl script.  It provides the same functions as 
INN internally uses to search, add, remove and expire information stored 
in an ovsqlite database (newsgroups and overview data associated to 
articles in these newsgroups).

Two samples are also provided in the contrib directory (ovsqlite-dump 
and ovsqlite-undump) to show how to use the module.


Many thanks to Bo for this great and impressive contribution!

 
https://raw.githubusercontent.com/InterNetNews/inn/main/perl/INN/ovsqlite_client.pm
 
https://raw.githubusercontent.com/InterNetNews/inn/main/contrib/ovsqlite-dump.in
 
https://raw.githubusercontent.com/InterNetNews/inn/main/contrib/ovsqlite-undump.in



Example from the documentation to retrieve the overview data of all the 
articles in news.software.nntp:

     use INN::ovsqlite_client qw(:all);

     my $client
       = INN::ovsqlite_client::->new(
           port => "/usr/local/news/run/ovsqlite.sock");

     $client->search_group(
         groupname => "news.software.nntp",
         low       => 1,
         cols      => search_col_overview,
         articles  => my $articles,
         errmsg    => my $errmsg
     );

     defined($errmsg)
       and die "search_group: $errmsg";

     foreach my $article (@{$articles}) {
         print $article->{overview};
     }



Besides search_group(), are also add_group(), get_groupinfo(), 
delete_group(), list_groups(), add_article(), get_artinfo(), 
delete_article(), search_group(), expire_group()...

They will surely be helpful for custom scripts fitting your needs :)

-- 
Julien ?LIE

??Une robe de femme doit ?tre comme une plaidoirie?: assez longue pour
   couvrir le sujet, assez courte pour ?tre suivie.??


------------------------------

Message: 2
Date: Sun, 24 Dec 2023 00:46:47 +0100
From: Bo Lindbergh <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Re: INN::ovsqlite_client Perl module to manipulate an
        ovsqlite database
Message-ID: <[email protected]>
Content-Type: text/plain;       charset=utf-8

Quoth Julien ?LIE <[email protected]>:
> Example from the documentation to retrieve the overview data of all the 
> articles in news.software.nntp:

Actually, only the first 128 (approximately) KB of it, since the current
methods all map to single requests.

You can expect version 1.001 after the holidays, featuring convenience
methods for those requests that need to be repeated.


/Bo Lindbergh



------------------------------

Message: 3
Date: Sun, 24 Dec 2023 12:33:14 +0100
From: Julien ?LIE <[email protected]>
To: [email protected]
Subject: Re: INN::ovsqlite_client Perl module to manipulate an
        ovsqlite database
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed

Hi Bo,

>> Example from the documentation to retrieve the overview data of all the 
>> articles in news.software.nntp:
> 
> Actually, only the first 128 (approximately) KB of it, since the current
> methods all map to single requests.

Oh yes, you're right.  One would need to iterate, changing the asked low 
water mark, until receiving a response_artlist_done code like in the 
contrib/ovsqlite-dump sample.


> You can expect version 1.001 after the holidays, featuring convenience
> methods for those requests that need to be repeated.

That would indeed facilitate the searches, thanks!

-- 
Julien ?LIE

??Medicorum nutrix est intemperantia.??


------------------------------

Subject: Digest Footer

_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers


------------------------------

End of inn-workers Digest, Vol 156, Issue 6
*******************************************

Reply via email to