]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/support-scripts/offline-blocked-list.pl
ingnore expired for now ... until we can compress the list
[Evergreen.git] / Open-ILS / src / support-scripts / offline-blocked-list.pl
1 #!/usr/bin/perl
2 use strict;
3
4 use OpenSRF::EX qw(:try);
5 use OpenSRF::System;
6 use OpenSRF::AppSession;
7
8 my $config = shift || die "Please specify a config file\n";
9
10 OpenSRF::System->bootstrap_client( config_file => $config );
11
12 my $ses = OpenSRF::AppSession->connect( 'open-ils.storage' );
13
14 my $lost = $ses->request( 'open-ils.storage.actor.user.lost_barcodes' );
15 while (my $resp = $lost->recv ) {
16         print $resp->content . " L\n";
17 }
18 $lost->finish;
19
20 if(0) { # XXX just too many... arg
21         my $expired = $ses->request( 'open-ils.storage.actor.user.expired_barcodes' );
22         while (my $resp = $expired->recv ) {
23                 print $resp->content . " E\n";
24         }
25         $expired->finish;
26 }
27
28 my $barred = $ses->request( 'open-ils.storage.actor.user.barred_barcodes' );
29 while (my $resp = $barred->recv ) {
30         print $resp->content . " B\n";
31 }
32 $barred->finish;
33
34 my $penalized = $ses->request( 'open-ils.storage.actor.user.penalized_barcodes' );
35 while (my $resp = $penalized->recv ) {
36         print $resp->content . " D\n";
37 }
38 $penalized->finish;
39
40 $ses->disconnect;
41 $ses->finish;
42