[rclis] E-LIS counter
Antonella De Robbio (Casa)
rclis@lists.openlib.org
Fri, 07 Feb 2003 15:08:33 +0100
--------------060708050002080805030907
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
By now, there are 50 articles in our Archive.
ciao! Antonella
-------- Original Message --------
Subject: Re: New archive for LIS
Date: Fri, 7 Feb 2003 14:47:09 +0000
From: Christopher Gutteridge <cjg@ecs.soton.ac.uk>
To: Antonella De Robbio <derobbio@tin.it>
References: <3E2F2738.2FBA124B@tin.it>
<20030206025117.D1117@ecs.soton.ac.uk> <3E42DF18.6E1139C1@tin.it>
Hmm. I've added a similar feature to the core system - we want to
start building graphs of archives sizes, and that'l help automate
it.
Not that it really matters, but you could just do:
$session->send_http_header();
print $session->get_archive()->get_dataset( "archive" )->count( $session );
print "\n";
On Thu, Feb 06, 2003 at 11:18:00 +0100, Antonella De Robbio wrote:
> > That archive looks great! How do you do the "49 records in archive"
> > on the front page.
>
> Thank you!
>
> in the (static html) homepage, I have had to put one called by means of an ssi
> (serveur side include) to an external Perl.
> The call is stated simply by the following line:
>
>
> The perl script that takes the data from the archive database
> is an adjustment of the one they used to display the archive
> status (and it was in the protected area, accessible only to the manager).
> Precisely, it is in the file:
> /usr/local/eprints2/cgi/contatore-articoli (which then is called through a
> slightly different address, as /perl/ is an alias of the cgi directory in
> native EPrints software).
>
> So, apart from comments, the script contatore-articoli is as follows:
>
>
> use EPrints::Session;
>
> use strict;
>
> my $session = new EPrints::Session;
>
> my $rows;
>
>
> my %num_eprints = ();
> my @esets = ( "archive", "buffer", "inbox", "deletion" );
>
> foreach( @esets )
> {
> # Number of submissions in dataset
> $num_eprints{$_} = $session->get_archive()->get_dataset( $_
> )->count( $session );
> }
> print $num_eprints{$esets[0]};
>
> Antonella De Robbio
> E-LIS Manager
> eprints@dois.it
> http://eprints@rclis.org
>
>
>
--
Christopher Gutteridge -- cjg@ecs.soton.ac.uk -- +44 (0)23 8059 4833
>O___,
______________________________________________________________(___)_______
| | |
| Now Playing: "Body and Soul" | 42 children eaten by a bear (II |
| from A Slight Case of | Kings 2:23, 24) |
| Overbombing - Sisters of Mercy | |
|___________________________________|______________________________________|
--------------060708050002080805030907
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<html>
<head>
</head>
<body>
<br>
<p><font color="RED">By now, there are <b>50</b> articles in our Archive.</font></p>
ciao! Antonella<br>
-------- Original Message --------
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<th valign="Baseline" align="Right" nowrap="">Subject: </th>
<td>Re: New archive for LIS</td>
</tr>
<tr>
<th valign="Baseline" align="Right" nowrap="">Date: </th>
<td>Fri, 7 Feb 2003 14:47:09 +0000</td>
</tr>
<tr>
<th valign="Baseline" align="Right" nowrap="">From: </th>
<td>Christopher Gutteridge <a class="moz-txt-link-rfc2396E" href="mailto:cjg@ecs.soton.ac.uk"><cjg@ecs.soton.ac.uk></a></td>
</tr>
<tr>
<th valign="Baseline" align="Right" nowrap="">To: </th>
<td>Antonella De Robbio <a class="moz-txt-link-rfc2396E" href="mailto:derobbio@tin.it"><derobbio@tin.it></a></td>
</tr>
<tr>
<th valign="Baseline" align="Right" nowrap="">References: </th>
<td><a class="moz-txt-link-rfc2396E" href="mailto:3E2F2738.2FBA124B@tin.it"><3E2F2738.2FBA124B@tin.it></a> <a class="moz-txt-link-rfc2396E" href="mailto:20030206025117.D1117@ecs.soton.ac.uk"><20030206025117.D1117@ecs.soton.ac.uk></a>
<a class="moz-txt-link-rfc2396E" href="mailto:3E42DF18.6E1139C1@tin.it"><3E42DF18.6E1139C1@tin.it></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>Hmm. I've added a similar feature to the core system - we want to
start building graphs of archives sizes, and that'l help automate
it.
Not that it really matters, but you could just do:
$session->send_http_header();
print $session->get_archive()->get_dataset( "archive" )->count( $session );
print "\n";
On Thu, Feb 06, 2003 at 11:18:00 +0100, Antonella De Robbio wrote:
> > That archive looks great! How do you do the "49 records in archive"
> > on the front page.
>
> Thank you!
>
> in the (static html) homepage, I have had to put one called by means of an ssi
> (serveur side include) to an external Perl.
> The call is stated simply by the following line:
> <!--#exec cgi="/perl/contatore-articoli"-->
>
> The perl script that takes the data from the archive database
> is an adjustment of the one they used to display the archive
> status (and it was in the protected area, accessible only to the manager).
>
Precisely, it is in the file:
> /usr/local/eprints2/cgi/contatore-articoli (which then is called through a
> slightly different address, as /perl/ is an alias of the cgi directory in
> native EPrints software).
>
> So, apart from comments, the script contatore-articoli is as follows:
>
>
> use EPrints::Session;
>
> use strict;
>
> my $session = new EPrints::Session;
>
> my $rows;
>
>
> my %num_eprints = ();
> my @esets = ( "archive", "buffer", "inbox", "deletion" );
>
> foreach( @esets )
> {
> # Number of submissions in dataset
> $num_eprints{$_} = $session->get_archive()->get_dataset( $_
> )->count( $session );
> }
> print $num_eprints{$esets[0]};
>
> Antonella De Robbio
> E-LIS Manager
> <a class="moz-txt-link-abbreviated" href="mailto:eprints@dois.it">eprints@dois.it</a>
> <a class="moz-txt-link-freetext" href="http://eprints@rclis.org">http://epr
ints@rclis.org</a>
>
>
>
--
Christopher Gutteridge -- <a class="moz-txt-link-abbreviated" href="mailto:cjg@ecs.soton.ac.uk">cjg@ecs.soton.ac.uk</a> -- +44 (0)23 8059 4833
>O___,
______________________________________________________________(___)_______
| | |
| Now Playing: "Body and Soul" | 42 children eaten by a bear (II |
| from A Slight Case of | Kings 2:23, 24) |
| Overbombing - Sisters of Mercy | |
|___________________________________|______________________________________|
</pre>
</body>
</html>
--------------060708050002080805030907--